Add GFX908 specific changes to HIP (#1229)

* Add GFX908 specific for HIP

* Fix missing __halfTest in hipTestNativeHalf
This commit is contained in:
Aaron Enye Shi
2019-07-24 03:51:17 -04:00
committed by Maneesh Gupta
parent 75abc65e12
commit b754de37c1
8 changed files with 30 additions and 7 deletions
+23
View File
@@ -156,6 +156,7 @@ $target_gfx802 = 0;
$target_gfx803 = 0;
$target_gfx900 = 0;
$target_gfx906 = 0;
$target_gfx908 = 0;
$target_gfx1010 = 0;
$target_gfx1012 = 0;
$default_amdgpu_target = 1;
@@ -429,6 +430,11 @@ foreach $arg (@ARGV)
$target_gfx906 = 1;
$default_amdgpu_target = 0;
}
if($arg eq '--amdgpu-target=gfx908')
{
$target_gfx908 = 1;
$default_amdgpu_target = 0;
}
if($arg eq '--amdgpu-target=gfx1010')
{
$target_gfx1010 = 1;
@@ -670,6 +676,11 @@ if($HIP_PLATFORM eq "hcc" or $HIP_PLATFORM eq "clang"){
$target_gfx906 = 1;
$default_amdgpu_target = 0;
}
if($target eq 'gfx908')
{
$target_gfx908 = 1;
$default_amdgpu_target = 0;
}
if($target eq 'gfx1010')
{
$target_gfx1010 = 1;
@@ -715,6 +726,10 @@ if($HIP_PLATFORM eq "hcc" or $HIP_PLATFORM eq "clang"){
$target_gfx906 = 1;
$default_amdgpu_target = 0;
}
if($val eq "gfx908") {
$target_gfx908 = 1;
$default_amdgpu_target = 0;
}
if($val eq 'gfx1010')
{
$target_gfx1010 = 1;
@@ -789,6 +804,14 @@ if($HIP_PLATFORM eq "hcc" or $HIP_PLATFORM eq "clang"){
}
$HIPCXXFLAGS .= " -D__HIP_ARCH_GFX906__=1 ";
}
if ($target_gfx908 eq 1) {
$GPU_ARCH_ARG = $GPU_ARCH_OPT . "gfx908";
$HIPLDFLAGS .= $GPU_ARCH_ARG;
if ($HIP_PLATFORM eq 'clang') {
$HIPCXXFLAGS .= $GPU_ARCH_ARG;;
}
$HIPCXXFLAGS .= " -D__HIP_ARCH_GFX908__=1 ";
}
if ($target_gfx1010 eq 1) {
$GPU_ARCH_ARG = $GPU_ARCH_OPT . "gfx1010";
$HIPLDFLAGS .= $GPU_ARCH_ARG;