提交 ab3efab0 编写于 作者: M Megvii Engine Team 提交者: Xu Xinran

fix(mgb): add compute capability check

GitOrigin-RevId: fba819afb3cc154e092f7e9bd84910890d0916ea
上级 8070f40a
......@@ -2727,6 +2727,9 @@ TEST(TestGoptInference, ConvertFormatNCHW4) {
TEST(TestGoptInference, ConvertFormatNCHW4Ic3) {
REQUIRE_GPU(1);
auto cn = CompNode::load("gpu0");
cn.activate();
REQUIRE_CUDA_COMPUTE_CAPABILITY(6, 1);
HostTensorGenerator<dtype::Float32, RandomDistribution::UNIFORM> gen{
1.2f, 127 * 127};
auto graph = ComputingGraph::make();
......
......@@ -1980,6 +1980,10 @@ TEST(TestTensorRTReplace, FuseConvAdd) {
TEST(TestTensorRTReplace, FuseConvAddNchw2nchw4) {
REQUIRE_GPU(1);
auto cn = CompNode::load("gpu0");
cn.activate();
REQUIRE_CUDA_COMPUTE_CAPABILITY(6, 1);
HostTensorGenerator<dtype::Float32, RandomDistribution::UNIFORM> gen{
1.2f, 127 * 127};
auto graph = ComputingGraph::make();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册