Skip to content

Commit c7712f3

Browse files
committed
changing approach using setErrorMessag
1 parent 6fe90d2 commit c7712f3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2824,9 +2824,10 @@ pi_result cuda_piextKernelSetArgMemObj(pi_kernel kernel, pi_uint32 arg_index,
28242824
arrayDesc.Format != CU_AD_FORMAT_SIGNED_INT32 &&
28252825
arrayDesc.Format != CU_AD_FORMAT_HALF &&
28262826
arrayDesc.Format != CU_AD_FORMAT_FLOAT) {
2827-
sycl::detail::pi::die(
2828-
"PI CUDA kernels only support images with channel types int32, "
2829-
"uint32, float, and half.");
2827+
setErrorMessage("PI CUDA kernels only support images with channel "
2828+
"types int32, uint32, float, and half.",
2829+
PI_ERROR_PLUGIN_SPECIFIC_ERROR);
2830+
return PI_ERROR_PLUGIN_SPECIFIC_ERROR;
28302831
}
28312832
CUsurfObject cuSurf = arg_mem->mem_.surface_mem_.get_surface();
28322833
kernel->set_kernel_arg(arg_index, sizeof(cuSurf), (void *)&cuSurf);

0 commit comments

Comments
 (0)