SWDEV-339113 - Update sampl codes with correct kernel coordinate (#2704)

Change-Id: Ibfc0fd285441cd3d79b312d2b739729a039a6f84

[ROCm/hip-tests commit: 5da168300f]
Esse commit está contido em:
ROCm CI Service Account
2022-06-02 17:07:52 +05:30
commit de GitHub
commit eddb025028
14 arquivos alterados com 47 adições e 47 exclusões
@@ -37,8 +37,8 @@ __global__ void matrixTranspose_static_shared(float* out, float* in,
const int width) {
__shared__ float sharedMem[WIDTH * WIDTH];
int x = hipBlockDim_x * hipBlockIdx_x + hipThreadIdx_x;
int y = hipBlockDim_y * hipBlockIdx_y + hipThreadIdx_y;
int x = blockDim.x * blockIdx.x + threadIdx.x;
int y = blockDim.y * blockIdx.y + threadIdx.y;
sharedMem[y * width + x] = in[x * width + y];
@@ -51,8 +51,8 @@ __global__ void matrixTranspose_dynamic_shared(float* out, float* in,
const int width) {
extern __shared__ float sharedMem[];
int x = hipBlockDim_x * hipBlockIdx_x + hipThreadIdx_x;
int y = hipBlockDim_y * hipBlockIdx_y + hipThreadIdx_y;
int x = blockDim.x * blockIdx.x + threadIdx.x;
int y = blockDim.y * blockIdx.y + threadIdx.y;
sharedMem[y * width + x] = in[x * width + y];