Skip to content

Commit 98b9cd7

Browse files
committed
tests: Fix tests
Signed-off-by: Naren Dasan <[email protected]>
1 parent f03644c commit 98b9cd7

File tree

6 files changed

+22
-21
lines changed

6 files changed

+22
-21
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ workflows:
674674
requires:
675675
- build-x86_64-pyt-release
676676

677-
- test-py-ts-x86_64:
677+
- test-py-fx-x86_64:
678678
name: test-py-fx-x86_64-pyt-release
679679
channel: "release"
680680
torch-build: << pipeline.parameters.torch-release-build >>
@@ -752,7 +752,7 @@ workflows:
752752
requires:
753753
- build-x86_64-pyt-release
754754

755-
- test-py-ts-x86_64:
755+
- test-py-fx-x86_64:
756756
name: test-py-fx-x86_64-pyt-release
757757
channel: "release"
758758
torch-build: << pipeline.parameters.torch-release-build >>

cpp/include/torch_tensorrt/torch_tensorrt.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ struct TORCHTRT_API CompileSpec {
569569
CompileSpec(std::vector<std::vector<int64_t>> fixed_sizes);
570570

571571
/**
572-
* @brief Construct a new Extra Info object
572+
* @brief Construct a new Compile Spec object
573573
* Convienence constructor to set fixed input size from c10::ArrayRef's (the
574574
* output of tensor.sizes()) describing size of input tensors. Each entry in
575575
* the vector represents a input and should be provided in call order.
@@ -583,7 +583,7 @@ struct TORCHTRT_API CompileSpec {
583583
CompileSpec(std::vector<c10::ArrayRef<int64_t>> fixed_sizes);
584584

585585
/**
586-
* @brief Construct a new Extra Info object from input ranges.
586+
* @brief Construct a new Compile Spec object from input ranges.
587587
* Each entry in the vector represents a input and should be provided in call
588588
* order.
589589
*
@@ -594,8 +594,7 @@ struct TORCHTRT_API CompileSpec {
594594
CompileSpec(std::vector<Input> inputs);
595595

596596
/**
597-
* @brief Construct a new Extra Info object from IValue.
598-
* The IValue store a complex Input
597+
* @brief Construct a new Compile Spec object from IValue which represents the nesting of input tensors for a module.
599598
*
600599
* @param input_signature
601600
*/

tests/cpp/BUILD

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test_suite(
1919
":test_serialization",
2020
":test_module_fallback",
2121
":test_example_tensors",
22-
":test_collection"
22+
":test_collections"
2323
],
2424
)
2525

@@ -34,7 +34,7 @@ test_suite(
3434
":test_serialization",
3535
":test_module_fallback",
3636
":test_example_tensors",
37-
":test_collection"
37+
":test_collections"
3838
],
3939
)
4040

@@ -125,8 +125,8 @@ cc_test(
125125
)
126126

127127
cc_test(
128-
name = "test_collection",
129-
srcs = ["test_collection.cpp"],
128+
name = "test_collections",
129+
srcs = ["test_collections.cpp"],
130130
data = [
131131
"//tests/modules:jit_models",
132132
],

tests/cpp/test_collection.cpp renamed to tests/cpp/test_collections.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
TEST(CppAPITests, TestCollectionStandardTensorInput) {
1010

11-
std::string path = "tests/modules/standard_tensor_input.jit.pt";
11+
std::string path = "tests/modules/standard_tensor_input_scripted.jit.pt";
1212
torch::Tensor in0 = torch::randn({1, 3, 512, 512}, torch::kCUDA).to(torch::kHalf);
1313
std::vector<at::Tensor> inputs;
1414
inputs.push_back(in0);
@@ -53,7 +53,7 @@ TEST(CppAPITests, TestCollectionStandardTensorInput) {
5353

5454
TEST(CppAPITests, TestCollectionTupleInput) {
5555

56-
std::string path = "tests/modules/tuple_input.jit.pt";
56+
std::string path = "tests/modules/tuple_input_scripted.jit.pt";
5757
torch::Tensor in0 = torch::randn({1, 3, 512, 512}, torch::kCUDA).to(torch::kHalf);
5858

5959
torch::jit::Module mod;
@@ -103,7 +103,7 @@ TEST(CppAPITests, TestCollectionTupleInput) {
103103

104104
TEST(CppAPITests, TestCollectionListInput) {
105105

106-
std::string path = "tests/modules/list_input.jit.pt";
106+
std::string path = "tests/modules/list_input_scripted.jit.pt";
107107
torch::Tensor in0 = torch::randn({1, 3, 512, 512}, torch::kCUDA).to(torch::kHalf);
108108
std::vector<at::Tensor> inputs;
109109
inputs.push_back(in0);
@@ -169,7 +169,7 @@ TEST(CppAPITests, TestCollectionListInput) {
169169

170170
TEST(CppAPITests, TestCollectionTupleInputOutput) {
171171

172-
std::string path = "tests/modules/tuple_input_output.jit.pt";
172+
std::string path = "tests/modules/tuple_input_output_scripted.jit.pt";
173173

174174
torch::Tensor in0 = torch::randn({1, 3, 512, 512}, torch::kCUDA).to(torch::kHalf);
175175

@@ -224,7 +224,7 @@ TEST(CppAPITests, TestCollectionTupleInputOutput) {
224224

225225
TEST(CppAPITests, TestCollectionListInputOutput) {
226226

227-
std::string path = "tests/modules/list_input_output.jit.pt";
227+
std::string path = "tests/modules/list_input_output_scripted.jit.pt";
228228
torch::Tensor in0 = torch::randn({1, 3, 512, 512}, torch::kCUDA).to(torch::kHalf);
229229
std::vector<at::Tensor> inputs;
230230
inputs.push_back(in0);
@@ -295,7 +295,7 @@ TEST(CppAPITests, TestCollectionListInputOutput) {
295295

296296
TEST(CppAPITests, TestCollectionComplexModel) {
297297

298-
std::string path = "tests/modules/complex_model.jit.pt";
298+
std::string path = "tests/modules/list_input_tuple_output_scripted.jit.pt";
299299
torch::Tensor in0 = torch::randn({1, 3, 512, 512}, torch::kCUDA).to(torch::kHalf);
300300
std::vector<at::Tensor> inputs;
301301
inputs.push_back(in0);

tests/cpp/test_example_tensors.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ TEST_P(CppAPITests, InputsFromTensors) {
99
trt_inputs_ivalues.push_back(in.clone());
1010
}
1111

12-
auto spec = torch_tensorrt::ts::CompileSpec({trt_inputs_ivalues[0].toTensor()});
12+
13+
auto inputs = std::vector<torch_tensorrt::Input>{trt_inputs_ivalues[0].toTensor()};
14+
auto spec = torch_tensorrt::ts::CompileSpec(inputs);
1315

1416
auto trt_mod = torch_tensorrt::ts::compile(mod, spec);
1517
torch::jit::IValue trt_results_ivalues = torch_tensorrt::tests::util::RunModuleForward(trt_mod, trt_inputs_ivalues);

tests/modules/hub.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@
128128
"model": cm.ListInputTupleOutput(),
129129
"path": "script"
130130
},
131-
"bert_base_uncased": {
132-
"model": cm.BertModule(),
133-
"path": "trace"
134-
}
131+
#"bert_base_uncased": {
132+
# "model": cm.BertModule(),
133+
# "path": "trace"
134+
#}
135135
}
136136

137137

0 commit comments

Comments
 (0)