Skip to content

Commit 764f5b0

Browse files
authored
Added __HIP_PLATFORM_AMD__=1 (#4570)
1 parent 3589cad commit 764f5b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

op_builder/builder.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,9 @@ def jit_load(self, verbose=True):
486486
cxx_args.append("-DBF16_AVAILABLE")
487487
nvcc_args.append("-DBF16_AVAILABLE")
488488

489+
if self.is_rocm_pytorch():
490+
cxx_args.append("-D__HIP_PLATFORM_AMD__=1")
491+
489492
op_module = load(name=self.name,
490493
sources=self.strip_empty_entries(sources),
491494
extra_include_paths=self.strip_empty_entries(extra_include_paths),

0 commit comments

Comments
 (0)