Skip to content

add precompilation hook to enzyme #712

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 0 commits into from

Conversation

collinwarner
Copy link

In progress. Add ability to precompile enzyme code with GPUCompiler update JuliaGPU/GPUCompiler.jl#425.

Current use is verbose, will add example code. But right now, precompilation would have to be called like: Enzyme.Compiler.precompile_enzyme(func, types, Enzyme.API.DEM_(mode type))

src/compiler.jl Outdated
target = DefaultCompilerTarget()
params = PrimalCompilerParams(mode)
job = CompilerJob(source, CompilerConfig(target, params; kernel=kernel, entry_abi=entry_abi, always_inline=always_inline))
GPUCompiler.precompile_gpucompiler(job)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something more similar to

job = Compiler.CompilerJob(mi, CompilerConfig(target, params; kernel=false), World)
might be helpful to enforce the same job

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the user have to pass all those params?
params = Compiler.EnzymeCompilerParams(Tuple{FA, TT.parameters...}, Mode, width, remove_innerty(A), true, #=abiwrap=#true, ModifiedBetween, ReturnPrimal, ShadowInit, UnknownTapeType)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants