Skip to content

Commit 92ce6df

Browse files
committed
added regression script
1 parent fcbbbff commit 92ce6df

File tree

6 files changed

+328
-137
lines changed

6 files changed

+328
-137
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ LDFLAGS = --gpu-architecture=compute_70 --gpu-code=compute_70 -lcudart -I$(INC_D
3636
cutlass-test: $(obj)
3737
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
3838

39-
clean:
39+
clean:
4040
rm cutlass-test
4141
rm -rf gemm_tt_*
4242
rm -rf host_results_*

gemm-test/dgemm_tests.h

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1+
#ifdef DGEMM_1
12
typedef cutlass::gemm::DgemmTraits<cutlass::MatrixLayout::kColumnMajor,
23
cutlass::MatrixLayout::kRowMajor,
34
cutlass::Shape<8, 32, 64> > DGemmTraits1;
45
run_gemm<DGemmTraits1>(64, 32, 8);
6+
#endif
57

6-
7-
8+
#ifdef DGEMM_2
89
typedef cutlass::gemm::DgemmTraits<cutlass::MatrixLayout::kColumnMajor,
910
cutlass::MatrixLayout::kRowMajor,
1011
cutlass::Shape<8, 32, 64> > DGemmTraits2;
1112
run_gemm<DGemmTraits2>(256, 128, 64);
13+
#endif
1214

13-
14-
15+
#ifdef DGEMM_3
1516
typedef cutlass::gemm::DgemmTraits<cutlass::MatrixLayout::kColumnMajor,
1617
cutlass::MatrixLayout::kRowMajor,
1718
cutlass::Shape<8, 64, 64> > DGemmTraits3;
1819
run_gemm<DGemmTraits3>(64, 64, 8);
19-
20+
#endif

gemm-test/gemm.h

+13-6
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,21 @@ static void run_gemm(
8383

8484
Gemm::launch(params);
8585

86-
cudaError_t result = cudaDeviceSynchronize();
87-
if(result==cudaSuccess){
88-
printf("Successfully Launched\n");
89-
}
90-
int save=0;
86+
87+
cudaError_t result;
88+
do
89+
{
90+
result = cudaDeviceSynchronize();
91+
}while(result!=cudaSuccess);
92+
printf("Successfully Launched\n");
93+
94+
int save=1;
9195
int completedsuccessfully=testbed.verify_with_host(save,save);
9296
if (completedsuccessfully==1){
93-
printf("Result Verified\n");
97+
printf("Result Verified\n");
98+
}
99+
else{
100+
printf("ERROR");
94101
}
95102

96103
}

gemm-test/sgemm_tests.h

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1+
#ifdef SGEMM_1
12
typedef cutlass::gemm::SgemmTraits<cutlass::MatrixLayout::kColumnMajor,
23
cutlass::MatrixLayout::kRowMajor, cutlass::Shape<8, 128, 128> >
34
SgemmTraits1;
45
run_gemm<SgemmTraits1>(1024, 512, 8);
6+
#endif
57

6-
8+
#ifdef SGEMM_2
79
typedef cutlass::gemm::SgemmTraits<cutlass::MatrixLayout::kColumnMajor,
810
cutlass::MatrixLayout::kRowMajor, cutlass::Shape<8, 128, 128> >
911
SgemmTraits2;
1012
run_gemm<SgemmTraits2>(128, 81, 1);
13+
#endif
1114

12-
15+
#ifdef SGEMM_3
1316
typedef cutlass::gemm::SgemmTraits<cutlass::MatrixLayout::kColumnMajor,
1417
cutlass::MatrixLayout::kRowMajor, cutlass::Shape<8, 128, 128> >
1518
SgemmTraits3;
1619
run_gemm<SgemmTraits3>(128, 112, 8);
20+
#endif

0 commit comments

Comments
 (0)