Skip to content

Commit c7a2be5

Browse files
committed
Don't allocate random numbers on the GPU during launch.
1 parent c7c9db1 commit c7a2be5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/execution.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ end
275275
(threads.width * threads.height * threads.depth) > kernel.pipeline.maxTotalThreadsPerThreadgroup &&
276276
throw(ArgumentError("Number of threads in group ($(threads.width * threads.height * threads.depth)) should not exceed $(kernel.pipeline.maxTotalThreadsPerThreadgroup)"))
277277

278-
kernel_state = KernelState(rand(UInt32))
278+
kernel_state = KernelState(Random.rand(UInt32))
279279

280280
cmdbuf = MTLCommandBuffer(queue)
281281
cmdbuf.label = "MTLCommandBuffer($(nameof(kernel.f)))"

0 commit comments

Comments
 (0)