Skip to content

Commit

Permalink
fix(dnn): change ci to cudnn804, reopen testcase
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 90713a801b4d70df0d1da2e00fda5c2b62df6dcd
  • Loading branch information
megvii-mge committed Apr 8, 2021
1 parent c338e87 commit 14a089c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 25 deletions.
18 changes: 0 additions & 18 deletions src/gopt/test/inference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1959,8 +1959,6 @@ TEST(TestEnableTensorCore, Nchw4Nchw) {
}
#endif

//! close for cu111 ci, reopen it when bug fixed
#if CUDA_VERSION < 11000
TEST(TestEnableTensorCore, ConvBiasWithZ) {
REQUIRE_GPU(1);
auto cn = CompNode::load("gpu0");
Expand Down Expand Up @@ -2023,10 +2021,7 @@ TEST(TestEnableTensorCore, ConvBiasWithZ) {
func->execute();
MGB_ASSERT_TENSOR_EQ(host_y, host_y_opt);
}
#endif

//! close for cu111 ci, reopen it when bug fixed
#if CUDA_VERSION < 11000
TEST(TestEnableTensorCore, Pooling) {
REQUIRE_GPU(1);
auto cn = CompNode::load("gpu0");
Expand Down Expand Up @@ -2094,7 +2089,6 @@ TEST(TestEnableTensorCore, Pooling) {
func->execute();
MGB_ASSERT_TENSOR_EQ(host_y, host_y_opt);
}
#endif

TEST(TestGoptInference, EnableTensorCore) {
REQUIRE_GPU(1);
Expand Down Expand Up @@ -2296,8 +2290,6 @@ TEST(FuseConvBiasZPass, BlockFuse) {
}
#endif

//! close for cu111 ci, reopen it when bug fixed
#if CUDA_VERSION < 11000
TEST(TestEnableTensorCore, ShuffleMerge) {
REQUIRE_GPU(1);
auto cn = CompNode::load("gpu0");
Expand Down Expand Up @@ -2391,7 +2383,6 @@ TEST(TestEnableTensorCore, ShuffleMerge) {
func->execute();
MGB_ASSERT_TENSOR_EQ(host_y, host_y_opt);
}
#endif

#endif

Expand Down Expand Up @@ -2575,8 +2566,6 @@ TEST(TestGoptInference, EnableCHWN4) {
}
#endif

//! close for cu111 ci, reopen it when bug fixed
#if CUDA_VERSION < 11000
TEST(TestGoptInference, EnableCHWN4WarpPespective) {
REQUIRE_GPU(1);
auto cn = CompNode::load("gpu0");
Expand Down Expand Up @@ -2664,7 +2653,6 @@ TEST(TestGoptInference, EnableCHWN4WarpPespective) {
func->execute();
MGB_ASSERT_TENSOR_EQ(host_y, host_y_opt);
}
#endif

TEST(TestGoptInference, EnableCHWN4Pooling) {
REQUIRE_GPU(1);
Expand Down Expand Up @@ -2754,8 +2742,6 @@ TEST(TestGoptInference, EnableCHWN4Pooling) {
MGB_ASSERT_TENSOR_EQ(host_y, host_y_opt);
}

//! close for cu111 ci, reopen it when bug fixed
#if CUDA_VERSION < 11000
TEST(TestGoptInference, EnableCHWN4ShuffleRemove) {
REQUIRE_GPU(1);
auto cn = CompNode::load("gpu0");
Expand Down Expand Up @@ -2878,7 +2864,6 @@ TEST(TestGoptInference, EnableCHWN4ShuffleRemove) {
func->execute();
MGB_ASSERT_TENSOR_EQ(host_y, host_y_opt);
}
#endif

TEST(TestGoptInference, ConvertFormatNCHW4GPU) {
REQUIRE_GPU(1);
Expand Down Expand Up @@ -3977,8 +3962,6 @@ TEST(TestGoptInference, FoldingConvDimshuffle) {
func->execute();
}

//! close for cu111 ci, reopen it when bug fixed
#if CUDA_VERSION < 11000
TEST(TestGoptInference, FoldingConvDimshuffleNCHW4NCHW32) {
REQUIRE_GPU(1);
auto cn = CompNode::load("gpu0");
Expand Down Expand Up @@ -4063,7 +4046,6 @@ TEST(TestGoptInference, FoldingConvDimshuffleNCHW4NCHW32) {
func->execute();
MGB_ASSERT_TENSOR_EQ(host_y_fuse, host_y_non_fuse);
}
#endif

#if CUDA_VERSION >= 10020
TEST(TestGoptInference, FoldingConvDimshuffleNCHW32NCHW4) {
Expand Down
2 changes: 1 addition & 1 deletion src/tensorrt/test/opr_replace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ TEST(TestTensorRTReplace, ElemAddFusion) {
ASSERT_EQ(3u, trt_opr->cast_final_safe<opr::TensorRTOpr>()
.trt_manager()
.iobuf_size());
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 1e-4);
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 5e-4);
}

TEST(TestTensorRTReplace, BatchedMatrixMulBasic) {
Expand Down
4 changes: 2 additions & 2 deletions src/tensorrt/test/tensorrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ TEST(TestOprTensorRT, Basic) {
auto func = net.graph->compile({make_callback_copy(net.y, host_z1),
make_callback_copy(y2, host_z2)});
func->execute();
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 1e-4);
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 2e-4);

auto&& host_x = net.host_x;
auto&& gen = net.gen;

*host_x = *gen({1, 23, 43, 43});
func->execute();
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 1e-4);
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 2e-4);
*host_x = *gen({10, 23, 12, 12});
func->execute();
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 1e-3);
Expand Down
8 changes: 4 additions & 4 deletions src/tensorrt/test/tensorrt_runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ TEST(TestOprTensorRT, RuntimeBasic) {
auto func = net.graph->compile({make_callback_copy(net.y, host_z1),
make_callback_copy(y2, host_z2)});
func->execute();
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 1e-4);
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 5e-4);
}


Expand Down Expand Up @@ -128,13 +128,13 @@ TEST(TestOprTensorRT, RuntimeChangeBatchSize) {
auto func = net.graph->compile({make_callback_copy(net.y, host_z1),
make_callback_copy(y2, host_z2)});
func->execute();
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 1e-4);
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 5e-4);
*net.host_x = *net.gen({1, 23, 28, 28});
func->execute();
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 1e-4);
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 5e-4);
*net.host_x = *net.gen({10, 23, 28, 28});
func->execute();
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 1e-4);
MGB_ASSERT_TENSOR_NEAR(host_z1, host_z2, 5e-4);
}

#endif // MGB_ENABLE_TENSOR_RT
Expand Down

0 comments on commit 14a089c

Please sign in to comment.