IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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

zero_scale_global_kernel

def zero_scale_global_kernel(scale_global: Pointer[Float32, MutAnyOrigin, _safe=False])

Zeros the global FP8 scale factor in a single thread.

Writes 0 to scale_global[0] directly rather than using enqueue_fill, which can deadlock under CUDA graph replay when the GPU is already spinning inside a collectives kernel.

Args:

  • scale_global (Pointer[Float32, MutAnyOrigin, _safe=False]): Pointer to the single FP32 global scale to zero.