Skip to content

Remove Cassette - #37

Closed
mofeing wants to merge 2 commits into
mainfrom
remove-cassette
Closed

mofeing wants to merge 2 commits into
mainfrom
remove-cassette

Conversation

@mofeing

@mofeing mofeing commented Jul 7, 2024

Copy link
Copy Markdown
Collaborator

As far as I seen in the code, Cassette's contextual dispatch is only needed for overriding Enzyme.autodiff. But Cassette has a very high overhead that kills performance. I have started to see very high compile times in some local examples.

This PR tries to remove Cassette from the equation by defining a new autodiff function (Reactant.autodiff). This might not be the best solution, but it's an idea I want to experiment with.

@mofeing
mofeing requested a review from wsmoses July 7, 2024 21:15
@wsmoses

wsmoses commented Jul 7, 2024 via email

Copy link
Copy Markdown
Member

@mofeing

mofeing commented Jul 7, 2024

Copy link
Copy Markdown
Collaborator Author

@jumerckx is working in something similar for upstream MLIR.jl JuliaLLVM/MLIR.jl#77

Maybe we can implement some simplified version of this.

@wsmoses

wsmoses commented Jul 13, 2024

Copy link
Copy Markdown
Member

@mofeing I think emulating this is the right solution https://github.com/JuliaGPU/GPUCompiler.jl/pull/582/files

cc @vchuravy

@mofeing mofeing closed this Jul 13, 2024
@mofeing
mofeing deleted the remove-cassette branch August 13, 2024 10:13
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.

2 participants