@@ -29,7 +29,6 @@ TEST_P(CppAPITests, ModuleToEngineToModuleIsClose) {
29
29
std::vector<at::Tensor> jit_results;
30
30
jit_results.push_back (jit_results_ivalues.toTensor ());
31
31
32
- auto forward_graph = mod.get_method (" forward" );
33
32
std::vector<c10::ArrayRef<int64_t >> input_ranges;
34
33
for (auto in : inputs) {
35
34
input_ranges.push_back (in.sizes ());
@@ -43,7 +42,7 @@ TEST_P(CppAPITests, ModuleToEngineToModuleIsClose) {
43
42
auto engine = trtorch::ConvertGraphToTRTEngine (mod, " forward" , input_ranges);
44
43
auto trt_mod = trtorch::EmbedEngineInNewModule (engine, compile_spec.device );
45
44
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);
47
46
std::vector<at::Tensor> trt_results;
48
47
trt_results.push_back (trt_results_ivalues.toTensor ());
49
48
@@ -61,4 +60,4 @@ INSTANTIATE_TEST_SUITE_P(
61
60
PathAndInSize({" tests/modules/resnet50_scripted.jit.pt" , {{1 , 3 , 224 , 224 }}, 2e-5 }),
62
61
PathAndInSize({" tests/modules/mobilenet_v2_scripted.jit.pt" , {{1 , 3 , 224 , 224 }}, 2e-5 }),
63
62
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