@@ -29,7 +29,6 @@ TEST_P(CppAPITests, ModuleToEngineToModuleIsClose) {
2929 std::vector<at::Tensor> jit_results;
3030 jit_results.push_back (jit_results_ivalues.toTensor ());
3131
32- auto forward_graph = mod.get_method (" forward" );
3332 std::vector<c10::ArrayRef<int64_t >> input_ranges;
3433 for (auto in : inputs) {
3534 input_ranges.push_back (in.sizes ());
@@ -43,7 +42,7 @@ TEST_P(CppAPITests, ModuleToEngineToModuleIsClose) {
4342 auto engine = trtorch::ConvertGraphToTRTEngine (mod, " forward" , input_ranges);
4443 auto trt_mod = trtorch::EmbedEngineInNewModule (engine, compile_spec.device );
4544
46- torch::jit::IValue trt_results_ivalues = trtorch::tests::util::RunModuleForward (mod , inputs_ivalues);
45+ torch::jit::IValue trt_results_ivalues = trtorch::tests::util::RunModuleForward (trt_mod , inputs_ivalues);
4746 std::vector<at::Tensor> trt_results;
4847 trt_results.push_back (trt_results_ivalues.toTensor ());
4948
@@ -61,4 +60,4 @@ INSTANTIATE_TEST_SUITE_P(
6160 PathAndInSize({" tests/modules/resnet50_scripted.jit.pt" , {{1 , 3 , 224 , 224 }}, 2e-5 }),
6261 PathAndInSize({" tests/modules/mobilenet_v2_scripted.jit.pt" , {{1 , 3 , 224 , 224 }}, 2e-5 }),
6362 PathAndInSize({" tests/modules/efficientnet_b0_scripted.jit.pt" , {{1 , 3 , 224 , 224 }}, 2e-5 }),
64- PathAndInSize({" tests/modules/vit_scripted.jit.pt" , {{1 , 3 , 224 , 224 }}, 8e-3 })));
63+ PathAndInSize({" tests/modules/vit_scripted.jit.pt" , {{1 , 3 , 224 , 224 }}, 8e-3 })));
0 commit comments