diff --git a/Project.toml b/Project.toml index cdc30373..fca677c5 100644 --- a/Project.toml +++ b/Project.toml @@ -9,8 +9,6 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" SolverCore = "ff4d7338-4cf1-434d-91df-b86cb86fb843" [weakdeps] -AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" -CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9" JuMP = "4076af6c-e467-56ae-b986-b466b2749572" KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" @@ -18,26 +16,18 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6" MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71" -OpenCL = "08131aa3-fb12-5dee-8b74-c09406e224a2" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" -oneAPI = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b" [extensions] -ExaModelsAMDGPU = "AMDGPU" -ExaModelsCUDA = "CUDA" ExaModelsIpopt = ["MathOptInterface", "NLPModelsIpopt"] ExaModelsJuMP = "JuMP" ExaModelsKernelAbstractions = "KernelAbstractions" ExaModelsLinearAlgebra = "LinearAlgebra" ExaModelsMOI = "MathOptInterface" ExaModelsMadNLP = ["MadNLP", "MathOptInterface"] -ExaModelsOneAPI = "oneAPI" -ExaModelsOpenCL = "OpenCL" ExaModelsSpecialFunctions = "SpecialFunctions" [compat] -AMDGPU = "2" -CUDA = "5" Ipopt = "1.11" JuMP = "1" KernelAbstractions = "0.9" @@ -45,8 +35,6 @@ MadNLP = "0.9" MathOptInterface = "1.19" NLPModels = "0.21" NLPModelsIpopt = "0.11" -OpenCL = "0.10" SolverCore = "0.3" SpecialFunctions = "2" julia = "1.9" -oneAPI = "2" diff --git a/ext/ExaModelsAMDGPU.jl b/ext/ExaModelsAMDGPU.jl deleted file mode 100644 index 5f863384..00000000 --- a/ext/ExaModelsAMDGPU.jl +++ /dev/null @@ -1,7 +0,0 @@ -module ExaModelsAMDGPU - -import ExaModels, AMDGPU - -ExaModels.convert_array(v, backend::AMDGPU.ROCBackend) = AMDGPU.ROCArray(v) - -end diff --git a/ext/ExaModelsCUDA.jl b/ext/ExaModelsCUDA.jl deleted file mode 100644 index 4eeee4cd..00000000 --- a/ext/ExaModelsCUDA.jl +++ /dev/null @@ -1,8 +0,0 @@ -module ExaModelsCUDA - -import ExaModels: ExaModels, NLPModels -import CUDA: CUDA, CUDABackend, CuArray - -ExaModels.convert_array(v, backend::CUDABackend) = CuArray(v) - -end diff --git a/ext/ExaModelsKernelAbstractions.jl b/ext/ExaModelsKernelAbstractions.jl index 111f4b75..73e51c4b 100644 --- a/ext/ExaModelsKernelAbstractions.jl +++ b/ext/ExaModelsKernelAbstractions.jl @@ -4,6 +4,8 @@ import ExaModels: ExaModels, NLPModels import KernelAbstractions: KernelAbstractions, @kernel, @index, @Const, synchronize, CPU ExaModels.convert_array(v, backend::CPU) = v +ExaModels.convert_array(v, backend) = KernelAbstractions.allocate(backend, eltype(v), length(v)) + function getitr(gen::UnitRange{Int64}) return gen diff --git a/ext/ExaModelsOneAPI.jl b/ext/ExaModelsOneAPI.jl deleted file mode 100644 index 844ab515..00000000 --- a/ext/ExaModelsOneAPI.jl +++ /dev/null @@ -1,19 +0,0 @@ -module ExaModelsOneAPI - -import ExaModels, oneAPI - -ExaModels.convert_array(v, backend::oneAPI.oneAPIBackend) = oneAPI.oneArray(v) - -ExaModels.sort!(array::A; lt = isless) where {A<:oneAPI.oneArray} = - copyto!(array, sort!(Array(array); lt = lt)) - -# below is type piracy -function Base.findall(f::F, bitarray::A) where {F<:Function,A<:oneAPI.oneArray} - a = Array(bitarray) - b = findall(f, a) - c = similar(bitarray, eltype(b), length(b)) - return copyto!(c, b) -end -Base.findall(bitarray::A) where {A<:oneAPI.oneArray} = Base.findall(identity, bitarray) - -end # module diff --git a/ext/ExaModelsOpenCL.jl b/ext/ExaModelsOpenCL.jl deleted file mode 100644 index f7f3a496..00000000 --- a/ext/ExaModelsOpenCL.jl +++ /dev/null @@ -1,19 +0,0 @@ -module ExaModelsOpenCL - -import ExaModels, OpenCL - -ExaModels.convert_array(v, backend::OpenCL.OpenCLBackend) = OpenCL.CLArray(v) - -ExaModels.sort!(array::A; lt = isless) where {A<:OpenCL.CLArray} = - copyto!(array, sort!(Array(array); lt = lt)) - -# below is type piracy -function Base.findall(f::F, bitarray::A) where {F<:Function,A<:OpenCL.CLArray} - a = Array(bitarray) - b = findall(f, a) - c = similar(bitarray, eltype(b), length(b)) - return copyto!(c, b) -end -Base.findall(bitarray::A) where {A<:OpenCL.CLArray} = Base.findall(identity, bitarray) - -end # module