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
padded_depth
def padded_depth[dtype: DType, swizzle_mode: TensorMapSwizzle, depth: Int]() -> Int
Aligns depth up to the nearest multiple of the swizzle granularity.
The returned depth is the smallest value greater than or equal to depth
that is evenly divisible by swizzle_granularity[dtype, swizzle_mode],
ensuring the inner dimension satisfies TMA swizzle alignment requirements.
Parameters:
- โdtype (
DType): The element dtype used to convert the swizzle byte width into an element-count granularity. - โswizzle_mode (
TensorMapSwizzle): The TMA swizzle mode whose byte width determines the alignment granularity. - โdepth (
Int): The inner-dimension depth in elements to align upward.
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!