[BUG] CuTe DSL: Hopper dense_gemm example fails its fp8 reference check
Which component has the problem? CuTe DSL
Describe the bug
The Hopper dense_gemm.py example fails its reference check for fp8 inputs with a Float32 output, on every element. With a Float16 output it passes, but only because the reference is all inf.
Steps/Code to reproduce bug
python examples/python/CuTeDSL/cute/hopper/kernel/dense_gemm/dense_gemm.py \
--a_dtype Float8E4M3FN --b_dtype Float8E4M3FN --acc_dtype Float32 --c_dtype Float32
AssertionError: Tensor-likes are not close!
Mismatched elements: 16777216 / 16777216 (100.0%)
--a_dtype Float8E5M2 --b_dtype Float8E5M2 fails the same way.
Expected behavior
The check passes, and with a Float16 output it compares finite values.
Environment details
nvidia-cutlass-dsl 4.8.1 (latest on PyPI), torch 2.9.0, Python 3.13, Cloud (Modal), H100 (sm_90). The example is unchanged on main (b2f249a).
Additional context
create_and_permute_tensor holds fp8 inputs in uint8 tensors while the random init draws from [-2, 2], so -2 and -1 become 254 and 255 in the float32 copy the reference is computed from. The fp8 cases added in #3770 run into this. I have a fix and will open a PR.