Skip to content

add precompilation hook to enzyme#712

Closed
collinwarner wants to merge 0 commit into
EnzymeAD:mainfrom
collinwarner:main
Closed

add precompilation hook to enzyme#712
collinwarner wants to merge 0 commit into
EnzymeAD:mainfrom
collinwarner:main

Conversation

@collinwarner
Copy link
Copy Markdown

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))

Comment thread 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
Copy Markdown
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
Copy Markdown
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)

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