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

Add size validation for USM device/shared allocs #2557

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RossBrunton
Copy link
Contributor

@RossBrunton RossBrunton commented Jan 14, 2025

The spec states that an allocation size higher than
DEVICE_INFO_MAX_MEM_ALLOC_SIZE should report an error. This has been
added to the cuda, hip and native cpu backends now.

The tests have also been updated, which sadly introduces a new
regression for level zero.

@github-actions github-actions bot added conformance Conformance test suite issues. cuda CUDA adapter specific issues hip HIP adapter specific issues native-cpu Native CPU adapter specific issues labels Jan 14, 2025
@RossBrunton RossBrunton force-pushed the ross/usmsize branch 4 times, most recently from 90776d2 to a57191a Compare January 14, 2025 14:21
@kbenzie
Copy link
Contributor

kbenzie commented Jan 14, 2025

I don't think we can reliably have this check due to limitations in how the different adapters report max alloc size.

@RossBrunton
Copy link
Contributor Author

I don't think we can reliably have this check due to limitations in how the different adapters report max alloc size.

What do you mean? The spec says that MAX_MEM_ALLOC_SIZE is the largest USM allocation that can be made.

Copy link
Contributor

@frasercrmck frasercrmck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CUDA/HIP LGTM

@RossBrunton RossBrunton marked this pull request as draft January 21, 2025 11:26
The spec states that an allocation size higher than
`DEVICE_INFO_MAX_MEM_ALLOC_SIZE` should report an error. This has been
added to the Cuda, Hip and Native CPU backends now.

The tests have also been updated, which sadly introduces a new
regression for level zero.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conformance Conformance test suite issues. cuda CUDA adapter specific issues hip HIP adapter specific issues native-cpu Native CPU adapter specific issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants