From 36b680988e1eb7015c236afaa7efee623c1c0e50 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Wed, 29 Nov 2017 21:49:10 +0000 Subject: [PATCH] Revert "Revert adoption of CUDA indexing in general - this can only work with later versions of the compiler, just like module based dispatch, and thus must be guarded against usage in earlier (e.g. 1.6) versions." This reverts commit f5aab36 [ROCm/hip-tests commit: 071b260cf6dfdb145691e01ffe2e544b7efa7ef7] --- projects/hip-tests/samples/0_Intro/square/square.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/hip-tests/samples/0_Intro/square/square.cu b/projects/hip-tests/samples/0_Intro/square/square.cu index ccaa9ae0bc..82b31db14a 100644 --- a/projects/hip-tests/samples/0_Intro/square/square.cu +++ b/projects/hip-tests/samples/0_Intro/square/square.cu @@ -40,8 +40,8 @@ template __global__ void vector_square(T *C_d, const T *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