Skip to content

Commit 1c34336

Browse files
Use GPUToolbox (#490)
1 parent fac461d commit 1c34336

File tree

6 files changed

+7
-75
lines changed

6 files changed

+7
-75
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
99
ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
1010
GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
1111
GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55"
12+
GPUToolbox = "096a3bc2-3ced-46d0-87f4-dd12716f4bfc"
1213
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
1314
LLVM = "929cbde3-209d-540e-8aea-75f648917ca0"
1415
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
@@ -33,6 +34,7 @@ CEnum = "0.4, 0.5"
3334
ExprTools = "0.1"
3435
GPUArrays = "11.2.1"
3536
GPUCompiler = "0.23, 0.24, 0.25, 0.26, 0.27, 1"
37+
GPUToolbox = "0.1"
3638
KernelAbstractions = "0.9.1"
3739
LLVM = "6, 7, 8, 9"
3840
NEO_jll = "=24.26.30049"

lib/level-zero/event.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Base.reset(event::ZeEvent) = zeEventHostReset(event)
6565
append_reset!(list::ZeCommandList, event::ZeEvent) = zeCommandListAppendEventReset(list, event)
6666

6767
function Base.isdone(event::ZeEvent)
68-
res = unsafe_zeEventQueryStatus(event)
68+
res = unchecked_zeEventQueryStatus(event)
6969
if res == RESULT_NOT_READY
7070
return false
7171
elseif res == RESULT_SUCCESS

lib/level-zero/fence.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Base.wait(fence::ZeFence, timeout::Number=typemax(UInt64)) =
2929
Base.reset(fence::ZeFence) = zeFenceReset(fence)
3030

3131
function Base.isdone(fence::ZeFence)
32-
res = unsafe_zeFenceQueryStatus(fence)
32+
res = unchecked_zeFenceQueryStatus(fence)
3333
if res == RESULT_NOT_READY
3434
return false
3535
elseif res == RESULT_SUCCESS

lib/level-zero/module.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ mutable struct ZeModule
3131
pConstants=Base.unsafe_convert(Ptr{ze_module_constants_t}, constants)
3232
))
3333
handle_ref = Ref{ze_module_handle_t}()
34-
res = unsafe_zeModuleCreate(ctx, dev, desc_ref, handle_ref, log_ref)
34+
res = unchecked_zeModuleCreate(ctx, dev, desc_ref, handle_ref, log_ref)
3535
end
3636

3737
# read the log

lib/utils/APIUtils.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
module APIUtils
22

33
# helpers that facilitate working with C APIs
4-
include("call.jl")
4+
using GPUToolbox: @checked, @debug_ccall
5+
export @checked, @debug_ccall
56
include("enum.jl")
67

78
end

lib/utils/call.jl

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)