Skip to content

fix: add missing serialized_aliased_io arg to no_op_placeholder op schema#4423

Merged
lanluo-nvidia merged 2 commits into
pytorch:mainfrom
shoumikhin:fix-no-op-aliased-io-schema
Jul 22, 2026
Merged

fix: add missing serialized_aliased_io arg to no_op_placeholder op schema#4423
lanluo-nvidia merged 2 commits into
pytorch:mainfrom
shoumikhin:fix-no-op-aliased-io-schema

Conversation

@shoumikhin

Copy link
Copy Markdown
Contributor

Summary

The serialized engine layout gained ALIASED_IO_IDX = 12 (so SERIALIZATION_LEN = 13) in #4251. _replace_execute_engine_with_no_op in _compile.py builds the tensorrt::no_op_placeholder_for_execute_engine node with inputs + SERIALIZATION_LEN = 14 args, but the custom op and its register_fake were never updated and still declare only 13 params.

As a result, every ExecuTorch .pte export fails during torch_tensorrt.save(...):

RuntimeError: tensorrt::no_op_placeholder_for_execute_engine() expected at most 13 argument(s) but received 14 argument(s).

This currently breaks the executorch-static-build CI job on all PRs (e.g. #4421, #4415), regardless of their content.

Fix

Add the trailing serialized_aliased_io: str parameter (matching ALIASED_IO_IDX) to both no_op_placeholder_for_execute_engine and fake_no_op_placeholder_for_execute_engine. The param order now matches SerializedInfoIndex exactly (fields 0-12). The fake kernel still derives output shapes from serialized_metadata, so the new field is accepted but not otherwise used, mirroring the other serialized fields.

Testing

  • Verified param count is now 14 (inputs + 13 serialized fields) and each param aligns with its SerializedInfoIndex.
  • black/AST clean.
  • Unblocks the ExecuTorch .pte export step in verify-executorch-reference-runner.sh.

…hema

The serialized engine layout gained ALIASED_IO_IDX=12 (SERIALIZATION_LEN=13) in
pytorch#4251, so _replace_execute_engine_with_no_op builds the
tensorrt::no_op_placeholder_for_execute_engine node with 14 args (inputs + 13
serialized fields). The op and its fake kernel were never updated and still
declared only 13 params, so any ExecuTorch .pte export hit:

  RuntimeError: no_op_placeholder_for_execute_engine() expected at most 13
  argument(s) but received 14 argument(s)

Add the trailing serialized_aliased_io: str param (ALIASED_IO_IDX) to both the
custom op and its register_fake so the schema matches the builder. The fake
still derives output shapes from serialized_metadata, so the new field is
accepted but not otherwise used.

Signed-off-by: shoumikhin <shoumikhin@users.noreply.github.com>
@meta-cla meta-cla Bot added the cla signed label Jul 22, 2026
@github-actions github-actions Bot added component: core Issues re: The core compiler component: api [Python] Issues re: Python API component: runtime component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Jul 22, 2026
@github-actions github-actions Bot added the component: tests Issues re: Tests label Jul 22, 2026

@lanluo-nvidia lanluo-nvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@lanluo-nvidia
lanluo-nvidia merged commit 774848f into pytorch:main Jul 22, 2026
129 of 141 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed component: api [Python] Issues re: Python API component: core Issues re: The core compiler component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: runtime component: tests Issues re: Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants