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

Method run

tools/Polygraphy/tests/test_examples.py:176–186  ·  view source on GitHub ↗
(self, cmd_block, sandboxed_install_run)

Source from the content-addressed store, hash-verified

174 return load_command_blocks_from_readme(readme)
175
176 def run(self, cmd_block, sandboxed_install_run):
177 # Remove whitespace args and escaped newlines
178 command = [arg for arg in str(cmd_block).strip().split(" ") if arg.strip() and arg != "\\\n"]
179 status = sandboxed_install_run(command, cwd=self.path)
180
181 cmd_print = f"Note: Command was: {' '.join(command)}"
182 if cmd_block.xfail:
183 assert not status.success, f"Command that was expected to fail did not fail. {cmd_print}"
184 else:
185 assert status.success, f"Command that was expected to succeed did not succeed. {cmd_print}"
186 return status
187
188 def __exit__(self, exc_type, exc_value, traceback):
189 """

Callers 15

test_resnet18Method · 0.45
evaluate_onnxFunction · 0.45
partition_and_inferMethod · 0.45
fold_constantsMethod · 0.45
infer_modelFunction · 0.45
test_examplesFunction · 0.45
infer_implMethod · 0.45
poly_runFunction · 0.45
test_api_examplesFunction · 0.45
test_cli_examplesFunction · 0.45
test_dev_examplesFunction · 0.45

Calls 1

sandboxed_install_runFunction · 0.85

Tested by

no test coverage detected