From 27078affbe26b65d690d505f67178734d5c52629 Mon Sep 17 00:00:00 2001 From: LeiWang1999 Date: Tue, 29 Oct 2024 02:33:25 +0000 Subject: [PATCH] Refactor hipcc.py to support target specification in tvm_callback_hip_compile --- python/tvm/contrib/hipcc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tvm/contrib/hipcc.py b/python/tvm/contrib/hipcc.py index 40186d69dc53..9e0d88bcc743 100644 --- a/python/tvm/contrib/hipcc.py +++ b/python/tvm/contrib/hipcc.py @@ -106,8 +106,8 @@ def compile_hip(code, target_format="hsaco", arch=None, options=None, path_targe return data -@tvm._ffi.register_func("tvm_callback_hip_compile") -def tvm_callback_hip_compile(code): +@tvm._ffi.register_func +def tvm_callback_hip_compile(code, target): """use hipcc to generate fatbin code for better optimization""" hsaco = compile_hip(code, target_format="hsaco") return hsaco \ No newline at end of file