Replace hipLaunchKernel -> hipLaunchKernelGGL

Change-Id: I4d99009e1199811d417becf1e1b934ec4d4e30be
This commit is contained in:
Maneesh Gupta
2018-10-17 12:01:44 +05:30
parent c9e4ed1149
commit 52e320f396
78 changed files with 246 additions and 264 deletions
@@ -32,7 +32,7 @@ THE SOFTWARE.
#define LEN 1024 * 1024
#define SIZE LEN * sizeof(float)
__global__ void Add(hipLaunchParm lp, float* Ad, float* Bd, float* Cd) {
__global__ void Add(float* Ad, float* Bd, float* Cd) {
int tx = threadIdx.x + blockIdx.x * blockDim.x;
Cd[tx] = Ad[tx] + Bd[tx];
}
@@ -74,7 +74,7 @@ int main() {
dim3 dimGrid(LEN / 512, 1, 1);
dim3 dimBlock(512, 1, 1);
hipLaunchKernel(HIP_KERNEL_NAME(Add), dimGrid, dimBlock, 0, 0, Ad, Bd, Cd);
hipLaunchKernelGGL(HIP_KERNEL_NAME(Add), dimGrid, dimBlock, 0, 0, Ad, Bd, Cd);
HIPCHECK(
hipMemcpy(C, Cd, SIZE, hipMemcpyDeviceToHost)); // Note this really HostToHost not