MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / main

Method main

tools/Polygraphy/polygraphy/tools/base/tool.py:193–204  ·  view source on GitHub ↗

Set up and run this tool. This function serves as a replacement for a manually defined ``main`` method. Runs ``sys.exit()`` with the status code returned by ``run``. If ``run`` does not return anything, always exits with ``0`` (success).

(self)

Source from the content-addressed store, hash-verified

191 return self.show_start_end_logging_impl(args)
192
193 def main(self):
194 """
195 Set up and run this tool. This function serves as a replacement for a manually
196 defined ``main`` method.
197
198 Runs ``sys.exit()`` with the status code returned by ``run``. If ``run`` does
199 not return anything, always exits with ``0`` (success).
200 """
201 parser = self.setup_parser()
202 args = parser.parse_args()
203 self.parse(args)
204 sys.exit(self.run(args))

Callers

nothing calls this directly

Calls 4

setup_parserMethod · 0.95
parseMethod · 0.95
runMethod · 0.95
parse_argsMethod · 0.45

Tested by

no test coverage detected