replace code names with gfx names
Change-Id: I5e0b96a0b474b16cfa92077a30a5b80b7230254b
[ROCm/hip commit: a96821871f]
This commit is contained in:
@@ -10,7 +10,7 @@ if [ $# = 0 ]; then
|
||||
fi
|
||||
|
||||
: ${ROCM_PATH:=/opt/rocm}
|
||||
: ${ROCM_TARGET:=fiji}
|
||||
: ${ROCM_TARGET:=gfx803}
|
||||
|
||||
INPUT_FILES=""
|
||||
OUTPUT_FILE=""
|
||||
@@ -48,13 +48,14 @@ printf "\nint main(){}\n" >> $hipgenisa_main
|
||||
$HIP_PATH/bin/hipcc $hipgenisa_files -o $hipgenisa_dir/a.out
|
||||
mv dump* $hipgenisa_dir
|
||||
|
||||
hsaco_file="dump-$ROCM_TARGET.hsaco"
|
||||
map_sym=""
|
||||
kernels=$(objdump -t $hipgenisa_dir/dump-fiji.hsaco | grep grid_launch_parm | sed 's/ \+/ /g; s/\t/ /g' | cut -d" " -f6)
|
||||
kernels=$(objdump -t $hipgenisa_dir/$hsaco_file | grep grid_launch_parm | sed 's/ \+/ /g; s/\t/ /g' | cut -d" " -f6)
|
||||
for mangled_sym in $kernels; do
|
||||
real_sym=$(c++filt $(c++filt $mangled_sym | cut -d: -f3 | sed 's/_functor//g') | cut -d\( -f1)
|
||||
map_sym="--redefine-sym $mangled_sym=$real_sym $map_sym"
|
||||
done
|
||||
objcopy -F elf64-little $map_sym $hipgenisa_dir/dump-fiji.hsaco $OUTPUT_FILE
|
||||
objcopy -F elf64-little $map_sym $hipgenisa_dir/$hsaco_file $OUTPUT_FILE
|
||||
|
||||
rm $hipgenisa_files
|
||||
rm -r $hipgenisa_dir
|
||||
|
||||
@@ -92,7 +92,7 @@ if ($HIP_PLATFORM eq "hcc") {
|
||||
$HIP_ATP_MARKER=$ENV{'HIP_ATP_MARKER'} // 1;
|
||||
$marker_path = "$ROCM_PATH/profiler/CXLActivityLogger";
|
||||
|
||||
$ROCM_TARGET=$ENV{'ROCM_TARGET'} // "fiji";
|
||||
$ROCM_TARGET=$ENV{'ROCM_TARGET'} // "gfx803";
|
||||
|
||||
# HCC* may be used to compile src/hip_hcc.o (and also feed the HIPCXXFLAGS below)
|
||||
$HCC = "$HCC_HOME/bin/hcc";
|
||||
|
||||
@@ -680,7 +680,7 @@ The user can specify the target for which the binary can be generated. HIP/HCC d
|
||||
The file format for binary is `.co` which means Code Object. The following command builds the code object using `hipcc`.
|
||||
|
||||
`hipcc --genco --target-isa=[TARGET GPU] [INPUT FILE] -o [OUTPUT FILE]`
|
||||
```[TARGET GPU] = fiji/hawaii
|
||||
```[TARGET GPU] = gfx803/gfx701
|
||||
[INPUT FILE] = Name of the file containing kernels
|
||||
[OUTPUT FILE] = Name of the generated code object file```
|
||||
|
||||
|
||||
Verwijs in nieuw issue
Block a user