Skip to content

Commit

Permalink
remove requires
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Feb 5, 2025
1 parent cbf4eae commit 5d82cd4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 31 deletions.
5 changes: 0 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@ version = "0.10.0-dev"
[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Atomix = "a9b6321e-bd34-4604-b9c9-b65b8de01458"
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LLVM = "929cbde3-209d-540e-8aea-75f648917ca0"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
OpenCL_jll = "6cb37087-e8b6-5417-8430-1f242f1e46e4"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SPIRVIntrinsics = "71d1d633-e7e8-4a92-83a1-de8814b09ba8"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
pocl_jll = "627d6b7a-bbe6-5189-83e7-98cc0a5aeadd"
Expand All @@ -40,7 +36,6 @@ InteractiveUtils = "1.6"
LinearAlgebra = "1.6"
MacroTools = "0.5"
PrecompileTools = "1"
Requires = "1.3"
SparseArrays = "<0.0.1, 1.6"
StaticArrays = "0.12, 1.0"
UUIDs = "<0.0.1, 1.6"
Expand Down
15 changes: 0 additions & 15 deletions src/KernelAbstractions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -830,19 +830,4 @@ PrecompileTools.@compile_workload begin
end
end

if !isdefined(Base, :get_extension)
using Requires
end

@static if !isdefined(Base, :get_extension)
function __init__()
@require EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" include("../ext/EnzymeExt.jl")
end
end

if !isdefined(Base, :get_extension)
include("../ext/LinearAlgebraExt.jl")
include("../ext/SparseArraysExt.jl")
end

end #module
22 changes: 11 additions & 11 deletions src/pocl/device/quirks.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
macro print_and_throw(args...)
quote
return quote
@println "ERROR: " $(args...) "."
throw(nothing)
end
Expand Down Expand Up @@ -39,16 +39,16 @@ end

# diagonal.jl
# XXX: remove when we have malloc
import LinearAlgebra
@device_override function Base.setindex!(D::LinearAlgebra.Diagonal, v, i::Int, j::Int)
@boundscheck checkbounds(D, i, j)
if i == j
@inbounds D.diag[i] = v
elseif !iszero(v)
@print_and_throw "cannot set off-diagonal entry to a nonzero value"
end
return v
end
# import LinearAlgebra
# @device_override function Base.setindex!(D::LinearAlgebra.Diagonal, v, i::Int, j::Int)
# @boundscheck checkbounds(D, i, j)
# if i == j
# @inbounds D.diag[i] = v
# elseif !iszero(v)
# @print_and_throw "cannot set off-diagonal entry to a nonzero value"
# end
# return v
# end

# number.jl
# XXX: remove when we have malloc
Expand Down

0 comments on commit 5d82cd4

Please sign in to comment.