File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,11 @@ sub get_normalized_path {
267267 $trimarg =~ s / ^\s +|\s +$// g ; # Remive whitespace
268268 my $swallowArg = 0;
269269 my $escapeArg = 1;
270+ if ($HIP_PLATFORM eq " nvidia" ) {
271+ if (($trimarg =~ / --rocm-path/ ) or ($trimarg =~ / --hip-path/ )) {
272+ next ;
273+ }
274+ }
270275 if ($arg eq ' -c' or $arg eq ' --genco' or $arg eq ' -E' ) {
271276 $compileOnly = 1;
272277 $needLDFLAGS = 0;
Original file line number Diff line number Diff line change @@ -396,7 +396,10 @@ void HipBinNvidia::executeHipCCCmd(vector<string> argv) {
396396 for (unsigned int i = 2 ; i < argv.size (); i++) {
397397 string isaarg = argv.at (i);
398398 ISACMD += " " ;
399- if (!hipBinUtilPtr_->substringPresent (isaarg," --rocm-path=" )) {
399+ if (hipBinUtilPtr_->substringPresent (isaarg," --rocm-path=" ) ||
400+ hipBinUtilPtr_->substringPresent (isaarg," --hip-path=" )) {
401+ ISACMD += " -I" + hipBinUtilPtr_->splitStr (isaarg, ' =' )[1 ] + " /include" ;
402+ } else {
400403 ISACMD += isaarg;
401404 }
402405 }
@@ -417,6 +420,12 @@ void HipBinNvidia::executeHipCCCmd(vector<string> argv) {
417420 string trimarg = hipBinUtilPtr_->replaceRegex (arg, toRemove, " " );
418421 bool swallowArg = false ;
419422 bool escapeArg = true ;
423+ // do not pass amd paths to nvcc
424+ if (hipBinUtilPtr_->substringPresent (arg," --rocm-path=" ) ||
425+ hipBinUtilPtr_->substringPresent (arg," --hip-path=" )) {
426+ continue ;
427+ }
428+
420429 if (arg == " -c" || arg == " --genco" || arg == " -E" ) {
421430 compileOnly = true ;
422431 needLDFLAGS = false ;
You can’t perform that action at this time.
0 commit comments