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
7 changes: 1 addition & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55"
GPUToolbox = "096a3bc2-3ced-46d0-87f4-dd12716f4bfc"
IntelITT = "c9b2f978-7543-4802-ae44-75068f23ee64"
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
KernelInterface = "4ee993da-d684-4d17-a7dd-4e58e78d92bf"
LLVM = "929cbde3-209d-540e-8aea-75f648917ca0"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand All @@ -35,12 +36,6 @@ oneAPI_Level_Zero_Headers_jll = "f4bc562b-d309-54f8-9efb-476e56f0410d"
oneAPI_Level_Zero_Loader_jll = "13eca655-d68d-5b81-8367-6d99d727ab01"
oneAPI_Support_jll = "b049733a-a71d-5ed3-8eba-7d323ac00b36"

[weakdeps]
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"

[extensions]
KernelAbstractionsExt = "KernelAbstractions"

[compat]
AbstractFFTs = "1.5.0"
Adapt = "4"
Expand Down
22 changes: 0 additions & 22 deletions ext/KernelAbstractionsExt.jl

This file was deleted.

14 changes: 14 additions & 0 deletions src/oneAPIKernels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module oneAPIKernels
using ..oneAPI
using ..oneAPI: @device_override, SPIRVIntrinsics, method_table, kernel_convert, zefunction

import KernelAbstractions as KA
import KernelInterface as KI

import Adapt
Expand Down Expand Up @@ -213,6 +214,19 @@ function KI.multiprocessor_count(::oneAPIBackend)::Int
end


## KernelAbstractions

Adapt.adapt_storage(::KA.CPU, a::oneArray) = convert(Array, a)

# sparse arrays (oneMKL is only available on Linux)
@static if Sys.islinux()
import SparseArrays
Adapt.adapt_storage(::KA.CPU, a::oneAPI.oneMKL.oneAbstractSparseMatrix) = SparseArrays.SparseMatrixCSC(a)
end

Adapt.adapt_storage(to::KA.ConstAdaptor, a::oneDeviceArray) = Base.Experimental.Const(a)


## Indexing Functions
## COV_EXCL_START

Expand Down
Loading