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

Fix failure on systems with multiple OpenCL platforms #290

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

proski
Copy link
Contributor

@proski proski commented Aug 23, 2024

No need to fail hard and exist if there are multiple OpenCL platforms and some of them don't have any device. Only fail if there are no devices for any platform.

This can happen e.g. if support for both Intel and AMD GPU is installed.

No need to fail hard and exist if there are multiple OpenCL platforms
and some of them don't have any device. Only fail if there are no
devices for any platform.

This can happen e.g. if support for both Intel and AMD GPU is installed.
@proski
Copy link
Contributor Author

proski commented Aug 23, 2024

Test results.

No platforms:

20240822 18:52:57  PRPLL 0.13-4-gdbd28f2
20240822 18:52:57  PRPLL 0.13-4-gdbd28f2
20240822 18:52:57  config: -ll 12345678
20240822 18:52:57  No OpenCL platforms found (ICD_NOT_FOUND)
20240822 18:52:57  No OpenCL device found. Check clinfo
20240822 18:52:57  Exiting because "No OpenCL device found. Check clinfo"
20240822 18:52:57  Bye

One platform, no devices:

20240822 18:52:35  PRPLL 0.13-4-gdbd28f2
20240822 18:52:35  PRPLL 0.13-4-gdbd28f2
20240822 18:52:35  config: -ll 12345678
20240822 18:52:35  No OpenCL device found. Check clinfo
20240822 18:52:35  Exiting because "No OpenCL device found. Check clinfo"
20240822 18:52:35  Bye

One platform, one device:

20240822 18:57:56  PRPLL 0.13-4-gdbd28f2
20240822 18:57:56  PRPLL 0.13-4-gdbd28f2
20240822 18:57:56  config: -ll 12345678
20240822 18:57:56  device 0, OpenCL 24.26.30049.6, unique id ''
20240822 18:57:56 12345678 config:
20240822 18:57:56 12345678 FFT: 640K 256:5:256:2:0 (18.84 bpw)

Two platforms, one device:

20240822 18:59:07  PRPLL 0.13-4-gdbd28f2
20240822 18:59:07  PRPLL 0.13-4-gdbd28f2
20240822 18:59:07  config: -ll 12345678
20240822 18:59:07  device 0, OpenCL 24.26.30049.6, unique id ''
20240822 18:59:07 12345678 config:
20240822 18:59:07 12345678 FFT: 640K 256:5:256:2:0 (18.84 bpw)

Master branch behavior for two platforms, one device:

20240822 19:00:59  PRPLL 0.13-3-g669966f
20240822 19:00:59  PRPLL 0.13-3-g669966f
20240822 19:00:59  config: -ll 12345678
terminate called after throwing an instance of 'gpu_error'
  what():  DEVICE_NOT_FOUND (-1) clGetDeviceIDs(platforms[i], kind, 64, devices, &n) at src/clwrap.cpp:100 getAllDeviceIDs
Aborted (core dumped)

Copy link
Owner

@preda preda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@preda preda merged commit f78800b into preda:master Aug 23, 2024
3 checks passed
@proski proski deleted the multiple-platforms branch September 4, 2024 06:59
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

Successfully merging this pull request may close these issues.

2 participants