diff --git a/Project.toml b/Project.toml index 2357d12ca9..d6a9ffaf91 100644 --- a/Project.toml +++ b/Project.toml @@ -19,7 +19,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [compat] CEnum = "0.4" EnzymeCore = "0.5.2" -Enzyme_jll = "0.0.84" +Enzyme_jll = "0.0.86" GPUCompiler = "0.21, 0.22, 0.23, 0.24" LLVM = "6.1" ObjectFile = "0.4" diff --git a/src/api.jl b/src/api.jl index 8f7a030406..49b5c535c2 100644 --- a/src/api.jl +++ b/src/api.jl @@ -126,10 +126,10 @@ function EnzymeCreatePrimalAndGradient(logic, todiff, retType, constant_args, TA uncacheable_args, augmented, atomicAdd) freeMemory = true ccall((:EnzymeCreatePrimalAndGradient, libEnzyme), LLVMValueRef, - (EnzymeLogicRef, LLVMValueRef, CDIFFE_TYPE, Ptr{CDIFFE_TYPE}, Csize_t, + (EnzymeLogicRef, LLVMValueRef, LLVM.API.LLVMBuilderRef, LLVMValueRef, CDIFFE_TYPE, Ptr{CDIFFE_TYPE}, Csize_t, EnzymeTypeAnalysisRef, UInt8, UInt8, CDerivativeMode, Cuint, UInt8, LLVMTypeRef, UInt8, CFnTypeInfo, Ptr{UInt8}, Csize_t, EnzymeAugmentedReturnPtr, UInt8), - logic, todiff, retType, constant_args, length(constant_args), TA, returnValue, + logic, C_NULL, C_NULL, todiff, retType, constant_args, length(constant_args), TA, returnValue, dretUsed, mode, width, freeMemory, additionalArg, forceAnonymousTape, typeInfo, uncacheable_args, length(uncacheable_args), augmented, atomicAdd) end @@ -140,10 +140,10 @@ function EnzymeCreateForwardDiff(logic, todiff, retType, constant_args, TA, freeMemory = true aug = C_NULL ccall((:EnzymeCreateForwardDiff, libEnzyme), LLVMValueRef, - (EnzymeLogicRef, LLVMValueRef, CDIFFE_TYPE, Ptr{CDIFFE_TYPE}, Csize_t, + (EnzymeLogicRef, LLVMValueRef, LLVM.API.LLVMBuilderRef, LLVMValueRef, CDIFFE_TYPE, Ptr{CDIFFE_TYPE}, Csize_t, EnzymeTypeAnalysisRef, UInt8, CDerivativeMode, UInt8, Cuint, LLVMTypeRef, CFnTypeInfo, Ptr{UInt8}, Csize_t, EnzymeAugmentedReturnPtr), - logic, todiff, retType, constant_args, length(constant_args), TA, returnValue, + logic, C_NULL, C_NULL, todiff, retType, constant_args, length(constant_args), TA, returnValue, mode, freeMemory, width, additionalArg, typeInfo, uncacheable_args, length(uncacheable_args), aug) end @@ -162,10 +162,10 @@ function EnzymeCreateAugmentedPrimal(logic, todiff, retType, constant_args, TA, shadowReturnUsed, typeInfo, uncacheable_args, forceAnonymousTape, width, atomicAdd) ccall((:EnzymeCreateAugmentedPrimal, libEnzyme), EnzymeAugmentedReturnPtr, - (EnzymeLogicRef, LLVMValueRef, CDIFFE_TYPE, Ptr{CDIFFE_TYPE}, Csize_t, + (EnzymeLogicRef, LLVMValueRef, LLVM.API.LLVMBuilderRef, LLVMValueRef, CDIFFE_TYPE, Ptr{CDIFFE_TYPE}, Csize_t, EnzymeTypeAnalysisRef, UInt8, UInt8, CFnTypeInfo, Ptr{UInt8}, Csize_t, UInt8, Cuint, UInt8), - logic, todiff, retType, constant_args, length(constant_args), TA, returnUsed, + logic, C_NULL, C_NULL, todiff, retType, constant_args, length(constant_args), TA, returnUsed, shadowReturnUsed, typeInfo, uncacheable_args, length(uncacheable_args), forceAnonymousTape, width, atomicAdd) end diff --git a/src/compiler.jl b/src/compiler.jl index 5e8859b2ea..234e8ec38b 100644 --- a/src/compiler.jl +++ b/src/compiler.jl @@ -6956,9 +6956,7 @@ function __init__() @fwdfunc(jl_array_ptr_copy_fwd), ) register_handler!( - ("jl_uv_associate_julia_struct","uv_async_init","cuLaunchHostFunc","uv_timer_init","uv_timer_start","jl_array_del_beg","ijl_array_del_beg","jl_array_grow_beg","ijl_array_grow_beg","cublasDgemm_v2", "cublasDscal_v2", "ijl_call_in_typeinf_world", "jl_call_in_typeinf_world", - "dpotrf_64_", "dpotrf_", "dtrtrs_64_", "dtrtrs_", "dgetrf_64_", "dgetrf_", "dgetrs_", "dgetrs_64_", "dtzrzf_", "dtzrzf_64_", "dormqr_", "dormqr_64_", "dormrz_", "dormrz_64_", "dlaic1_", "dlaic1_64_", "dgeqp3_", "dgeqp3_64_", - "cholmod_l_start", "dgetri_64_", "dgetri_", "nc_sync"), + (), @augfunc(jl_unhandled_augfwd), @revfunc(jl_unhandled_rev), @fwdfunc(jl_unhandled_fwd), diff --git a/test/runtests.jl b/test/runtests.jl index dfe9d609d9..6bdfd61ad6 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1761,7 +1761,7 @@ end @testset "Exception" begin f_no_derv(x) = ccall("extern doesnotexist", llvmcall, Float64, (Float64,), x) - @test_throws Enzyme.Compiler.NoDerivativeException autodiff(Reverse, f_no_derv, Active, Active(0.5)) + @test_throws Enzyme.Compiler.EnzymeRuntimeException autodiff(Reverse, f_no_derv, Active, Active(0.5)) f_union(cond, x) = cond ? x : 0 g_union(cond, x) = f_union(cond,x)*x