Skip to content

Commit 95de761

Browse files
committed
fix bug
1 parent 1998d5a commit 95de761

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

paddle/fluid/operators/math/math_function_test.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,11 @@
1414
#include "paddle/fluid/operators/math/math_function.h"
1515
#include "gtest/gtest.h"
1616

17-
#include <iostream>
18-
1917
TEST(math_function, gemm_notrans_cblas) {
2018
paddle::framework::Tensor input1;
2119
paddle::framework::Tensor input2;
2220
paddle::framework::Tensor input3;
2321

24-
// fp16 GEMM in cublas requires GPU compute capability >= 53
25-
if (GetCUDAComputeCapability(0) >= 53) {
26-
std::cout << "Compute capability is " << GetCUDAComputeCapability(0)
27-
<< std::endl;
28-
return;
29-
}
30-
3122
int m = 2;
3223
int n = 3;
3324
int k = 3;

paddle/fluid/operators/math/math_function_test.cu

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#include "gtest/gtest.h"
1515
#include "paddle/fluid/operators/math/math_function.h"
1616

17-
#include <iostream>
18-
1917
void fill_fp16_data(paddle::platform::float16* in_ptr, size_t size,
2018
const std::vector<float>& data) {
2119
PADDLE_ENFORCE_EQ(size, data.size());
@@ -65,9 +63,7 @@ TEST(math_function, notrans_mul_trans_fp16) {
6563
using namespace paddle::platform;
6664

6765
// fp16 GEMM in cublas requires GPU compute capability >= 53
68-
if (GetCUDAComputeCapability(0) >= 53) {
69-
std::cout << "Compute capability is " << GetCUDAComputeCapability(0)
70-
<< std::endl;
66+
if (GetCUDAComputeCapability(0) < 53) {
7167
return;
7268
}
7369

@@ -149,7 +145,7 @@ TEST(math_function, trans_mul_notrans_fp16) {
149145
using namespace paddle::platform;
150146

151147
// fp16 GEMM in cublas requires GPU compute capability >= 53
152-
if (GetCUDAComputeCapability(0) >= 53) {
148+
if (GetCUDAComputeCapability(0) < 53) {
153149
return;
154150
}
155151

@@ -252,7 +248,7 @@ TEST(math_function, gemm_notrans_cublas_fp16) {
252248
using namespace paddle::platform;
253249

254250
// fp16 GEMM in cublas requires GPU compute capability >= 53
255-
if (GetCUDAComputeCapability(0) >= 53) {
251+
if (GetCUDAComputeCapability(0) < 53) {
256252
return;
257253
}
258254

@@ -364,7 +360,7 @@ TEST(math_function, gemm_trans_cublas_fp16) {
364360
using namespace paddle::platform;
365361

366362
// fp16 GEMM in cublas requires GPU compute capability >= 53
367-
if (GetCUDAComputeCapability(0) >= 53) {
363+
if (GetCUDAComputeCapability(0) < 53) {
368364
return;
369365
}
370366

0 commit comments

Comments
 (0)