You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KeyError: Unsupported element type in dlpack: 'Float8E4M3FN'. Supported types are:
['Bool', 'Int64', 'Int32', 'Int16', 'Int8', 'UInt64', 'UInt32', 'UInt16', 'UInt8',
'Float64', 'Float32', 'Float16', 'BFloat16', 'Float8E5M2']
The runtime already decodes the DLPack type code and reports the element type as Float8E4M3FN (the string comes out of libcute_dsl_runtime.so, which also knows Float8E4M3, Float8E4M3FNUZ, Float8E8M0FNU, Float4E2M1FN, ...). Only the Python
lookup table in TensorDescriptor.element_type / python/CuTeDSL/cutlass/base_dsl/runtime/tensor_descriptor.py stops at Float8E5M2, so
every other 8-bit float that the runtime recognizes is rejected at import time even though cutlass.Float8E4M3FN is a fully supported kernel element type.
PyTorch is not the limiting side: torch.empty(8, dtype=torch.float8_e4m3fn).__dlpack__()
succeeds on torch 2.11 and the capsule round-trips through torch.from_dlpack.
Steps/Code to reproduce bug
importtorchfromcutlass.cute.runtimeimportfrom_dlpackx=torch.empty(8, dtype=torch.float8_e4m3fn, device="cuda")
t=from_dlpack(x, assumed_align=16) # KeyError: Unsupported element type in dlpack: 'Float8E4M3FN'
Expected behavior
from_dlpack returns a cute.Tensor with element_type == cutlass.Float8E4M3FN, the same
way it does for torch.float8_e5m2.
Workaround in use
Callers currently export the storage as uint8/int8 and overwrite element_type
afterwards, e.g. FlashInfer does this in flashinfer/gemm/kernels/bmm_fp8_blackwell.py, flashinfer/attention/cute_dsl/fmha.py, and pending PR flashinfer-ai/flashinfer#5533:
Adding the missing names to the dtype_map (at least Float8E4M3FN; ideally the other
strings the runtime emits) would let these call sites drop the reinterpretation.
Environment details
nvidia-cutlass-dsl 4.8.0 (nvidia_cutlass_dsl_libs_cu13-4.8.0), and main as of 2026-10-07
Activity
Ammar-Alnagar commentedon Oct 10, 2026
taking this !!
docs(comm): name the CuTe DSL dtype map as the reason for the FP8 DLP…