Skip to content

Commit 118d79a

Browse files
author
Jenkins
committed
SWDEV-299127 - Merge 'develop' into 'amd-staging'
Change-Id: Id62d80246bf513c1cd64ba85c60cfde6a816091d
2 parents cf417e5 + 0a478fb commit 118d79a

22 files changed

+979
-461
lines changed

bin/hipcc.pl

+1-115
Original file line numberDiff line numberDiff line change
@@ -393,121 +393,7 @@ BEGIN
393393
$swallowArg = 1;
394394
}
395395

396-
## process linker response file for hip-clang
397-
## extract object files from static library and pass them directly to
398-
## hip-clang in command line.
399-
## ToDo: Remove this after hip-clang switch to lto and lld is able to
400-
## handle clang-offload-bundler bundles.
401-
if (($arg =~ m/^-Wl,@/ or $arg =~ m/^@/) and
402-
$HIP_PLATFORM eq 'amd') {
403-
my @split_arg = (split /\@/, $arg); # arg will have options type(-Wl,@ or @) and filename
404-
my $file = $split_arg[1];
405-
open my $in, "<:encoding(utf8)", $file or die "$file: $!";
406-
my $new_arg = "";
407-
my $tmpdir = get_temp_dir ();
408-
my $new_file = "$tmpdir/response_file";
409-
open my $out, ">", $new_file or die "$new_file: $!";
410-
while (my $line = <$in>) {
411-
chomp $line;
412-
if ($line =~ m/\.a$/ || $line =~ m/\.lo$/) {
413-
my $libFile = $line;
414-
my $path = abs_path($line);
415-
my @objs = split ('\n', `cd $tmpdir; ar xv $path`);
416-
## Check if all files in .a are object files.
417-
my $allIsObj = 1;
418-
my $realObjs = "";
419-
foreach my $obj (@objs) {
420-
chomp $obj;
421-
$obj =~ s/^x - //;
422-
$obj = "$tmpdir/$obj";
423-
my $fileType = `file $obj`;
424-
my $isObj = ($fileType =~ m/ELF/ or $fileType =~ m/COFF/);
425-
$allIsObj = ($allIsObj and $isObj);
426-
if ($isObj) {
427-
$realObjs = ($realObjs . " " . $obj);
428-
} else {
429-
push (@inputs, $obj);
430-
$new_arg = "$new_arg $obj";
431-
}
432-
}
433-
chomp $realObjs;
434-
if ($allIsObj) {
435-
print $out "$line\n";
436-
} elsif ($realObjs) {
437-
my($libBaseName, $libDir, $libExt) = fileparse($libFile);
438-
$libBaseName = mktemp($libBaseName . "XXXX") . $libExt;
439-
system("cd $tmpdir; ar rc $libBaseName $realObjs");
440-
print $out "$tmpdir/$libBaseName\n";
441-
}
442-
} elsif ($line =~ m/\.o$/) {
443-
my $fileType = `file $line`;
444-
my $isObj = ($fileType =~ m/ELF/ or $fileType =~ m/COFF/);
445-
if ($isObj) {
446-
print $out "$line\n";
447-
} else {
448-
push (@inputs, $line);
449-
$new_arg = "$new_arg $line";
450-
}
451-
} else {
452-
print $out "$line\n";
453-
}
454-
}
455-
close $in;
456-
close $out;
457-
$arg = "$new_arg $split_arg[0]\@$new_file";
458-
$escapeArg = 0;
459-
} elsif (($arg =~ m/\.a$/ || $arg =~ m/\.lo$/) &&
460-
$HIP_PLATFORM eq 'amd') {
461-
## process static library for hip-clang
462-
## extract object files from static library and pass them directly to
463-
## hip-clang.
464-
## ToDo: Remove this after hip-clang switch to lto and lld is able to
465-
## handle clang-offload-bundler bundles.
466-
my $new_arg = "";
467-
my $tmpdir = get_temp_dir ();
468-
my $libFile = $arg;
469-
my $path = abs_path($arg);
470-
my @objs = split ('\n', `cd $tmpdir; ar xv $path`);
471-
## Check if all files in .a are object files.
472-
my $allIsObj = 1;
473-
my $realObjs = "";
474-
foreach my $obj (@objs) {
475-
chomp $obj;
476-
$obj =~ s/^x - //;
477-
$obj = "$tmpdir/$obj";
478-
my $fileType = `file $obj`;
479-
my $isObj = ($fileType =~ m/ELF/ or $fileType =~ m/COFF/);
480-
if ($fileType =~ m/ELF/) {
481-
my $sections = `$HIP_CLANG_PATH/llvm-readelf -e -W $obj`;
482-
$isObj = !($sections =~ m/__CLANG_OFFLOAD_BUNDLE__/);
483-
}
484-
$allIsObj = ($allIsObj and $isObj);
485-
if ($isObj) {
486-
$realObjs = ($realObjs . " " . $obj);
487-
} else {
488-
push (@inputs, $obj);
489-
if ($new_arg ne "") {
490-
$new_arg .= " ";
491-
}
492-
$new_arg .= "$obj";
493-
}
494-
}
495-
chomp $realObjs;
496-
if ($allIsObj) {
497-
$new_arg = $arg;
498-
} elsif ($realObjs) {
499-
my($libBaseName, $libDir, $libExt) = fileparse($libFile);
500-
$libBaseName = mktemp($libBaseName . "XXXX") . $libExt;
501-
system("cd $tmpdir; ar rc $libBaseName $realObjs");
502-
$new_arg .= " $tmpdir/$libBaseName";
503-
}
504-
$arg = "$new_arg";
505-
$escapeArg = 0;
506-
if ($toolArgs =~ m/-Xlinker$/) {
507-
$toolArgs = substr $toolArgs, 0, -8;
508-
chomp $toolArgs;
509-
}
510-
} elsif ($arg eq '-x') {
396+
if ($arg eq '-x') {
511397
$fileTypeFlag = 1;
512398
} elsif (($arg eq 'c' and $prevArg eq '-x') or ($arg eq '-xc')) {
513399
$fileTypeFlag = 1;

docs/markdown/hip_deprecated_api_list.md

+29-29
Original file line numberDiff line numberDiff line change
@@ -51,32 +51,32 @@ Should use roctracer/rocTX instead
5151

5252
## HIP Texture Management APIs
5353

54-
###hipGetTextureReference
55-
###hipTexRefSetAddressMode
56-
###hipTexRefSetArray
57-
###hipTexRefSetFilterMode
58-
###hipTexRefSetFlags
59-
###hipTexRefSetFormat
60-
###hipBindTexture
61-
###hipBindTexture2D
62-
###hipBindTextureToArray
63-
###hipGetTextureAlignmentOffset
64-
###hipUnbindTexture
65-
###hipTexRefGetAddress
66-
###hipTexRefGetAddressMode
67-
###hipTexRefGetFilterMode
68-
###hipTexRefGetFlags
69-
###hipTexRefGetFormat
70-
###hipTexRefGetMaxAnisotropy
71-
###hipTexRefGetMipmapFilterMode
72-
###hipTexRefGetMipmapLevelBias
73-
###hipTexRefGetMipmapLevelClamp
74-
###hipTexRefGetMipMappedArray
75-
###hipTexRefSetAddress
76-
###hipTexRefSetAddress2D
77-
###hipTexRefSetMaxAnisotropy
78-
###hipTexRefSetBorderColor
79-
###hipTexRefSetMipmapFilterMode
80-
###hipTexRefSetMipmapLevelBias
81-
###hipTexRefSetMipmapLevelClamp
82-
###hipTexRefSetMipmappedArray
54+
### hipGetTextureReference
55+
### hipTexRefSetAddressMode
56+
### hipTexRefSetArray
57+
### hipTexRefSetFilterMode
58+
### hipTexRefSetFlags
59+
### hipTexRefSetFormat
60+
### hipBindTexture
61+
### hipBindTexture2D
62+
### hipBindTextureToArray
63+
### hipGetTextureAlignmentOffset
64+
### hipUnbindTexture
65+
### hipTexRefGetAddress
66+
### hipTexRefGetAddressMode
67+
### hipTexRefGetFilterMode
68+
### hipTexRefGetFlags
69+
### hipTexRefGetFormat
70+
### hipTexRefGetMaxAnisotropy
71+
### hipTexRefGetMipmapFilterMode
72+
### hipTexRefGetMipmapLevelBias
73+
### hipTexRefGetMipmapLevelClamp
74+
### hipTexRefGetMipMappedArray
75+
### hipTexRefSetAddress
76+
### hipTexRefSetAddress2D
77+
### hipTexRefSetMaxAnisotropy
78+
### hipTexRefSetBorderColor
79+
### hipTexRefSetMipmapFilterMode
80+
### hipTexRefSetMipmapLevelBias
81+
### hipTexRefSetMipmapLevelClamp
82+
### hipTexRefSetMipmappedArray

0 commit comments

Comments
 (0)