Skip to content

[SYCL][CUDA] Make piextKernelSetArgMemObj setting an error message #6521

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

Merged
merged 1 commit into from
Sep 9, 2022
Merged
Changes from all commits
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
7 changes: 4 additions & 3 deletions sycl/plugins/cuda/pi_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2824,9 +2824,10 @@ pi_result cuda_piextKernelSetArgMemObj(pi_kernel kernel, pi_uint32 arg_index,
arrayDesc.Format != CU_AD_FORMAT_SIGNED_INT32 &&
arrayDesc.Format != CU_AD_FORMAT_HALF &&
arrayDesc.Format != CU_AD_FORMAT_FLOAT) {
sycl::detail::pi::die(
"PI CUDA kernels only support images with channel types int32, "
"uint32, float, and half.");
setErrorMessage("PI CUDA kernels only support images with channel "
"types int32, uint32, float, and half.",
PI_ERROR_PLUGIN_SPECIFIC_ERROR);
return PI_ERROR_PLUGIN_SPECIFIC_ERROR;
}
CUsurfObject cuSurf = arg_mem->mem_.surface_mem_.get_surface();
kernel->set_kernel_arg(arg_index, sizeof(cuSurf), (void *)&cuSurf);
Expand Down