Skip to content

Commit 2f1a2fb

Browse files
committed
Format
1 parent ed03fb0 commit 2f1a2fb

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

lib/level-zero/utils.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ isdebug(group) = Base.CoreLogging.current_logger_for_env(Base.CoreLogging.Debug,
66
const _reclaim_callbacks = Function[]
77

88
function register_reclaim_callback!(f::Function)
9-
push!(_reclaim_callbacks, f)
9+
return push!(_reclaim_callbacks, f)
1010
end
1111

1212
function _run_reclaim_callbacks()
@@ -16,6 +16,7 @@ function _run_reclaim_callbacks()
1616
catch
1717
end
1818
end
19+
return
1920
end
2021

2122
function retry_reclaim(f, isfailed)

lib/mkl/wrappers_sparse.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const _deferred_sparse_handles = Vector{matrix_handle_t}()
77
const _deferred_sparse_handles_lock = ReentrantLock()
88

99
function sparse_release_matrix_handle(A::oneAbstractSparseMatrix)
10-
if A.handle !== nothing
10+
return if A.handle !== nothing
1111
lock(_deferred_sparse_handles_lock) do
1212
push!(_deferred_sparse_handles, A.handle)
1313
end
@@ -35,7 +35,7 @@ function flush_deferred_sparse_releases()
3535
@warn "Error releasing sparse matrix handle" exception = err
3636
end
3737
end
38-
synchronize(queue)
38+
return synchronize(queue)
3939
end
4040

4141
for (fname, elty, intty) in ((:onemklSsparse_set_csr_data , :Float32 , :Int32),

src/pool.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function _maybe_gc(dev, bytes)
1717
allocated = _allocated_bytes[]
1818
allocated <= 0 && return
1919
total_mem = _get_total_mem(dev)
20-
if allocated + bytes > total_mem * 0.8
20+
return if allocated + bytes > total_mem * 0.8
2121
# Flush deferred resource releases (e.g., MKL sparse handles) from previous GC
2222
# cycles first — these are safe to release now because they were deferred earlier.
2323
# Do this BEFORE GC to avoid racing with new finalizers.

0 commit comments

Comments
 (0)