Revert "SWDEV-326661 - hipcc/hipconfig to use return value from pl scripts, disabling deviceLib. (#2584)" (#2625)

This reverts commit cc9c81184f.

[ROCm/hip commit: 042c5ee5e6]
此提交包含在:
agunashe
2022-04-13 23:44:35 -07:00
提交者 GitHub
父節點 ef67edd191
當前提交 e92502c471
共有 2 個檔案被更改,包括 10 行新增42 行删除
+5 -21
查看文件
@@ -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);
+5 -21
查看文件
@@ -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);