Commit 493cf05
feat(annotation/e2e): add LLM-domain, dynamic-shape, and cross-backend E2E tests
New tests in _BackendE2ETests mixin (×3 backends):
test_llm_hidden_unary/binary : activation/gating at [batch=8, hidden=512]
test_dynamic_batch : dynamic batch dim via torch_tensorrt.Input
test_gated_ffn_llm : full FFN at hidden=256, inter=512 (2× LLM ratio)
New TestCrossBackendE2E class (9 tests):
Verifies that Triton, CuTile, and CuTeDSL PluginV3 ops coexist in one engine.
All at LLM-domain [batch=8, hidden=512].
Bug fixes triggered by dynamic-shape tests:
_qdp_utils.py: _collect_shape_var_bindings now binds non-constant ShapeExpr
dims (is_constant=False) so meta_impl runs during get_output_shapes for
dynamic-shape engines.
_qdp_utils.py: _safe_dim default changed from 256 → 1 so CuTeDSL dummy
tensors compiled for dynamic dims use a [1, static_dim] layout whose
offset formula (offset=idx) is correct for any batch size at runtime.
(Using 256 caused the kernel to access only 8/256 columns, giving 96.8%
output mismatch.)
_triton.py: use _as_symint32() for grid_x/y/z assignment (matching CuTile
and CuTeDSL) so _ShapeDim/ShapeExpr values are properly wrapped before
being stored in KernelLaunchParams. Previously, direct assignment caused
a TRT segfault during dynamic-shape engine builds.
E2E test count: 19 → 40 (50.6% of 79 total, up from 32%).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 9693733 commit 493cf05
3 files changed
Lines changed: 304 additions & 34 deletions
File tree
- py/torch_tensorrt/annotation/_custom_plugin
- _aot
- tests/py/annotation/e2e
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
382 | | - | |
383 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
384 | 384 | | |
385 | | - | |
386 | | - | |
387 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| |||
Lines changed: 33 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
| |||
461 | 467 | | |
462 | 468 | | |
463 | 469 | | |
464 | | - | |
| 470 | + | |
465 | 471 | | |
466 | 472 | | |
467 | 473 | | |
468 | 474 | | |
469 | | - | |
470 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
471 | 485 | | |
472 | 486 | | |
473 | 487 | | |
| |||
476 | 490 | | |
477 | 491 | | |
478 | 492 | | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
483 | 508 | | |
484 | 509 | | |
485 | 510 | | |
| |||
0 commit comments