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

Method execute

demo/HuggingFace/run.py:127–142  ·  view source on GitHub ↗
(self, args: argparse.Namespace)

Source from the content-addressed store, hash-verified

125
126class BenchmarkAction(NetworkScriptAction):
127 def execute(self, args: argparse.Namespace):
128 module = self.load_script(args.script, args)
129 module.RUN_CMD._parser = self.parser
130
131 old_path = os.getcwd()
132 # Execute script in each relevant folder
133 try:
134 os.chdir(args.network)
135 results = module.RUN_CMD.run_benchmark()
136 finally:
137 os.chdir(old_path)
138
139 # Output to terminal
140 print(results)
141
142 return 0
143
144 def add_args(self, parser: argparse.ArgumentParser):
145 super().add_args(parser)

Callers

nothing calls this directly

Calls 3

printFunction · 0.85
load_scriptMethod · 0.80
run_benchmarkMethod · 0.45

Tested by

no test coverage detected