Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ authors = ["Sungho Shin <sushin@mit.edu>"]
version = "0.9.5"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6"
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"
Expand All @@ -20,24 +19,19 @@ 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"
Adapt = "4"
Ipopt = "1.11"
JuMP = "1"
KernelAbstractions = "0.9"
Expand All @@ -49,4 +43,3 @@ OpenCL = "0.10"
SolverCore = "0.3"
SpecialFunctions = "2"
julia = "1.9"
oneAPI = "2"
7 changes: 0 additions & 7 deletions ext/ExaModelsAMDGPU.jl

This file was deleted.

8 changes: 0 additions & 8 deletions ext/ExaModelsCUDA.jl

This file was deleted.

2 changes: 0 additions & 2 deletions ext/ExaModelsKernelAbstractions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ module ExaModelsKernelAbstractions
import ExaModels: ExaModels, NLPModels
import KernelAbstractions: KernelAbstractions, @kernel, @index, @Const, synchronize, CPU

ExaModels.convert_array(v, backend::CPU) = v

function getitr(gen::UnitRange{Int64})
return gen
end
Expand Down
19 changes: 0 additions & 19 deletions ext/ExaModelsOneAPI.jl

This file was deleted.

2 changes: 0 additions & 2 deletions ext/ExaModelsOpenCL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ 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))

Expand Down
1 change: 1 addition & 0 deletions src/ExaModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ For more information, please visit https://github.com/exanauts/ExaModels.jl
"""
module ExaModels

import Adapt: adapt
import NLPModels:
NLPModels,
obj,
Expand Down
3 changes: 2 additions & 1 deletion src/templates.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# A template for convert_array. This is extended in extension packages for each device architecture.
# Convert array to the appropriate device using Adapt.jl.
convert_array(v, ::Nothing) = v
convert_array(v, backend) = adapt(backend, v)

# to avoid type privacy
sort!(array; kwargs...) = Base.sort!(array; kwargs...)
Expand Down
Loading