From e92502c471c4ba677c58ff487e64ca7a759ee407 Mon Sep 17 00:00:00 2001 From: agunashe <86270081+agunashe@users.noreply.github.com> Date: Wed, 13 Apr 2022 23:44:35 -0700 Subject: [PATCH] Revert "SWDEV-326661 - hipcc/hipconfig to use return value from pl scripts, disabling deviceLib. (#2584)" (#2625) This reverts commit cc9c81184f92f8ab95e539587f20f1a78a2a4f72. [ROCm/hip commit: 042c5ee5e618e6582ff87ccae989e85ed3864f76] --- projects/hip/bin/hipcc | 26 +++++--------------------- projects/hip/bin/hipconfig | 26 +++++--------------------- 2 files changed, 10 insertions(+), 42 deletions(-) diff --git a/projects/hip/bin/hipcc b/projects/hip/bin/hipcc index 552c44dda7..32494dd345 100755 --- a/projects/hip/bin/hipcc +++ b/projects/hip/bin/hipcc @@ -22,6 +22,7 @@ # Need perl > 5.10 to use logic-defined or use 5.006; use v5.10.1; +use strict; use warnings; use File::Basename; @@ -34,30 +35,13 @@ my $SCRIPT_DIR=dirname(__FILE__); if ($HIPCC_USE_PERL_SCRIPT) { #Invoke hipcc.pl my $HIPCC_PERL=catfile($SCRIPT_DIR, '/hipcc.pl'); - system("$^X $HIPCC_PERL @ARGV"); + exec($^X, $HIPCC_PERL, @ARGV); } else { - $isWindows = ($^O eq 'MSWin32' or $^O eq 'msys'); - $BIN_NAME="/hipcc.bin"; - if ($isWindows) { - $BIN_NAME="/hipcc.bin.exe"; - } - my $HIPCC_BIN=catfile($SCRIPT_DIR, $BIN_NAME); + #Invoke hipcc.bin + my $HIPCC_BIN=catfile($SCRIPT_DIR, '/hipcc.bin'); if ( -e $HIPCC_BIN ) { - #Invoke hipcc.bin - my $output = qx($HIPCC_BIN @ARGV); - print ("$output\n"); + exec($HIPCC_BIN, @ARGV); } else { print "hipcc.bin not present; Install HIPCC binaries before proceeding"; - exit(-1); } } -if ($? == -1) { - exit($?); -} -elsif ($? & 127) { - exit($?); -} -else { - $CMD_EXIT_CODE = $? >> 8; -} -exit($CMD_EXIT_CODE); diff --git a/projects/hip/bin/hipconfig b/projects/hip/bin/hipconfig index 8789a52b45..8ed1ba6f10 100755 --- a/projects/hip/bin/hipconfig +++ b/projects/hip/bin/hipconfig @@ -22,6 +22,7 @@ # Need perl > 5.10 to use logic-defined or use 5.006; use v5.10.1; +use strict; use warnings; use File::Basename; @@ -34,30 +35,13 @@ my $SCRIPT_DIR=dirname(__FILE__); if ($HIPCONFIG_USE_PERL_SCRIPT) { #Invoke hipconfig.pl my $HIPCONFIG_PERL=catfile($SCRIPT_DIR, '/hipconfig.pl'); - system("$^X $HIPCONFIG_PERL @ARGV"); + exec($^X, $HIPCONFIG_PERL, @ARGV); } else { - $isWindows = ($^O eq 'MSWin32' or $^O eq 'msys'); - $BIN_NAME="/hipconfig.bin"; - if ($isWindows) { - $BIN_NAME="/hipconfig.bin.exe"; - } - my $HIPCONFIG_BIN=catfile($SCRIPT_DIR, $BIN_NAME); + #Invoke hipconfig.bin + my $HIPCONFIG_BIN=catfile($SCRIPT_DIR, '/hipconfig.bin'); if ( -e $HIPCONFIG_BIN ) { - #Invoke hipconfig.bin - my $output = qx($HIPCONFIG_BIN @ARGV); - print ("$output\n"); + exec($HIPCONFIG_BIN, @ARGV); } else { print "hipconfig.bin not present; Install HIPCC binaries before proceeding"; - exit(-1); } } -if ($? == -1) { - exit($?); -} -elsif ($? & 127) { - exit($?); -} -else { - $CMD_EXIT_CODE = $? >> 8; -} -exit($CMD_EXIT_CODE);