Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added __HIP_PLATFORM_AMD__=1 for non JIT build #4585

Merged
merged 7 commits into from
Nov 8, 2023
3 changes: 3 additions & 0 deletions op_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,9 @@ def builder(self):
if not self.build_for_cpu and self.enable_bf16:
compile_args['cxx'].append("-DBF16_AVAILABLE")

if self.is_rocm_pytorch():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rraminen - do we need both this change and the one in #4570?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that #4585 is for non-JIT builds and #4570 is for JIT builds. So both of them are required. Please correct me if wrong.

compile_args['cxx'].append("-D__HIP_PLATFORM_AMD__=1")

cuda_ext = ExtensionBuilder(name=self.absolute_name(),
sources=self.strip_empty_entries(self.sources()),
include_dirs=self.strip_empty_entries(self.include_paths()),
Expand Down