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
swizzle_granularity
def swizzle_granularity[dtype: DType, swizzle_mode: TensorMapSwizzle]() -> Int
Returns the TMA swizzle granularity measured in elements of dtype.
The granularity is the swizzle mode's byte width divided by the size of a
single dtype element, yielding the number of contiguous elements that one
swizzle atom covers.
Parameters:
- dtype (
DType): The element dtype whose byte size scales the swizzle byte width into an element count. - swizzle_mode (
TensorMapSwizzle): The TMA swizzle mode whose byte width determines the granularity.
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!