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

convert_bf16_to_fp8_e4m3fn

def convert_bf16_to_fp8_e4m3fn(input_buffer: TileTensor[DType.bfloat16, address_space=input_buffer.address_space, linear_idx_type=input_buffer.linear_idx_type, element_size=input_buffer.element_size], output_buffer: TileTensor[DType.float8_e4m3fn, address_space=output_buffer.address_space, linear_idx_type=output_buffer.linear_idx_type, element_size=output_buffer.element_size], context: DeviceContext)

Convert bfloat16 weights to E4M3FN format.

Args: