-
Notifications
You must be signed in to change notification settings - Fork 16
[GpuOclRuntime] Avoid error when iterating over non-gpu devices #413
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
Conversation
80f8eaf to
afc9141
Compare
|
Does it mean, that |
|
Sorry, I closed it accidently. |
|
What's the use case for running CPU through opencl anyway? The runtime is not supposed to be called during CPU execution. |
|
I build like this: then I run Assuming I am using gpu-runner in a way I am not supposed to, what would be the correct command to run a single arbitrary |
You are using it in the right way and the same command works for me: Does this command fails for you? What's the failure? |
|
As I have mentioned in the beginning, the test runs: However, it also displays an error for one of the platforms. This error is displayed because we ask the following platform: for a device ID of type if (err != CL_SUCCESS) {
gcLogE("Failed to get the number of devices on the platform.", platform,
" Error: ", err);
continue;
}So is it ok for |
Got it. The error message is redundant here. It should be either replaced with a debug message or removed. |
Consider these devices visible to OpenCL (CPU and GPU):
If you try to run the
mlp.mlirexample in the currentmain, it would display an error (-1) for CPU, but would still run the test. The error is displayed due to reading all devices usingCL_DEVICE_TYPE_GPU. Instead, we can first read all devices usingCL_DEVICE_TYPE_ALLand then useCL_DEVICE_TYPEto select GPUs, this way, no error is displayed.