-
Hello, I am running the same SYCL code on different GPUs (NVIDIA and AMD). The two backends have different limits in terms of grid size. PI CUDA ERROR:
Value: 1
Name: CUDA_ERROR_INVALID_VALUE
Description: invalid argument
Function: cuda_piEnqueueKernelLaunch
Source Location: /opt/sycl/source/llvm/sycl/plugins/cuda/pi_cuda.cpp:3186 I would like to manage this PI exception using a try catch block, but |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Tagging @intel/llvm-reviewers-cuda here to comment. I don't know much about our CUDA plugin implementation, but this looks rather like a bug to mee. SYCL interface for error reporting is exceptions and it shouldn't matter which exact device/backend we are running on. |
Beta Was this translation helpful? Give feedback.
-
This seems to be regarding an old build of DPC++ / constexpr const size_t Dim = 3;
try {
q.submit([&](handler &cgh) {
cgh.parallel_for<class TestDim>(
nd_range<Dim>(range<Dim>(1, std::numeric_limits<int32_t>::max(), 1),
range<Dim>(1, 1, 1)),
[=](nd_item<Dim> item) {
// empty
});
}).wait();
} catch (const sycl::exception &e) {
std::cerr << "Error: " << e.what() << std::endl;
}
This should also not be a problem with the latest release from what I can tell looking at the source code that handles this. |
Beta Was this translation helpful? Give feedback.
-
Closing this as it should be resolved, please feel free to re-open if the issue persists |
Beta Was this translation helpful? Give feedback.
This seems to be regarding an old build of DPC++ /
intel/llvm
just by looking at the reported error above. For example,Source Location
points topi_cuda.cpp:3186
. All errors are propagated up the stack from the backend adapters and thrown as exceptions by the SYCL runtime. I've tried to reproduce the scenario described above ("When running with a too large size for the y-dimension of the CUDA grid, I get this plugin interface error") using the latestintel/llvm
->sycl
branch and I am able to catch the exception just fine.