Skip to content

Commit 82a28a4

Browse files
committed
dont't use nested inits
1 parent bf99c1d commit 82a28a4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/backends/cuda.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ const FREE_STREAMS = CuStream[]
66
const STREAMS = CuStream[]
77
const STREAM_GC_THRESHOLD = Ref{Int}(16)
88

9-
@init begin
10-
if haskey(ENV, "KERNELABSTRACTIONS_STREAMS_GC_THRESHOLD")
11-
global STREAM_GC_THRESHOLD[] = parse(Int, ENV["KERNELABSTRACTIONS_STREAMS_GC_THRESHOLD"])
12-
end
13-
9+
# This code is loaded after an `@init` step
10+
if haskey(ENV, "KERNELABSTRACTIONS_STREAMS_GC_THRESHOLD")
11+
global STREAM_GC_THRESHOLD[] = parse(Int, ENV["KERNELABSTRACTIONS_STREAMS_GC_THRESHOLD"])
1412
end
1513

1614
## Stream GC

0 commit comments

Comments
 (0)