Skip to content

Commit 8415eb1

Browse files
committed
minor
Signed-off-by: realAsma <[email protected]>
1 parent c4c32ba commit 8415eb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modelopt/torch/quantization/tensor_quant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def scaled_e4m3_impl(
8080
Returns:
8181
Input tensors faked quantized to FP8.
8282
"""
83-
if inputs.is_cpu or amax is None or amax.squeeze().ndim > 1:
83+
if (not inputs.is_cuda) or amax is None or amax.squeeze().ndim > 1:
8484
return fp8_eager(inputs, amax)
8585

8686
cuda_ext_fp8 = get_cuda_ext_fp8(raise_if_failed=False)

0 commit comments

Comments
 (0)