Skip to content

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)

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