diff --git a/projects/hip/bin/hccgenco.sh b/projects/hip/bin/hccgenco.sh index a7b4177624..7f90cce83d 100755 --- a/projects/hip/bin/hccgenco.sh +++ b/projects/hip/bin/hccgenco.sh @@ -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 diff --git a/projects/hip/bin/hipcc b/projects/hip/bin/hipcc index 381c774c94..361517d551 100755 --- a/projects/hip/bin/hipcc +++ b/projects/hip/bin/hipcc @@ -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"; diff --git a/projects/hip/docs/markdown/hip_kernel_language.md b/projects/hip/docs/markdown/hip_kernel_language.md index 3fd4ea9aca..0c7f3c8d25 100644 --- a/projects/hip/docs/markdown/hip_kernel_language.md +++ b/projects/hip/docs/markdown/hip_kernel_language.md @@ -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```