Skip to content

Commit

Permalink
Added __HIP_PLATFORM_AMD__=1 (microsoft#4570)
Browse files Browse the repository at this point in the history
  • Loading branch information
rraminen authored and baodii committed Nov 7, 2023
1 parent d67b21a commit 72a0401
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions op_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,9 @@ def jit_load(self, verbose=True):
cxx_args.append("-DBF16_AVAILABLE")
nvcc_args.append("-DBF16_AVAILABLE")

if self.is_rocm_pytorch():
cxx_args.append("-D__HIP_PLATFORM_AMD__=1")

op_module = load(name=self.name,
sources=self.strip_empty_entries(sources),
extra_include_paths=self.strip_empty_entries(extra_include_paths),
Expand Down

0 comments on commit 72a0401

Please sign in to comment.