For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
get_device_alignment
def get_device_alignment() -> Int
Returns the natural SIMD alignment in bytes for the current GPU target.
Computes the alignment of a full SIMD[DType.uint8, gpu_simd_width] vector,
which is the minimum alignment that avoids split transactions on the target
device. Token format structs use this as the default alignment when the
caller does not supply an explicit value.
Returns:
Int: The alignment in bytes of the native SIMD byte vector for the target GPU.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!