Skip to content

Commit 54796ad

Browse files
committed
removing heuristic
1 parent 1b71726 commit 54796ad

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/gpuarrays.jl

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,12 @@
11
# GPUArrays.jl interface
22

3-
import KernelAbstractions
4-
import KernelAbstractions: Backend
5-
63
#
74
# Device functionality
85
#
96

107

118
## execution
129

13-
@inline function GPUArrays.launch_heuristic(::oneAPIBackend, obj::O, args::Vararg{Any,N};
14-
elements::Int, elements_per_thread::Int) where {O,N}
15-
ndrange = ceil(Int, elements / elements_per_thread)
16-
ndrange, workgroupsize, iterspace, dynamic = KA.launch_config(obj, ndrange,
17-
nothing)
18-
19-
# this might not be the final context, since we may tune the workgroupsize
20-
ctx = KA.mkcontext(obj, ndrange, iterspace)
21-
22-
kernel = @oneapi launch=false obj.f(ctx, args...)
23-
24-
items = launch_configuration(kernel)
25-
# XXX: how many groups is a good number? the API doesn't tell us.
26-
# measured on a low-end IGP, 32 blocks seems like a good sweet spot.
27-
# note that this only matters for grid-stride kernels, like broadcast.
28-
return (threads=items, blocks=32)
29-
end
30-
3110
const GLOBAL_RNGs = Dict{ZeDevice,GPUArrays.RNG}()
3211
function GPUArrays.default_rng(::Type{<:oneArray})
3312
dev = device()

0 commit comments

Comments
 (0)