oneapi-src / oneapi-src/unified-runtime
[CUDA] Max local mem size check should return OUT_OF_RESOURCES
@GeorgeWeb is already working on this.
Since Feb 15, 2024.
- Dominant language
- C++
- Stars
- 57
- Forks
- 120
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 1
Description
Building on top of https://github.com/intel/llvm/pull/12604 + https://github.com/oneapi-src/unified-runtime/pull/1318 which adds handleOutOfResources to dpcpp and returns UR_RESULT_ERROR_OUT_OF_RESOURCES, the local mem size check:
https://github.com/oneapi-src/unified-runtime/blob/f086f369cab557bf2a589e22bfc37e18d7de5fa8/source/adapters/cuda/enqueue.cpp#L294-L298
should also return UR_RESULT_ERROR_OUT_OF_RESOURCES and have dedicated error handling case added in handleOutOfResources.
Right now submitting a kernel with too large local mem size results in:
Native API failed. Native API returns: -996 (The plugin has emitted a backend specific error)
Excessive allocation of local memory on the device
-996 (The plugin has emitted a backend specific error)
which does contain a helpful exception message, but wrapped in generic and confusing "backend specific error" messages and the unhelpful code -996. Having this returning ERROR_OUT_OF_RESOURCES would make it easier for us to cover in the troubleshooting guide, and for users to find it with web search engines.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.