Fix cooperative group tests.

- `gm` should be a global variable instead of auto local variable.

Change-Id: Ibde1e54ee83fa5725f21820b4b792a97bf7df6ad


[ROCm/hip commit: 6bf6480283]
Este commit está contenido en:
Michael LIAO
2020-11-16 12:35:20 -05:00
cometido por Michael Hong Bin Liao
padre 5fff101394
commit c8278b9e47
Se han modificado 3 ficheros con 6 adiciones y 3 borrados
@@ -36,6 +36,8 @@ THE SOFTWARE.
using namespace cooperative_groups;
static __device__ int gm[2];
static __global__
void kernel_cg_grid_group_type(int *sizeTestD,
int *thdRankTestD,
@@ -55,7 +57,6 @@ void kernel_cg_grid_group_type(int *sizeTestD,
isValidTestD[gIdx] = gg.is_valid();
// Test sync
__device__ int gm[2];
if (blockIdx.x == 0 && threadIdx.x == 0)
gm[0] = 10;
else if (blockIdx.x == 1 && threadIdx.x == 0)
@@ -36,6 +36,8 @@ THE SOFTWARE.
using namespace cooperative_groups;
static __device__ int gm[2];
static __global__
void kernel_cg_grid_group_type_via_base_type(int *sizeTestD,
int *thdRankTestD,
@@ -55,7 +57,6 @@ void kernel_cg_grid_group_type_via_base_type(int *sizeTestD,
isValidTestD[gIdx] = tg.is_valid();
// Test sync
__device__ int gm[2];
if (blockIdx.x == 0 && threadIdx.x == 0)
gm[0] = 10;
else if (blockIdx.x == 1 && threadIdx.x == 0)
@@ -36,6 +36,8 @@ THE SOFTWARE.
using namespace cooperative_groups;
static __device__ int gm[2];
static __global__
void kernel_cg_grid_group_type_via_public_api(int *sizeTestD,
int *thdRankTestD,
@@ -55,7 +57,6 @@ void kernel_cg_grid_group_type_via_public_api(int *sizeTestD,
isValidTestD[gIdx] = is_valid(gg);
// Test sync api
__device__ int gm[2];
if (blockIdx.x == 0 && threadIdx.x == 0)
gm[0] = 10;
else if (blockIdx.x == 1 && threadIdx.x == 0)