Merge 'master' into 'amd-master'
Change-Id: Ie333cd544b4450adf4f1abe0ebb36020324feb1b
[ROCm/hip commit: 7731f2c7c5]
This commit is contained in:
+26
-3
@@ -381,15 +381,35 @@ foreach $arg (@ARGV)
|
||||
open my $out, ">", $new_file or die "$new_file: $!";
|
||||
while (my $line = <$in>) {
|
||||
chomp $line;
|
||||
if ($line =~ m/\.a$/) {
|
||||
if ($line =~ m/\.a$/ || $line =~ m/\.lo$/) {
|
||||
my $libFile = $line;
|
||||
my $path = abs_path($line);
|
||||
my @objs = split ('\n', `cd $tmpdir; ar xv $path`);
|
||||
## Check if all files in .a are object files.
|
||||
my $allIsObj = 1;
|
||||
my $realObjs = "";
|
||||
foreach my $obj (@objs) {
|
||||
chomp $obj;
|
||||
$obj =~ s/^x - //;
|
||||
$obj = "$tmpdir/$obj";
|
||||
push (@inputs, $obj);
|
||||
$new_arg = "$new_arg $obj";
|
||||
my $fileType = `file $obj`;
|
||||
my $isObj = ($fileType =~ m/ELF/ or $fileType =~ m/COFF/);
|
||||
$allIsObj = ($allIsObj and $isObj);
|
||||
if ($isObj) {
|
||||
$realObjs = ($realObjs . " " . $obj);
|
||||
} else {
|
||||
push (@inputs, $obj);
|
||||
$new_arg = "$new_arg $obj";
|
||||
}
|
||||
}
|
||||
chomp $realObjs;
|
||||
if ($allIsObj) {
|
||||
print $out "$line\n";
|
||||
} elsif ($realObjs) {
|
||||
my($libBaseName, $libDir, $libExt) = fileparse($libFile);
|
||||
$libBaseName = mktemp($libBaseName . "XXXX") . $libExt;
|
||||
system("cd $tmpdir; ar c $libBaseName $realObjs");
|
||||
print $out "$tmpdir/$libBaseName\n";
|
||||
}
|
||||
} else {
|
||||
print $out "$line\n";
|
||||
@@ -606,6 +626,9 @@ if ($needLDFLAGS and not $compileOnly) {
|
||||
$CMD .= " $HIPLDFLAGS";
|
||||
}
|
||||
$CMD .= " $toolArgs";
|
||||
if ($needLDFLAGS and not $compileOnly and $HIP_PLATFORM eq "clang") {
|
||||
$CMD .= " -lgcc_s -lgcc";
|
||||
}
|
||||
|
||||
if ($verbose & 0x1) {
|
||||
print "hipcc-cmd: ", $CMD, "\n";
|
||||
|
||||
@@ -293,6 +293,12 @@ typedef enum hipDeviceAttribute_t {
|
||||
hipDeviceAttributeIntegrated, ///< iGPU
|
||||
} hipDeviceAttribute_t;
|
||||
|
||||
enum hipComputeMode {
|
||||
hipComputeModeDefault = 0,
|
||||
hipComputeModeExclusive = 1,
|
||||
hipComputeModeProhibited = 2,
|
||||
hipComputeModeExcusiveProcess = 3
|
||||
};
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -26,6 +26,7 @@ THE SOFTWARE.
|
||||
#include <hc.hpp>
|
||||
#include <hsa/hsa.h>
|
||||
#include <unordered_map>
|
||||
#include <stack>
|
||||
|
||||
#include "hsa/hsa_ext_amd.h"
|
||||
#include "hip/hip_runtime.h"
|
||||
|
||||
Referens i nytt ärende
Block a user