flashinfer-ai/flashinfer

flashinfer.nvfp4_quantize: make CuTe-DSL backend's `a_global_sf` arg a host side arg (to align CuTe-DSL backend with CUDA backend)

Geschlossen

#4.112 geöffnet am 23.07.2026

 (2 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Python (1.031 Forks)github user discovery
good first issueop: misc

Repository-Metriken

Stars
 (5.756 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 11T 23h) (186 gemergte PRs in 30 T)

Beschreibung

As reported: "In flashinfer.nvfp4_quantize, the type of the argument a_global_sf is inconsistent. For cuda, it is a host side value; for cute-dsl, it is a device side tensor. The function description is not clear enough. We should make it host side and passed as a function argument.

What we might be able to do relatively easily is to change the cute-dsl backend kernel to accept either (a) a device side tensor of size 1 and dtype float32 (what we support today); or (b) a single float value that trivially comes from host.  That way it would be backwards compatible for those who might be using the device-side tensor."

Contributor Guide