|
14 | 14 | #include "gtest/gtest.h"
|
15 | 15 | #include "paddle/fluid/operators/math/math_function.h"
|
16 | 16 |
|
17 |
| -#include <iostream> |
18 |
| - |
19 | 17 | void fill_fp16_data(paddle::platform::float16* in_ptr, size_t size,
|
20 | 18 | const std::vector<float>& data) {
|
21 | 19 | PADDLE_ENFORCE_EQ(size, data.size());
|
@@ -65,9 +63,7 @@ TEST(math_function, notrans_mul_trans_fp16) {
|
65 | 63 | using namespace paddle::platform;
|
66 | 64 |
|
67 | 65 | // 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) { |
71 | 67 | return;
|
72 | 68 | }
|
73 | 69 |
|
@@ -149,7 +145,7 @@ TEST(math_function, trans_mul_notrans_fp16) {
|
149 | 145 | using namespace paddle::platform;
|
150 | 146 |
|
151 | 147 | // fp16 GEMM in cublas requires GPU compute capability >= 53
|
152 |
| - if (GetCUDAComputeCapability(0) >= 53) { |
| 148 | + if (GetCUDAComputeCapability(0) < 53) { |
153 | 149 | return;
|
154 | 150 | }
|
155 | 151 |
|
@@ -252,7 +248,7 @@ TEST(math_function, gemm_notrans_cublas_fp16) {
|
252 | 248 | using namespace paddle::platform;
|
253 | 249 |
|
254 | 250 | // fp16 GEMM in cublas requires GPU compute capability >= 53
|
255 |
| - if (GetCUDAComputeCapability(0) >= 53) { |
| 251 | + if (GetCUDAComputeCapability(0) < 53) { |
256 | 252 | return;
|
257 | 253 | }
|
258 | 254 |
|
@@ -364,7 +360,7 @@ TEST(math_function, gemm_trans_cublas_fp16) {
|
364 | 360 | using namespace paddle::platform;
|
365 | 361 |
|
366 | 362 | // fp16 GEMM in cublas requires GPU compute capability >= 53
|
367 |
| - if (GetCUDAComputeCapability(0) >= 53) { |
| 363 | + if (GetCUDAComputeCapability(0) < 53) { |
368 | 364 | return;
|
369 | 365 | }
|
370 | 366 |
|
|
0 commit comments