Merged
Conversation
To highlight which are broken, should probably be fixed before merging
Member
Author
|
This will also need a proper Compiler versioning. I went with EDIT: this is discussed at JuliaLang/julia#57520 |
serenity4
commented
Feb 24, 2025
Keno
reviewed
Feb 28, 2025
Member
Author
|
The compiler versioning issue set aside, this is in a working state and can be merged. Perhaps best to get this in now so we may move forward with DAECompiler, even if it requires |
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.
Makes Diffractor functional on nightly, ensuring that the test suite runs without errors.
Requires JuliaDiff/ChainRules.jl#819 merged and JuliaDebug/Cthulhu.jl#621 released to be fully functional.
Before merge (marking as draft until completed, but this is ready for review):
set_cthulhu_source!introduced in adjust Cthulhu to JuliaLang/julia#56248 JuliaDebug/Cthulhu.jl#621 for convenience).Base.Compiler(see Fixes for Julia nightly #300 (comment))A significant refactor of the overload of
CC.finishinfer!/CC.finish!/CC.transform_result_for_cachewas made to follow exactly the same logic as Cthulhu (these seem to have been copy-pasted from there into Diffractor, the changes simply sync them).The most notable change in this PR is that it works around IR changes, as described below.
GlobalRef changes
On nightly, what used to be a
GlobalRefin lowered IR may now be agetpropertyinstead, with a firstModuleSSA argument and a symbol. To illustrate this, instead of something likewe now have
As a possible fix, we may preserve the old semantics by associating the latter IR with the former. This is what I attempted to fix the failing tests, but as the IR transforms are performed within a generated function we cannot evaluate
GlobalRefs for module arguments (as inMain.B) to know whethergetpropertyis a global access or not (i.e. is the first argument a module), because we can't see past the world age of the generated function definition.Instead, we instrument the
getpropertycall for differentiation, and I added arrulewithNoTangent().