Skip to content

Commit 8434946

Browse files
committed
Merge pull request #716 from NVIDIA/fix_min_block_size_trtorchc
fix(//cpp/bin/torchtrtc): Fix mbs
2 parents 9eae269 + aca175f commit 8434946

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cpp/bin/torchtrtc/main.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,9 @@ int main(int argc, char** argv) {
288288
"(Repeatable) Module that should always be run in Pytorch for execution (partial compilation must be enabled)",
289289
{"tem", "torch-executed-mods"});
290290

291-
args::ValueFlagList<std::string> min_block_size(
291+
args::ValueFlag<uint64_t> min_block_size(
292292
parser,
293-
"torch-executed-mods",
293+
"min-block-size",
294294
"Minimum number of contiguous TensorRT supported ops to compile a subgraph to TensorRT",
295295
{"mbs", "min-block-size"});
296296

@@ -337,10 +337,10 @@ int main(int argc, char** argv) {
337337

338338
try {
339339
parser.ParseCLI(argc, argv);
340-
} catch (args::Help) {
340+
} catch (args::Help const&) {
341341
std::cout << parser;
342342
return 0;
343-
} catch (args::ParseError e) {
343+
} catch (args::ParseError const& e) {
344344
torchtrt::logging::log(torchtrt::logging::Level::kERROR, e.what());
345345
std::cerr << std::endl << parser;
346346
return 1;
@@ -626,6 +626,7 @@ int main(int argc, char** argv) {
626626
std::ofstream out(real_output_path);
627627
out << engine;
628628
out.close();
629+
return 0;
629630
} else {
630631
auto trt_mod = torchtrt::ts::compile(mod, compile_settings);
631632

0 commit comments

Comments
 (0)