Skip to content

Fix tensor renames that collide with existing inputs - #623

Open
AryanRG wants to merge 1 commit into
pyro-ppl:masterfrom
AryanRG:fix-colliding-tensor-substitutions
Open

AryanRG wants to merge 1 commit into
pyro-ppl:masterfrom
AryanRG:fix-colliding-tensor-substitutions

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 30, 2026

Copy link
Copy Markdown

Renaming an input to a retained input, such as x(a="b"), should select the diagonal. The fast rename path can currently collapse input names while retaining both data axes, causing an assertion or an incorrect event shape.

Materialize colliding substitutions before that path. This extends #382 to retained and pending input axes, with regressions for simultaneous number, tensor and slice substitutions. Unique renames, swaps and cycles remain zero-copy.

Tested with NumPy and PyTorch, including enumeration and gradient checks, and built and exercised the wheel. The broader NumPy run has one unrelated test_function_of_numeric_array failure that also reproduces on the base commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant