Skip to content

Commit 1d1ebd9

Browse files
committed
Fix randn
1 parent fbc5214 commit 1d1ebd9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/JLArrays/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "JLArrays"
22
uuid = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb"
33
authors = ["Tim Besard <tim.besard@gmail.com>"]
4-
version = "0.3.0"
4+
version = "0.3.1"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

lib/JLArrays/src/JLArrays.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ KernelAbstractions.allocate(::JLBackend, ::Type{T}, dims::Tuple) where T = JLArr
377377
end
378378

379379
if KernelAbstractions.workgroupsize(kernel) <: DynamicSize && workgroupsize === nothing
380-
workgroupsize = (1024,) # Vectorization, 4x unrolling, minimal grain size
380+
workgroupsize = (MAXTHREADS,) # Vectorization, 4x unrolling, minimal grain size
381381
end
382382
iterspace, dynamic = partition(kernel, ndrange, workgroupsize)
383383
# partition checked that the ndrange's agreed
@@ -403,6 +403,7 @@ else
403403
end
404404

405405
function (obj::Kernel{JLBackend})(args...; ndrange=nothing, workgroupsize=nothing)
406+
ndrange, workgroupsize, _, _ = launch_config(obj, ndrange, workgroupsize)
406407
device_args = jlconvert.(args)
407408
new_obj = convert_to_cpu(obj)
408409
new_obj(device_args...; ndrange, workgroupsize)

0 commit comments

Comments
 (0)