A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 11, 22:30 UTC
[CI/Build][AMD][Quantization] Fix test_int8_kernel.py by updating int8_utils to use hip.libdevice.round (#30151)
Signed-off-by: Randall Smith <ransmith@amd.com> Co-authored-by: Randall Smith <ransmith@amd.com>
rasmith committed
Dec 5, 2025 at 22:52 UTC
dc839ad03d31104c8ebcb0b8f5a75021f1796760
1 file changed
+2
-17
vllm/model_executor/layers/quantization/utils/int8_utils.py
+2
-17
@@ -83,26 +83,11 @@ def block_dequant(
83
84
85
if current_platform.is_rocm():
86
- from triton.language import core
87
-
88
- # NOTE: This can be removed when hip.libdevice.round() is available.
89
- @core.extern
90
- def round_f32(arg0, _builder=None):
91
- return core.extern_elementwise(
92
- "",
93
- "",
94
- [arg0],
95
- {
96
- (core.dtype("fp32"),): ("llvm.round", core.dtype("fp32")),
97
- (core.dtype("fp64"),): ("llvm.round", core.dtype("fp64")),
98
- },
99
- is_pure=True,
100
- _builder=_builder,
101
- )
86
87
@triton.jit
88
def round_int8(x):
105
- return round_f32(x).to(tl.int8)
89
+ return tl.extra.hip.libdevice.round(x).to(tl.int8)
90
+
91
else:
92
93
@triton.jit