From ba743f5fba240a6df28ffd2ff76d2b703ce65767 Mon Sep 17 00:00:00 2001 From: Naren Dasan Date: Wed, 3 Nov 2021 09:13:36 -0700 Subject: [PATCH] fix(eval): Rollback 1.11a0 change + namespace issues Signed-off-by: Naren Dasan Signed-off-by: Naren Dasan --- core/conversion/evaluators/eval_macros.h | 2 +- core/conversion/evaluators/eval_util.cpp | 2 +- .../evaluators/test_aten_evaluators.cpp | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/conversion/evaluators/eval_macros.h b/core/conversion/evaluators/eval_macros.h index 4573c87067..e9bca82326 100644 --- a/core/conversion/evaluators/eval_macros.h +++ b/core/conversion/evaluators/eval_macros.h @@ -63,7 +63,7 @@ auto b = args.at(n->input(1)).unwrapToString(); \ return operation; \ } else { \ - TRTORCH_THROW_ERROR( \ + TORCHTRT_THROW_ERROR( \ "Unimplemented data type for " \ << node_kind << " evaluator b arg:" << args.at(n->input(1)).IValue()->type()->str()); \ return {}; \ diff --git a/core/conversion/evaluators/eval_util.cpp b/core/conversion/evaluators/eval_util.cpp index c9818d7c97..dc0503886e 100644 --- a/core/conversion/evaluators/eval_util.cpp +++ b/core/conversion/evaluators/eval_util.cpp @@ -238,7 +238,7 @@ at::Tensor createTensorFromList( /// Gets shape of tensor to be created auto sizes = compute_sizes(data); checkListInputType(elem_type, sizes.size() == 1 && sizes[0] == 0); - at::ScalarType initial_scalar_type = c10::scalarTypeFromJitType(*elem_type); + at::ScalarType initial_scalar_type = c10::scalarTypeFromJitType(elem_type); if (initial_scalar_type == at::ScalarType::Double) { initial_scalar_type = at::typeMetaToScalarType(c10::get_default_dtype()); } diff --git a/tests/core/conversion/evaluators/test_aten_evaluators.cpp b/tests/core/conversion/evaluators/test_aten_evaluators.cpp index 5ea94f1a5b..41eb1e06be 100644 --- a/tests/core/conversion/evaluators/test_aten_evaluators.cpp +++ b/tests/core/conversion/evaluators/test_aten_evaluators.cpp @@ -524,8 +524,8 @@ TEST(Evaluators, EqStrResultIsTrueEvaluatesCorrectly) { auto g = std::make_shared(); torch::jit::parseIR(graph, g.get()); - auto jit_results = trtorch::tests::util::EvaluateGraphJIT(g, {}); - auto trt_results = trtorch::tests::util::EvaluateGraph(g->block(), {}); + auto jit_results = torch_tensorrt::tests::util::EvaluateGraphJIT(g, {}); + auto trt_results = torch_tensorrt::tests::util::EvaluateGraph(g->block(), {}); ASSERT_TRUE(jit_results[0] == trt_results[0]); } @@ -541,8 +541,8 @@ TEST(Evaluators, EqStrResultIsFalseEvaluatesCorrectly) { auto g = std::make_shared(); torch::jit::parseIR(graph, g.get()); - auto jit_results = trtorch::tests::util::EvaluateGraphJIT(g, {}); - auto trt_results = trtorch::tests::util::EvaluateGraph(g->block(), {}); + auto jit_results = torch_tensorrt::tests::util::EvaluateGraphJIT(g, {}); + auto trt_results = torch_tensorrt::tests::util::EvaluateGraph(g->block(), {}); ASSERT_TRUE(jit_results[0] == trt_results[0]); } @@ -558,8 +558,8 @@ TEST(Evaluators, AndBoolResultIsTrueEvaluatesCorrectly) { auto g = std::make_shared(); torch::jit::parseIR(graph, g.get()); - auto jit_results = trtorch::tests::util::EvaluateGraphJIT(g, {}); - auto trt_results = trtorch::tests::util::EvaluateGraph(g->block(), {}); + auto jit_results = torch_tensorrt::tests::util::EvaluateGraphJIT(g, {}); + auto trt_results = torch_tensorrt::tests::util::EvaluateGraph(g->block(), {}); ASSERT_TRUE(jit_results[0] == trt_results[0]); } @@ -575,8 +575,8 @@ TEST(Evaluators, AndBoolResultIsFalseEvaluatesCorrectly) { auto g = std::make_shared(); torch::jit::parseIR(graph, g.get()); - auto jit_results = trtorch::tests::util::EvaluateGraphJIT(g, {}); - auto trt_results = trtorch::tests::util::EvaluateGraph(g->block(), {}); + auto jit_results = torch_tensorrt::tests::util::EvaluateGraphJIT(g, {}); + auto trt_results = torch_tensorrt::tests::util::EvaluateGraph(g->block(), {}); ASSERT_TRUE(jit_results[0] == trt_results[0]); } \ No newline at end of file