mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 03:05:02 +08:00
[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>
This commit is contained in:
parent
02a4169193
commit
dc839ad03d
@ -83,26 +83,11 @@ def block_dequant(
|
||||
|
||||
|
||||
if current_platform.is_rocm():
|
||||
from triton.language import core
|
||||
|
||||
# NOTE: This can be removed when hip.libdevice.round() is available.
|
||||
@core.extern
|
||||
def round_f32(arg0, _builder=None):
|
||||
return core.extern_elementwise(
|
||||
"",
|
||||
"",
|
||||
[arg0],
|
||||
{
|
||||
(core.dtype("fp32"),): ("llvm.round", core.dtype("fp32")),
|
||||
(core.dtype("fp64"),): ("llvm.round", core.dtype("fp64")),
|
||||
},
|
||||
is_pure=True,
|
||||
_builder=_builder,
|
||||
)
|
||||
|
||||
@triton.jit
|
||||
def round_int8(x):
|
||||
return round_f32(x).to(tl.int8)
|
||||
return tl.extra.hip.libdevice.round(x).to(tl.int8)
|
||||
|
||||
else:
|
||||
|
||||
@triton.jit
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user