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

Allow all targets supported by ROCm. Fix signed vs. unsigned comparison. #149

Open
wants to merge 1 commit into
base: clang_tot_upgrade
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/Driver/ToolChains/Hcc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,10 @@ namespace

bool is_valid(const std::string& gfxip)
{
static constexpr std::array<const char*, 4u> valid = {
{ "gfx701", "gfx803", "gfx900", "gfx906" }};
static constexpr std::array<const char*, 8u> valid = {
{ "gfx701", "gfx702", "gfx801", "gfx802", "gfx803", "gfx900",
"gfx902", "gfx906" }
};

return std::find(valid.cbegin(), valid.cend(), gfxip) != valid.cend();
}
Expand Down Expand Up @@ -399,7 +401,7 @@ void HCC::CXXAMPLink::ConstructLinkerJob(
AMDGPUTargetVector = split_gfx_list(HCC_AMDGPU_TARGET, ' ');
}

const auto cnt = std::count(
const decltype(AMDGPUTargetVector.size()) cnt = std::count(
AMDGPUTargetVector.cbegin(), AMDGPUTargetVector.cend(), auto_tgt);

if (cnt > 1) C.getDriver().Diag(diag::warn_amdgpu_target_auto_nonsingular);
Expand Down