Skip to content

Commit 7ba5cf4

Browse files
committed
[fix][SWDEV-413305][nvcc] Recovering the fallback building of HIP programs via nvcc - Step 2 - Minor refactoring
[IMP] + The unused variable `$hasCU` is left untouched in its place - probably there are someone's unfinished continuous changes to merge there + The same testing is done manually: the `nvcc` command line left almost the same, only the `-x cu` changed its place
1 parent 31d3146 commit 7ba5cf4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

amd/hipcc/bin/hipcc.pl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,9 @@ sub get_normalized_path {
450450
if ($HIP_PLATFORM eq "amd") {
451451
$hasHIP = 1;
452452
$toolArgs .= " -x hip";
453-
} else {
453+
} elsif ($HIP_PLATFORM eq "nvidia") {
454454
$hasCU = 1;
455+
$toolArgs .= " -x cu";
455456
}
456457
}
457458
}
@@ -532,10 +533,6 @@ sub get_normalized_path {
532533
$ENV{HCC_EXTRA_LIBRARIES}="\n";
533534
}
534535

535-
if ($HIP_PLATFORM eq 'nvidia') {
536-
$HIPCXXFLAGS .= " -x cu";
537-
}
538-
539536
if ($buildDeps and $HIP_PLATFORM eq 'nvidia') {
540537
$HIPCXXFLAGS .= " -M -D__CUDACC__";
541538
$HIPCFLAGS .= " -M -D__CUDACC__";

0 commit comments

Comments
 (0)