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

[CUDA] Max local mem size check should return OUT_OF_RESOURCES #1322

Open
rafbiels opened this issue Feb 8, 2024 · 1 comment
Open

[CUDA] Max local mem size check should return OUT_OF_RESOURCES #1322

rafbiels opened this issue Feb 8, 2024 · 1 comment
Assignees
Labels
cuda CUDA adapter specific issues

Comments

@rafbiels
Copy link
Contributor

rafbiels commented Feb 8, 2024

Building on top of intel/llvm#12604 + #1318 which adds handleOutOfResources to dpcpp and returns UR_RESULT_ERROR_OUT_OF_RESOURCES, the local mem size check:

if (LocalSize > static_cast<uint32_t>(Device->getMaxCapacityLocalMem())) {
setErrorMessage("Excessive allocation of local memory on the device",
UR_RESULT_ERROR_ADAPTER_SPECIFIC);
return UR_RESULT_ERROR_ADAPTER_SPECIFIC;
}

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.

@kbenzie kbenzie added the cuda CUDA adapter specific issues label Feb 15, 2024
@kbenzie
Copy link
Contributor

kbenzie commented Feb 15, 2024

@GeorgeWeb I've assigned this to you since its building on top of your PR's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA adapter specific issues
Projects
None yet
Development

No branches or pull requests

3 participants