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
4 changes: 2 additions & 2 deletions src/pool.jl
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ end

# Free slabs none of whose chunks are in use. Also run when the driver runs out of memory.
function trim_pools!()
empty = with_pool_lock() do
slabs = with_pool_lock() do
empty = Slab[]
for pool in values(pools)
for (base, slab) in collect(pool.slabs)
Expand All @@ -291,7 +291,7 @@ function trim_pools!()
empty
end
# on the LTS stack, this waits for outstanding work on the memory (see `release`)
foreach(slab -> release(slab.buf), empty)
foreach(slab -> release(slab.buf), slabs)
return
end
oneL0.register_reclaim_callback!(trim_pools!)
Expand Down
2 changes: 1 addition & 1 deletion src/profiling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function profile_internally(@nospecialize(f); trace::Bool=false, raw::Bool=false
@warn "The profiler could not allocate memory for its records; some activity is missing from the results"
end

seconds(t) = relative_seconds(t, t_start)
seconds = Base.Fix2(relative_seconds, t_start)
device = (; records.device.kind, records.device.name, records.device.id,
records.device.bytes, start=seconds.(records.device.start),
stop=seconds.(records.device.stop))
Expand Down
3 changes: 3 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ libigc_jll = "94295238-5935-5bd7-bb0f-b00942e9bdd5"
oneAPI = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b"
oneAPI_Support_jll = "b049733a-a71d-5ed3-8eba-7d323ac00b36"

[sources]
oneAPI = {path = ".."}

[compat]
ParallelTestRunner = "2.8"
9 changes: 9 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,15 @@ init_code = quote
..@grab_output, ..@on_device, ..sink
end

# captured variables that get boxed (`Core.Box`) lose their type
using Test
if isdefined(Test, :detect_closure_boxes)
testsuite["closure boxes"] = quote
import KernelAbstractions
@test Test.detect_closure_boxes(oneAPI, Base.get_extension(oneAPI, :KernelAbstractionsExt)) == []
end
end

# Retry test failures once to give a chance to memory-pressure related failures to pass
runtests(oneAPI, args; testsuite, init_code, init_worker_code, env = worker_env,
recycle_on_failure = true, retries = 1
Expand Down
Loading