diff --git a/projects/hip/bin/hipcc b/projects/hip/bin/hipcc index 5b25d01fcf..d2fa9a2306 100755 --- a/projects/hip/bin/hipcc +++ b/projects/hip/bin/hipcc @@ -156,6 +156,8 @@ $target_gfx802 = 0; $target_gfx803 = 0; $target_gfx900 = 0; $target_gfx906 = 0; +$target_gfx1010 = 0; +$target_gfx1012 = 0; $default_amdgpu_target = 1; if ($HIP_PLATFORM eq "clang") { @@ -427,6 +429,16 @@ foreach $arg (@ARGV) $target_gfx906 = 1; $default_amdgpu_target = 0; } + if($arg eq '--amdgpu-target=gfx1010') + { + $target_gfx1010 = 1; + $default_amdgpu_target = 0; + } + if($arg eq '--amdgpu-target=gfx1012') + { + $target_gfx1012 = 1; + $default_amdgpu_target = 0; + } # hip-clang does not accept --amdgpu-target= options. if (($arg =~ /--amdgpu-target=/) and $HIP_PLATFORM eq 'clang' ) { @@ -658,6 +670,16 @@ if($HIP_PLATFORM eq "hcc" or $HIP_PLATFORM eq "clang"){ $target_gfx906 = 1; $default_amdgpu_target = 0; } + if($target eq 'gfx1010') + { + $target_gfx1010 = 1; + $default_amdgpu_target = 0; + } + if($target eq 'gfx1012') + { + $target_gfx1012 = 1; + $default_amdgpu_target = 0; + } } } # Else try using rocm_agent_enumerator @@ -693,6 +715,16 @@ if($HIP_PLATFORM eq "hcc" or $HIP_PLATFORM eq "clang"){ $target_gfx906 = 1; $default_amdgpu_target = 0; } + if($val eq 'gfx1010') + { + $target_gfx1010 = 1; + $default_amdgpu_target = 0; + } + if($val eq 'gfx1012') + { + $target_gfx1012 = 1; + $default_amdgpu_target = 0; + } } } # rocm_agent_enumerator failed! Throw an error and die if linking is required @@ -757,6 +789,22 @@ if($HIP_PLATFORM eq "hcc" or $HIP_PLATFORM eq "clang"){ } $HIPCXXFLAGS .= " -D__HIP_ARCH_GFX906__=1 "; } + if ($target_gfx1010 eq 1) { + $GPU_ARCH_ARG = $GPU_ARCH_OPT . "gfx1010"; + $HIPLDFLAGS .= $GPU_ARCH_ARG; + if ($HIP_PLATFORM eq 'clang') { + $HIPCXXFLAGS .= $GPU_ARCH_ARG;; + } + $HIPCXXFLAGS .= " -D__HIP_ARCH_GFX1010__=1 "; + } + if ($target_gfx1012 eq 1) { + $GPU_ARCH_ARG = $GPU_ARCH_OPT . "gfx1012"; + $HIPLDFLAGS .= $GPU_ARCH_ARG; + if ($HIP_PLATFORM eq 'clang') { + $HIPCXXFLAGS .= $GPU_ARCH_ARG;; + } + $HIPCXXFLAGS .= " -D__HIP_ARCH_GFX1012__=1 "; + } } if ($hasC and $HIP_PLATFORM eq 'nvcc') { diff --git a/projects/hip/tests/src/runtimeApi/module/vcpy_kernel.code b/projects/hip/tests/src/runtimeApi/module/vcpy_kernel.code old mode 100755 new mode 100644 index 4246151be1..40894f972a Binary files a/projects/hip/tests/src/runtimeApi/module/vcpy_kernel.code and b/projects/hip/tests/src/runtimeApi/module/vcpy_kernel.code differ