Replace hipLaunchKernel -> hipLaunchKernelGGL
Change-Id: I4d99009e1199811d417becf1e1b934ec4d4e30be
This commit is contained in:
@@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||
#include <cstdio>
|
||||
#include "hip/hip_runtime.h"
|
||||
|
||||
__global__ void Kernel(hipLaunchParm lp, volatile float* hostRes) {
|
||||
__global__ void Kernel(volatile float* hostRes) {
|
||||
int tid = threadIdx.x + blockIdx.x * blockDim.x;
|
||||
hostRes[tid] = tid + 1;
|
||||
__threadfence_system();
|
||||
@@ -45,7 +45,7 @@ int main() {
|
||||
hipHostMalloc((void**)&hostRes, blocks * sizeof(float), hipHostMallocMapped);
|
||||
hostRes[0] = 0;
|
||||
hostRes[1] = 0;
|
||||
hipLaunchKernel(HIP_KERNEL_NAME(Kernel), dim3(1), dim3(blocks), 0, 0, hostRes);
|
||||
hipLaunchKernelGGL(HIP_KERNEL_NAME(Kernel), dim3(1), dim3(blocks), 0, 0, hostRes);
|
||||
int eleCounter = 0;
|
||||
while (eleCounter < blocks) {
|
||||
// blocks until the value changes
|
||||
|
||||
Reference in New Issue
Block a user