Skip to content

Fix functionalization codegen after trimming XLA runtime - #56

Merged
cyyever merged 1 commit into
trimfrom
fix/trim-functionalization-codegen
Nov 17, 2026
Merged

cyyever merged 1 commit into
trimfrom
fix/trim-functionalization-codegen

Conversation

@cyyever

@cyyever cyyever commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Agent details (AI-generated)

The Gitea CUDA wheel run 8774 fails compiling generated RegisterFunctionalization_*.cpp: the trim runtime no longer declares or implements propagate_xla_data_direct, but torchgen still emits the XLA-only call for mutable and out operators.

Remove that stale call and the two temporary tensor reads used only by it. Preserve replace_, commit_update, sync, and aliased return handling; no missing-symbol stub or compiler-error suppression is added.

Regression coverage exercises an inplace operator and a two-output out operator, checking that mutation propagation remains intact and generated code has no dependency on the removed XLA runtime. Both cases fail against the original generator and pass with this fix under Python 3.15. git diff --check passes.

Validation limits: no full CUDA wheel build was run locally. lintrunner -a could not run because lintrunner is not installed; no project or parent virtual environment exists. This draft targets the BakeLab trim fork and awaits review.

@cyyever
cyyever marked this pull request as ready for review November 17, 2026 15:32
@cyyever
cyyever merged commit e946175 into trim Nov 17, 2026
59 checks passed
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