Support defaultDriver test with Clang+Hcc Runtime
Fix the following issues: 1.Ignore hidden arguments of kernel functions. 2.Look up both origial function name and function name with .kd postfix when argments are retrived from module. 3.Addition, fix compiling issue of LaunchKernel test app. Change-Id: I9400943f2f02433cb4409b19c0cac3626c2bc454
Esse commit está contido em:
@@ -20,7 +20,7 @@
|
||||
|
||||
/* HIT_START
|
||||
* BUILD_CMD: gpu.o %hc -I%hip-path/include -g -c %S/gpu.cpp -o %T/gpu.o EXCLUDE_HIP_PLATFORM nvcc vdi
|
||||
* BUILD_CMD: launchkernel.o %cc -D__HIP_PLATFORM_HCC__ -g -I%hip-path/include -c %S/LaunchKernel.c -o %T/launchkernel.o EXCLUDE_HIP_PLATFORM nvcc vdi
|
||||
* BUILD_CMD: launchkernel.o %hc -D__HIP_PLATFORM_HCC__ -g -I%hip-path/include -c %S/LaunchKernel.c -o %T/launchkernel.o EXCLUDE_HIP_PLATFORM nvcc vdi
|
||||
* BUILD_CMD: LaunchKernel %hc %T/launchkernel.o %T/gpu.o -g -Wl,--rpath=%hip-path/lib %hip-path/lib/libhip_hcc.so -o %T/%t DEPENDS gpu.o launchkernel.o EXCLUDE_HIP_PLATFORM nvcc vdi
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc vdi
|
||||
* HIT_END
|
||||
@@ -36,7 +36,7 @@ bool LaunchKernelArg()
|
||||
dim3 blocks = {1,1,1};
|
||||
dim3 threads = {1,1,1};
|
||||
|
||||
HIPCHECK(hipLaunchKernel(kernel, blocks, threads, NULL, 0, 0));
|
||||
HIPCHECK(hipLaunchKernel((const void *)kernel, blocks, threads, NULL, 0, 0));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ bool LaunchKernelArg1()
|
||||
HIPCHECK(hipMalloc((void**)&A_d, sizeof(int)));
|
||||
|
||||
void* Args[]={&A_d};
|
||||
HIPCHECK(hipLaunchKernel(kernel1, blocks, threads, Args, 0, 0));
|
||||
HIPCHECK(hipLaunchKernel((const void *)kernel1, blocks, threads, Args, 0, 0));
|
||||
|
||||
// Get the result back to host memory
|
||||
HIPCHECK(hipMemcpy(&A, A_d, sizeof(int), hipMemcpyDeviceToHost));
|
||||
@@ -84,7 +84,7 @@ bool LaunchKernelArg2()
|
||||
HIPCHECK(hipMemcpy(B_d, &B, sizeof(int), hipMemcpyHostToDevice));
|
||||
|
||||
void* Args[]={&A_d, &B_d};
|
||||
HIPCHECK(hipLaunchKernel(kernel2, blocks, threads, Args,0,0));
|
||||
HIPCHECK(hipLaunchKernel((const void *)kernel2, blocks, threads, Args,0,0));
|
||||
|
||||
// Get the result back to host memory
|
||||
HIPCHECK(hipMemcpy(&A, A_d, sizeof(int), hipMemcpyDeviceToHost));
|
||||
@@ -123,7 +123,7 @@ bool LaunchKernelArg3()
|
||||
HIPCHECK(hipMemcpy(B_d, &B, sizeof(int), hipMemcpyHostToDevice));
|
||||
|
||||
void* Args[]={&A_d, &B_d, &C_d};
|
||||
HIPCHECK(hipLaunchKernel(kernel3, blocks, threads, Args,0,0));
|
||||
HIPCHECK(hipLaunchKernel((const void *)kernel3, blocks, threads, Args,0,0));
|
||||
|
||||
// Get the result back to host memory
|
||||
HIPCHECK(hipMemcpy(&C, C_d, sizeof(int), hipMemcpyDeviceToHost));
|
||||
@@ -154,7 +154,7 @@ bool LaunchKernelArg4()
|
||||
struct things t = {2,20,200};
|
||||
|
||||
void* Args[]={&A_d, &c, &s, &i, &t};
|
||||
HIPCHECK(hipLaunchKernel(kernel4, blocks, threads, Args, 0, 0));
|
||||
HIPCHECK(hipLaunchKernel((const void *)kernel4, blocks, threads, Args, 0, 0));
|
||||
|
||||
// Get the result back to host memory
|
||||
HIPCHECK(hipMemcpy(&A, A_d, sizeof(int), hipMemcpyDeviceToHost));
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário