From 9edc5a1847c2c07448d06d60a8a3be69ddf05d50 Mon Sep 17 00:00:00 2001 From: Lucas Wilkinson Date: Tue, 6 May 2025 03:07:21 +0000 Subject: [PATCH] fix naming Signed-off-by: Lucas Wilkinson --- tests/kernels/quantization/test_nvfp4_quant.py | 2 +- tests/test_scalartype.py | 2 +- vllm/scalar_type.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/kernels/quantization/test_nvfp4_quant.py b/tests/kernels/quantization/test_nvfp4_quant.py index 93735fc096d7..b8aa1672100e 100644 --- a/tests/kernels/quantization/test_nvfp4_quant.py +++ b/tests/kernels/quantization/test_nvfp4_quant.py @@ -17,7 +17,7 @@ SEEDS = [42] CUDA_DEVICES = ['cuda:0'] -FLOAT4_E2M1_MAX = scalar_types.float4_e2m1fn.max() +FLOAT4_E2M1_MAX = scalar_types.float4_e2m1f.max() FLOAT8_E4M3_MAX = torch.finfo(torch.float8_e4m3fn).max # E2M1 to float diff --git a/tests/test_scalartype.py b/tests/test_scalartype.py index d0e57ea86fc9..eecfa1db3d7e 100644 --- a/tests/test_scalartype.py +++ b/tests/test_scalartype.py @@ -11,7 +11,7 @@ (0, 15, scalar_types.uint4), (-8, 7, scalar_types.uint4b8), (-128, 127, scalar_types.uint8b128), - (-6., 6., scalar_types.float4_e2m1fn), + (-6., 6., scalar_types.float4_e2m1f), (-28., 28., scalar_types.float6_e3m2f), (torch.int8, scalar_types.int8), (torch.uint8, scalar_types.uint8), diff --git a/vllm/scalar_type.py b/vllm/scalar_type.py index 1d7675dda43a..da206e5906ac 100644 --- a/vllm/scalar_type.py +++ b/vllm/scalar_type.py @@ -322,7 +322,7 @@ class scalar_types: float6_e3m2f = ScalarType.float_(3, 2, True, NanRepr.NONE) # fp4, https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf - float4_e2m1fn = ScalarType.float_(2, 1, True, NanRepr.NONE) + float4_e2m1f = ScalarType.float_(2, 1, True, NanRepr.NONE) # "gptq" types uint2b2 = ScalarType.uint(2, 2)