Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to get platform and device information? #42

Open
HamedSharifian opened this issue Nov 6, 2021 · 1 comment
Open

[Question] How to get platform and device information? #42

HamedSharifian opened this issue Nov 6, 2021 · 1 comment

Comments

@HamedSharifian
Copy link

I have a device with 2 GPUs:

  • Intel(R) HD Graphics 520
  • NVIDIA GeForce 940MX
    GPU-Z shows that OpenCL is enabled and is working on both. I get 2 platforms when I obtain platform Ids using JOCL, but I don't know which device is in use! I wonder if I could know how can I get "device name" or its "vendor" using the platform Id?
@gpu
Copy link
Owner

gpu commented Nov 12, 2021

The https://github.com/gpu/JOCLSamples/blob/master/src/main/java/org/jocl/samples/JOCLDeviceQuery.java sample might be what you're looking for. It iterates through all platforms, and all devices for each platform, and prints the name and vendor of each device (together with lots of further technical information).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants