[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:
rasmith 2025-12-05 22:52:11 -06:00 committed by GitHub
parent 02a4169193
commit dc839ad03d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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