Skip to content

Commit

Permalink
Fix hipRTC build options for hip kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
junliume committed Aug 8, 2023
1 parent 1d07f0f commit ad31778
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/comgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,9 @@ void BuildAsm(const std::string& name,

#define WORKAROUND_ISSUE_HIPRTC_HIPRTC_HEADER_H 1 // See SWDEV-307838, issue #1648.
#define WORKAROUND_ISSUE_1674 (HIP_PACKAGE_VERSION_FLAT >= 5003022305ULL)
/// No assumption that HIP kernels are launched with uniform block size for backward compatibility
/// SWDEV-413293 and https://reviews.llvm.org/D155213
#define WORKAROUND_SWDEV -413293(HIP_PACKAGE_VERSION_FLAT >= 5007000000ULL)

namespace hiprtc {

Expand Down Expand Up @@ -1314,6 +1317,9 @@ void BuildHip(const std::string& name,
opts.push_back("-Wno-cuda-compat");
opts.push_back("-fno-gpu-rdc");
opts.push_back("-O3");
#if WORKAROUND_SWDEV - 413293
opts.push_back("-fno-offload-uniform-block");
#endif
if(std::none_of(opts.begin(), opts.end(), [](const std::string& s) {
return StartsWith(s, "--std=") || StartsWith(s, "-std=");
}))
Expand Down

0 comments on commit ad31778

Please sign in to comment.