Hipify global scrach defintion in AOTI codegen (#150893)

Summary: as title, a refactor is very needed I think .... or at least unify internal/external AOTI wrapper hipification method

Test Plan: P1780296121

Differential Revision: D72683568

Pull Request resolved: https://github.com/pytorch/pytorch/pull/150893
Approved by: https://github.com/davidberard98
This commit is contained in:
Zhuoran Zhao 2025-04-09 18:35:36 +00:00 committed by PyTorch MergeBot
parent d04a6ec021
commit d3a2872c67

View File

@ -440,7 +440,7 @@ class CppWrapperGpu(CppWrapperCpu):
is not None
):
global_scratch_def, global_scratch_var = global_scratch
code.writeline(global_scratch_def)
code.writeline(maybe_hipify_code_wrapper(global_scratch_def))
new_args.append(f"&{global_scratch_var}")
return ", ".join(new_args)