Skip to content

Conversation

@jerryrt
Copy link

@jerryrt jerryrt commented Oct 24, 2025

Replaced hardcoded 1GB memory allocation with dynamic calculation based on device capabilities. The benchmark now uses the smaller of 1GB or the device's maximum global buffer size, preventing allocation failures on devices with limited memory.

Changes:

  • Calculate target memory as min(1024MB, device.max_global_buffer)
  • Derive N dynamically from available memory instead of fixed 4096*4096
  • Reorder constant definitions for clarity
  • Add missing newline at end of file

This makes the benchmark more robust and portable across different hardware configurations.

Replaced hardcoded 1GB memory allocation with dynamic calculation
based on device capabilities. The benchmark now uses the smaller of
1GB or the device's maximum global buffer size, preventing allocation
failures on devices with limited memory.

Changes:
- Calculate target memory as min(1024MB, device.max_global_buffer)
- Derive N dynamically from available memory instead of fixed 4096*4096
- Reorder constant definitions for clarity
- Add missing newline at end of file

This makes the benchmark more robust and portable across different
hardware configurations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant