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

OpenCL and DPCPP kernel hashing #583

Merged
merged 6 commits into from
May 18, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Ensure a value is returned by the end of function.
  • Loading branch information
kris-rowe committed May 17, 2022
commit 902358df2b69f7234fc331598cc5f7c4f8aab8cf
14 changes: 10 additions & 4 deletions src/occa/internal/modes/opencl/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,22 @@ namespace occa {
}

cl_device_type deviceType(info::device_type type) {
cl_device_type dtype;
switch (type) {
case info::device_type::cpu:
return CL_DEVICE_TYPE_CPU;
dtype = CL_DEVICE_TYPE_CPU;
break;
case info::device_type::gpu:
return CL_DEVICE_TYPE_GPU;
dtype = CL_DEVICE_TYPE_GPU;
break;
case info::device_type::accelerator:
return CL_DEVICE_TYPE_ACCELERATOR;
dtype = CL_DEVICE_TYPE_ACCELERATOR;
break;
case info::device_type::all:
return CL_DEVICE_TYPE_ALL;
dtype = CL_DEVICE_TYPE_ALL;
break;
}
return dtype;
}

int getDeviceCount(info::device_type type) {
Expand Down