-
Notifications
You must be signed in to change notification settings - Fork 915
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
[BUG] JNI side is not setting the proper alignment for the limiting_resource_adaptor
with ASYNC
#10384
Comments
Our tracking wrapper should also be updated to match 512 for ASYNC. |
The CUDA programming guide only specifies
The actual alignment size seems to be an internal decision of the driver/runtime, not a public api. |
Thanks @rongou. Then we shouldn't rely on the potential alignment we have seen in experiments. It seems we can't really limit the pool size then as it was intended with |
We use the `limiting_resource_adaptor` in front of the async allocator to track the total size of allocations and trigger spills. By default the adaptor aligns to 256, but the async allocator internally aligns to 512. This causes the limiting adaptor to under count allocation sizes, leading to OOMs in the async allocator. This PR changes the limiting adaptor to also use 512. This seems to help with a customer query that we were seeing OOMs before. Note that CUDA is planning to switch back to 256 in the future so this may need to be revisited. Fixes #10384 Authors: - Rong Ou (https://github.com/rongou) Approvers: - Jason Lowe (https://github.com/jlowe) URL: #10395
In RmmJni, our use of
limiting_resource_adaptor
doesn't seem to be setting the proper alignment when wrapping the ASYNC allocator.https://github.com/rapidsai/cudf/blob/branch-22.04/java/src/main/native/src/RmmJni.cpp#L360
There is an argument to the constructor of this adaptor to set the proper alignment, and it defaults to 256 bytes. From experiments, the ASYNC allocator looks to be aligning to 512 bytes, so we are going to be under counting if we are trying to track the amount of memory available in the pool.
The text was updated successfully, but these errors were encountered: