Skip to content

Commit 39b7e34

Browse files
Remove Julia v1.9 get_extension compatibility code
Since all SciML packages now require Julia v1.10+, we can remove the compatibility checks for `isdefined(Base, :get_extension)` as package extensions are available in all supported Julia versions. This removes unnecessary version checks in extension loading code.
1 parent 5b558a1 commit 39b7e34

File tree

5 files changed

+5
-18
lines changed

5 files changed

+5
-18
lines changed

ext/AMDGPUExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module AMDGPUExt
2-
isdefined(Base, :get_extension) ? (using AMDGPU) : (using ..AMDGPU)
2+
using AMDGPU
33
import DiffEqGPU
44

55
using .AMDGPU

ext/CUDAExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module CUDAExt
2-
isdefined(Base, :get_extension) ? (using CUDA) : (using ..CUDA)
2+
using CUDA
33
import DiffEqGPU
44

55
using .CUDA

ext/MetalExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module MetalExt
2-
isdefined(Base, :get_extension) ? (using Metal) : (using ..Metal)
2+
using Metal
33
import DiffEqGPU
44

55
using .Metal

ext/oneAPIExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module oneAPIExt
2-
isdefined(Base, :get_extension) ? (using oneAPI) : (using ..oneAPI)
2+
using oneAPI
33
import DiffEqGPU
44

55
using .oneAPI

src/DiffEqGPU.jl

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,4 @@ export GPURosenbrock23, GPURodas4, GPURodas5P, GPUKvaerno3, GPUKvaerno5
8383
export terminate!
8484

8585
# This symbol is only defined on Julia versions that support extensions
86-
if !isdefined(Base, :get_extension)
87-
using Requires
88-
end
89-
90-
@static if !isdefined(Base, :get_extension)
91-
function __init__()
92-
@require CUDA="052768ef-5323-5732-b1bb-66c8b64840ba" include("../ext/CUDAExt.jl")
93-
@require AMDGPU="21141c5a-9bdb-4563-92ae-f87d6854732e" include("../ext/AMDGPUExt.jl")
94-
@require oneAPI="8f75cd03-7ff8-4ecb-9b8f-daf728133b1b" include("../ext/oneAPIExt.jl")
95-
@require Metal="dde4c033-4e86-420c-a63e-0dd931031962" include("../ext/MetalExt.jl")
96-
end
97-
end
98-
99-
end # module
86+
@static end # module

0 commit comments

Comments
 (0)