Skip to content

Commit 6eae345

Browse files
[Misc] Fix ScalarType float4 naming (#17690)
Signed-off-by: Lucas Wilkinson <lwilkinson@neuralmagic.com>
1 parent 63ced7b commit 6eae345

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/kernels/quantization/test_nvfp4_quant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
SEEDS = [42]
1818
CUDA_DEVICES = ['cuda:0']
1919

20-
FLOAT4_E2M1_MAX = scalar_types.float4_e2m1fn.max()
20+
FLOAT4_E2M1_MAX = scalar_types.float4_e2m1f.max()
2121
FLOAT8_E4M3_MAX = torch.finfo(torch.float8_e4m3fn).max
2222

2323
# E2M1 to float

tests/test_scalartype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
(0, 15, scalar_types.uint4),
1212
(-8, 7, scalar_types.uint4b8),
1313
(-128, 127, scalar_types.uint8b128),
14-
(-6., 6., scalar_types.float4_e2m1fn),
14+
(-6., 6., scalar_types.float4_e2m1f),
1515
(-28., 28., scalar_types.float6_e3m2f),
1616
(torch.int8, scalar_types.int8),
1717
(torch.uint8, scalar_types.uint8),

vllm/scalar_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ class scalar_types:
333333
float6_e3m2f = ScalarType.float_(3, 2, True, NanRepr.NONE)
334334

335335
# fp4, https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf
336-
float4_e2m1fn = ScalarType.float_(2, 1, True, NanRepr.NONE)
336+
float4_e2m1f = ScalarType.float_(2, 1, True, NanRepr.NONE)
337337

338338
# "gptq" types
339339
uint2b2 = ScalarType.uint(2, 2)

0 commit comments

Comments
 (0)