Repository navigation
Rename the scope operand of enter when building IR - #166
Merged
Merged
Conversation
`IR(::CodeInfo)` copied `EnterNode.scope` verbatim, so the `enter` of a scoped try region (`@with`, and `@sync` since Julia 1.14) kept the raw `SSAValue` of the lowered code and referenced an unrelated statement after renumbering. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #166 +/- ##
=======================================
Coverage 78.45% 78.45%
=======================================
Files 16 16
Lines 1652 1652
=======================================
Hits 1296 1296
Misses 356 356 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
CarloLucibello
added a commit
to FluxML/Zygote.jl
that referenced
this pull request
Oct 22, 2026
- Build `Task`s around their final closure instead of replacing `t.code`, which Julia 1.14 rejects (the failing task made the `structures` tests hang). - Forward the extra `sync_end` argument and mark the scope and cancellation machinery entered by `@with`/`@sync` as non-differentiable. - Require IRTools 0.4.22 for the `enter` scope fix (FluxML/IRTools.jl#166). - Mark the primal frame name in pullback stacktraces broken on Julia 1.14. - Remove Conda from the test deps; it is unused and failed to precompile from a restored CI cache. - Time out CI test jobs after an hour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CarloLucibello
added a commit
to FluxML/Zygote.jl
that referenced
this pull request
Oct 22, 2026
* Fix tasks and `@sync` on Julia 1.14, drop unused Conda test dep - Build `Task`s around their final closure instead of replacing `t.code`, which Julia 1.14 rejects (the failing task made the `structures` tests hang). - Forward the extra `sync_end` argument and mark the scope and cancellation machinery entered by `@with`/`@sync` as non-differentiable. - Require IRTools 0.4.22 for the `enter` scope fix (FluxML/IRTools.jl#166). - Mark the primal frame name in pullback stacktraces broken on Julia 1.14. - Remove Conda from the test deps; it is unused and failed to precompile from a restored CI cache. - Time out CI test jobs after an hour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Skip statements without line info in the catch-block error message On Julia 1.15 nightly the first statement of a catch block can have no line info, so indexing `ir.lines` with it threw a BoundsError while compiling functions with try/catch/else and try/catch/finally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IR(::CodeInfo)copiedEnterNode.scopewithout renaming it, so a scoped try region (@with, and@syncsince Julia 1.14) ends up pointing at an unrelated statement. Round-tripping such a function through a dynamo either hitsInvalidIRErrorin the optimizer or runs the region under a bogus scope.This breaks Zygote gradients through
@with(on 1.11+) and through@sync(on 1.14+, where it is behind the nightly CI failures of Zygote).🤖 Generated with Claude Code