Fix cooperative group tests.

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

Change-Id: Ibde1e54ee83fa5725f21820b4b792a97bf7df6ad
此提交包含在:
Michael LIAO
2020-11-16 12:35:20 -05:00
提交者 Michael Hong Bin Liao
父節點 d11027c522
當前提交 28e1fb0cf7
共有 3 個檔案被更改,包括 6 行新增3 行删除
+2 -1
查看文件
@@ -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)
+2 -1
查看文件
@@ -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)
+2 -1
查看文件
@@ -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)