SWDEV-339113 - Update sampl codes with correct kernel coordinate (#2704)
Change-Id: Ibfc0fd285441cd3d79b312d2b739729a039a6f84
[ROCm/hip-tests commit: 5da168300f]
This commit is contained in:
committed by
GitHub
parent
f35a48c8fb
commit
eddb025028
@@ -28,11 +28,11 @@ __device__ float myDeviceGlobal;
|
||||
__device__ float myDeviceGlobalArray[16];
|
||||
|
||||
extern "C" __global__ void hello_world(const float* a, float* b) {
|
||||
int tx = hipThreadIdx_x;
|
||||
int tx = threadIdx.x;
|
||||
b[tx] = a[tx];
|
||||
}
|
||||
|
||||
extern "C" __global__ void test_globals(const float* a, float* b) {
|
||||
int tx = hipThreadIdx_x;
|
||||
int tx = threadIdx.x;
|
||||
b[tx] = a[tx] + myDeviceGlobal + myDeviceGlobalArray[tx % ARRAY_SIZE];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user