Fix Polygraphy to-input multi-iteration merge#4779
Conversation
Signed-off-by: Lingavasan <lsuresh4@asu.edu>
74a242b to
564ca40
Compare
|
Hi @wenbingl @akhilg-nv, just checking in when you have a chance. This PR fixes the Polygraphy |
|
Hi @wenbingl @akhilg-nv, following up on this PR when you have a chance. It fixes the Polygraphy Please let me know if you would prefer any changes to the approach. |
|
Hi @wenbingl @akhilg-nv, following up when you have a chance. This PR fixes the Polygraphy Please let me know if you would prefer any changes to the approach. |
Summary
polygraphy data to-inputcreates a distinctOrderedDictfor each padded iterationContext
This addresses the
polygraphy data to-inputaliasing bug described in #4607. The broaderdebug reducemulti-iteration limitation noted in that issue is not changed here.Validation
ToInput().run_impl(...)path with two saved input iterations and verified both are preserved[OrderedDict()] * naliasing behavior and verified the new list-comprehension behavior creates distinct dictionariesPYTHONPATH=tools/Polygraphy /private/tmp/tensorrt-polygraphy-tests-py311/bin/python -m py_compile tools/Polygraphy/polygraphy/tools/data/subtool/to_input.py tools/Polygraphy/tests/tools/test_data.pygit show --check --stat HEADNote: I could not run the official
pytest tools/Polygraphy/tests/tools/test_data.pysuite locally becausetools/Polygraphy/tests/tools/conftest.pyimportstensorrtduring collection. TensorRT wheels are not available for this local macOS arm64 environment (Darwin 25.3.0, nonvidia-smi), so collection fails before reaching the test.