Fixed half2 issue on gfx900

[ROCm/clr commit: 20947f80fb]
Bu işleme şunda yer alıyor:
Rahul Garg
2017-11-15 18:52:59 +05:30
ebeveyn a857b650ad
işleme c3ba309562
2 değiştirilmiş dosya ile 21 ekleme ve 13 silme
+1
Dosyayı Görüntüle
@@ -439,6 +439,7 @@ if($HIP_PLATFORM eq "hcc"){
if ($target_gfx900 eq 1) {
$HIPLDFLAGS .= " --amdgpu-target=gfx900";
$HIPCXXFLAGS .= " -D__HIP_ARCH_GFX900__=1 ";
$ENV{HCC_EXTRA_LIBRARIES_GFX900}="$HIP_PATH/lib/hip_hc_gfx803.ll\n";
}
}
+20 -13
Dosyayı Görüntüle
@@ -19,13 +19,14 @@ THE SOFTWARE.
#include <iostream>
#include <hip/hip_fp16.h>
#include "hip/hip_runtime_api.h"
#include "hip/hip_runtime.h"
#include "test_common.h"
#define LEN 64
#define HALF_SIZE 64*sizeof(__half)
#define HALF2_SIZE 64*sizeof(__half2)
#if __HIP_ARCH_GFX803__ > 0
#if __HIP_ARCH_GFX803__ || __HIP_ARCH_GFX803__
__global__ void __halfMath(hipLaunchParm lp, __half *A, __half *B, __half *C) {
int tx = hipThreadIdx_x;
@@ -61,15 +62,21 @@ __global__ void __half2Math(hipLaunchParm lp, __half2 *A, __half2 *B, __half2 *C
#endif
int main(){
__half *A, *B, *C;
hipMalloc(&A, HALF_SIZE);
hipMalloc(&B, HALF_SIZE);
hipMalloc(&C, HALF_SIZE);
hipLaunchKernel(__halfMath, dim3(1,1,1), dim3(LEN,1,1), 0, 0, A, B, C);
__half2 *A2, *B2, *C2;
hipMalloc(&A, HALF2_SIZE);
hipMalloc(&B, HALF2_SIZE);
hipMalloc(&C, HALF2_SIZE);
hipLaunchKernel(__half2Math, dim3(1,1,1), dim3(LEN,1,1), 0, 0, A2, B2, C2);
__half *A, *B, *C;
hipMalloc(&A, HALF_SIZE);
hipMalloc(&B, HALF_SIZE);
hipMalloc(&C, HALF_SIZE);
hipLaunchKernel(__halfMath, dim3(1,1,1), dim3(LEN,1,1), 0, 0, A, B, C);
hipFree(A);
hipFree(B);
hipFree(C);
__half2 *A2, *B2, *C2;
hipMalloc(&A2, HALF2_SIZE);
hipMalloc(&B2, HALF2_SIZE);
hipMalloc(&C2, HALF2_SIZE);
hipLaunchKernel(__half2Math, dim3(1,1,1), dim3(LEN,1,1), 0, 0, A2, B2, C2);
hipFree(A2);
hipFree(B2);
hipFree(C2);
passed();
}