From d5476db848598bda57f69b4a1a10f1f6e0681c8a Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 5 Mar 2024 13:18:16 -0500 Subject: [PATCH 1/3] Define parent_job_for_tape_type --- lib/EnzymeCore/Project.toml | 2 +- lib/EnzymeCore/src/EnzymeCore.jl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/EnzymeCore/Project.toml b/lib/EnzymeCore/Project.toml index ad6e42e371..f8f3721aad 100644 --- a/lib/EnzymeCore/Project.toml +++ b/lib/EnzymeCore/Project.toml @@ -1,7 +1,7 @@ name = "EnzymeCore" uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" authors = ["William Moses ", "Valentin Churavy "] -version = "0.7.0" +version = "0.7.1" [compat] Adapt = "3, 4" diff --git a/lib/EnzymeCore/src/EnzymeCore.jl b/lib/EnzymeCore/src/EnzymeCore.jl index 56c200cd61..938787a39e 100644 --- a/lib/EnzymeCore/src/EnzymeCore.jl +++ b/lib/EnzymeCore/src/EnzymeCore.jl @@ -239,6 +239,8 @@ end function tape_type end +function parent_job_for_tape_type end + include("rules.jl") end # module EnzymeCore From 5a424d30c1326ffdb4f4f06fa812503dde28d000 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 13 Mar 2024 18:07:03 -0400 Subject: [PATCH 2/3] Update lib/EnzymeCore/src/EnzymeCore.jl --- lib/EnzymeCore/src/EnzymeCore.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/EnzymeCore/src/EnzymeCore.jl b/lib/EnzymeCore/src/EnzymeCore.jl index 938787a39e..6f6222ce18 100644 --- a/lib/EnzymeCore/src/EnzymeCore.jl +++ b/lib/EnzymeCore/src/EnzymeCore.jl @@ -239,7 +239,7 @@ end function tape_type end -function parent_job_for_tape_type end +function compiler_config_from_backend end include("rules.jl") From 114b37a66d0178c397761ab2e2ca986e70c4252a Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sat, 16 Mar 2024 17:50:20 -0400 Subject: [PATCH 3/3] add docs --- lib/EnzymeCore/src/EnzymeCore.jl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/EnzymeCore/src/EnzymeCore.jl b/lib/EnzymeCore/src/EnzymeCore.jl index 6f6222ce18..680e9e42d3 100644 --- a/lib/EnzymeCore/src/EnzymeCore.jl +++ b/lib/EnzymeCore/src/EnzymeCore.jl @@ -239,7 +239,21 @@ end function tape_type end -function compiler_config_from_backend end +""" + compiler_job_from_backend(::KernelAbstractions.Backend, F::Type, TT:Type)::GPUCompiler.CompilerJob + +Returns a GPUCompiler CompilerJob from a backend as specified by the first argument to the function. + +For example, in CUDA one would do: + +```julia +function EnzymeCore.compiler_job_from_backend(::CUDABackend, @nospecialize(F::Type), @nospecialize(TT::Type)) + mi = GPUCompiler.methodinstance(F, TT) + return GPUCompiler.CompilerJob(mi, CUDA.compiler_config(CUDA.device())) +end +``` +""" +function compiler_job_from_backend end include("rules.jl")