SWDEV-339657 - Update catch codes with correct coordinates (#2735)
Change-Id: I8ca78d770a742bf6c2abede494759caa923fcc19
Tento commit je obsažen v:
odevzdal
GitHub
rodič
0b05268be2
revize
d31aca651d
@@ -57,7 +57,7 @@ Testcase Scenarios :
|
||||
* Kernel Functions to copy.
|
||||
*/
|
||||
static __global__ void copy_ker_func(int* a, int* b) {
|
||||
int tx = hipBlockIdx_x*hipBlockDim_x + hipThreadIdx_x;
|
||||
int tx = blockIdx.x*blockDim.x + threadIdx.x;
|
||||
if (tx < LEN) b[tx] = a[tx];
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ THE SOFTWARE.
|
||||
#include <hip_test_common.hh>
|
||||
// Kernel function
|
||||
__global__ void MemPrftchAsyncKernel(int* C_d, const int* A_d, size_t N) {
|
||||
size_t offset = (hipBlockIdx_x * hipBlockDim_x + hipThreadIdx_x);
|
||||
size_t stride = hipBlockDim_x * hipGridDim_x;
|
||||
size_t offset = (blockIdx.x * blockDim.x + threadIdx.x);
|
||||
size_t stride = blockDim.x * gridDim.x;
|
||||
for (size_t i = offset; i < N; i += stride) {
|
||||
C_d[i] = A_d[i] * A_d[i];
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ THE SOFTWARE.
|
||||
// Kernel function
|
||||
|
||||
__global__ void MemPrftchAsyncKernel1(int* Hmm, size_t N) {
|
||||
size_t offset = (hipBlockIdx_x * hipBlockDim_x + hipThreadIdx_x);
|
||||
size_t stride = hipBlockDim_x * hipGridDim_x;
|
||||
size_t offset = (blockIdx.x * blockDim.x + threadIdx.x);
|
||||
size_t stride = blockDim.x * gridDim.x;
|
||||
for (size_t i = offset; i < N; i += stride) {
|
||||
Hmm[i] = Hmm[i] * Hmm[i];
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ texture<TYPE_t, 2, hipReadModeElementType> tex;
|
||||
|
||||
// texture object is a kernel argument
|
||||
static __global__ void texture2dCopyKernel(TYPE_t* dst) {
|
||||
int x = hipThreadIdx_x + hipBlockIdx_x * hipBlockDim_x;
|
||||
int y = hipThreadIdx_y + hipBlockIdx_y * hipBlockDim_y;
|
||||
int x = threadIdx.x + blockIdx.x * blockDim.x;
|
||||
int y = threadIdx.y + blockIdx.y * blockDim.y;
|
||||
if ( (x < SIZE_W) && (y < SIZE_H) ) {
|
||||
dst[SIZE_W*y+x] = tex2D(tex, x, y);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ template<typename T>
|
||||
__global__ void normalizedValTextureTest(unsigned int numElements,
|
||||
float* pDst) {
|
||||
#if !defined(__HIP_NO_IMAGE_SUPPORT) || !__HIP_NO_IMAGE_SUPPORT
|
||||
unsigned int elementID = hipThreadIdx_x;
|
||||
unsigned int elementID = threadIdx.x;
|
||||
if (elementID >= numElements)
|
||||
return;
|
||||
float coord = elementID/static_cast<float>(numElements);
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele