| 290 | @pytest.mark.parametrize("example", CLI_EXAMPLES, ids=lambda case: str(case)) |
| 291 | @pytest.mark.script_launch_mode("subprocess") |
| 292 | def test_cli_examples(example, sandboxed_install_run): |
| 293 | if mod.version(trt.__version__) < mod.version("8.0") and ( |
| 294 | example.path.endswith("01_debugging_flaky_trt_tactics") |
| 295 | or example.path.endswith("02_deterministic_engine_builds_in_tensorrt") |
| 296 | ): |
| 297 | pytest.skip("Tactic replays are not supported on older versions of TRT") |
| 298 | |
| 299 | if mod.version(trt.__version__) < mod.version("8.4") and example.path.endswith("08_adding_precision_constraints"): |
| 300 | pytest.skip("TRT < 8.4 fails to parse the Gemm node in the example ONNX file.") |
| 301 | |
| 302 | with example as command_blocks: |
| 303 | for cmd_block in command_blocks: |
| 304 | example.run(cmd_block, sandboxed_install_run) |
| 305 | |
| 306 | |
| 307 | CLI_INSPECT_EXAMPLES = [ |