MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / cutlass_scaled_nvfp4_mm

Function cutlass_scaled_nvfp4_mm

lightx2v_kernel/python/lightx2v_kernel/gemm.py:4–8  ·  view source on GitHub ↗
(mat_a, mat_b, scales_a, scales_b, alpha, bias=None)

Source from the content-addressed store, hash-verified

2
3
4def _fp8_f16_accum_meta(mat_a, mat_b, scales_a, scales_b, out_dtype, bias=None):
5 del scales_a, scales_b, bias
6 return torch.empty((mat_a.shape[0], mat_b.shape[1]), dtype=out_dtype, device=mat_a.device)
7
8
9FP8_F16_ACCUM_MM_AVAILABLE = hasattr(torch.ops.lightx2v_kernel, "cutlass_scaled_fp8_mm_f16_accum_sm120")
10if FP8_F16_ACCUM_MM_AVAILABLE:
11 _fp8_f16_accum_op = torch.ops.lightx2v_kernel.cutlass_scaled_fp8_mm_f16_accum_sm120.default

Callers 4

applyMethod · 0.90
test_nvfp4_gemmFunction · 0.90
applyMethod · 0.90
test_mmFunction · 0.90

Calls 1

defaultMethod · 0.45

Tested by 3

test_nvfp4_gemmFunction · 0.72
applyMethod · 0.72
test_mmFunction · 0.72