Skip to content

Commit bf47397

Browse files
authored
Merge pull request #859 from hedaoyuan/fix_warning
Fix warning
2 parents 1c26ce2 + 72bb211 commit bf47397

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

paddle/math/Matrix.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ class Matrix : public BaseMatrix {
408408
LOG(FATAL) << "Not implemented";
409409
}
410410

411-
virtual void addBias(Matrix& b, real scale, bool sharedBias) {
411+
void addBias(Matrix& b, real scale, bool sharedBias) {
412412
if (!sharedBias) {
413413
addBias(b, scale);
414414
} else {
@@ -425,7 +425,7 @@ class Matrix : public BaseMatrix {
425425
LOG(FATAL) << "Not implemented";
426426
}
427427

428-
virtual void collectBias(Matrix& a, real scale, bool sharedBias) {
428+
void collectBias(Matrix& a, real scale, bool sharedBias) {
429429
if (!sharedBias) {
430430
collectBias(a, scale);
431431
} else {

paddle/math/tests/CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ add_simple_unittest(test_CpuGpuVector)
1616
add_simple_unittest(test_Allocator)
1717

1818
if(WITH_GPU)
19-
if(COMPILER_SUPPORT_CXX11)
20-
CUDA_ADD_EXECUTABLE(test_Tensor test_Tensor.cu)
21-
link_paddle_test(test_Tensor)
22-
CUDA_ADD_EXECUTABLE(test_lazyAssign test_lazyAssign.cu)
23-
link_paddle_test(test_lazyAssign)
24-
endif()
19+
CUDA_ADD_EXECUTABLE(test_Tensor test_Tensor.cu)
20+
link_paddle_test(test_Tensor)
21+
CUDA_ADD_EXECUTABLE(test_lazyAssign test_lazyAssign.cu)
22+
link_paddle_test(test_lazyAssign)
2523
else()
2624
compile_cu_as_cpp(test_Tensor.cu)
2725
add_unittest(test_Tensor test_Tensor.cu)

0 commit comments

Comments
 (0)