Skip to content

Commit 10957eb

Browse files
committed
refactor(//cpp/bin/torchtrtc)!: Rename enabled precisions arugment to
enable-precision BREAKING CHANGE: This is a minor change but may cause scripts using torchtrtc to fail. We are renaming enabled-precisions to enable-precision since it makes more sense as the argument can be repeated Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 7223fc8 commit 10957eb

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

cpp/bin/torchtrtc/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ to standard TorchScript. Load with `torch.jit.load()` and run like you would run
1414

1515
```
1616
torchtrtc [input_file_path] [output_file_path]
17-
[input_specs...] {OPTIONS}
17+
[input_specs...] {OPTIONS}
1818
19-
Torch-TensorRT is a compiler for TorchScript, it will compile and optimize
20-
TorchScript programs to run on NVIDIA GPUs using TensorRT
19+
torchtrtc is a compiler for TorchScript, it will compile and optimize
20+
TorchScript programs to run on NVIDIA GPUs using TensorRT
2121
22-
OPTIONS:
22+
OPTIONS:
2323
2424
-h, --help Display this help menu
2525
Verbiosity of the compiler

cpp/bin/torchtrtc/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ int main(int argc, char** argv) {
249249
args::Flag sparse_weights(
250250
parser, "sparse-weights", "Enable sparsity for weights of conv and FC layers", {"sparse-weights"});
251251

252-
args::ValueFlagList<std::string> enabled_precision(
252+
args::ValueFlagList<std::string> enabled_precisions(
253253
parser,
254254
"precision",
255255
"(Repeatable) Enabling an operating precision for kernels to use when building the engine (Int8 requires a calibration-cache argument) [ float | float32 | f32 | fp32 | half | float16 | f16 | fp16 | int8 | i8 | char ] (default: float)",
256-
{'p', "enabled-precision"});
256+
{'p', "enable-precision"});
257257
args::ValueFlag<std::string> device_type(
258258
parser,
259259
"type",
@@ -501,8 +501,8 @@ int main(int argc, char** argv) {
501501
}
502502
}
503503

504-
if (enabled_precision) {
505-
for (const auto precision : args::get(enabled_precision)) {
504+
if (enabled_precisions) {
505+
for (const auto precision : args::get(enabled_precisions)) {
506506
auto dtype = parseDataType(precision);
507507
if (dtype == torchtrt::DataType::kFloat) {
508508
compile_settings.enabled_precisions.insert(torch::kF32);

docsrc/tutorials/torchtrtc.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ to standard TorchScript. Load with ``torch.jit.load()`` and run like you would r
1717
.. code-block:: txt
1818
1919
torchtrtc [input_file_path] [output_file_path]
20-
[input_specs...] {OPTIONS}
20+
[input_specs...] {OPTIONS}
2121
22-
Torch-TensorRT is a compiler for TorchScript, it will compile and optimize
23-
TorchScript programs to run on NVIDIA GPUs using TensorRT
22+
torchtrtc is a compiler for TorchScript, it will compile and optimize
23+
TorchScript programs to run on NVIDIA GPUs using TensorRT
2424
25-
OPTIONS:
25+
OPTIONS:
2626
2727
-h, --help Display this help menu
2828
Verbiosity of the compiler

0 commit comments

Comments
 (0)