SWDEV-341956 - update HIP Dtest with correct coordinates (#2755)

Change-Id: Iaccc4251a984e690d680ce884c6bfcc1093703af

[ROCm/hip commit: 2667f3e225]
This commit is contained in:
ROCm CI Service Account
2022-06-30 13:29:27 +05:30
committed by GitHub
parent 47a1198e18
commit da2888b9c4
11 changed files with 24 additions and 24 deletions
@@ -33,8 +33,8 @@ texture<TYPE_t, 2, hipReadModeElementType> tex;
// texture object is a kernel argument
__global__ void texture2dCopyKernel( TYPE_t* dst) {
#if !defined(__HIP_NO_IMAGE_SUPPORT) || !__HIP_NO_IMAGE_SUPPORT
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);
}
@@ -60,7 +60,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 =(float) elementID/numElements;