@@ -33,13 +33,15 @@ host to influence how the kernel is executed. The following keyword arguments ar
33
33
no other keyword arguments that influence the launch configuration are specified.
34
34
- `threads::Int` and `blocks::Int`: configure exactly how many threads and blocks are
35
35
launched. This cannot be used in combination with the `total_threads` argument.
36
+ - `name::String`: inform the back end about the name of the kernel to be executed.
37
+ This can be used to emit better diagnostics, and is useful with anonymous kernels.
36
38
"""
37
39
function gpu_call (kernel:: Base.Callable , args... ;
38
40
target:: AbstractArray = first (args),
39
41
total_threads:: Union{Int,Nothing} = nothing ,
40
42
threads:: Union{Int,Nothing} = nothing ,
41
43
blocks:: Union{Int,Nothing} = nothing ,
42
- kwargs ... )
44
+ name :: Union{String,Nothing} = nothing )
43
45
# determine how many threads/blocks to launch
44
46
if total_threads=== nothing && threads=== nothing && blocks=== nothing
45
47
total_threads = length (target)
@@ -58,7 +60,7 @@ function gpu_call(kernel::Base.Callable, args...;
58
60
end
59
61
end
60
62
61
- gpu_call (backend (target), kernel, args... ; threads= threads, blocks= blocks, kwargs ... )
63
+ gpu_call (backend (target), kernel, args... ; threads= threads, blocks= blocks, name = name )
62
64
end
63
65
64
66
gpu_call (backend:: AbstractGPUBackend , kernel, args... ; kwargs... ) = error (" Not implemented" ) # COV_EXCL_LINE
0 commit comments