Skip to content

Commit

Permalink
remove unecessary restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Jan 17, 2025
1 parent 1ce2219 commit a1454ce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions lib/cudadrv/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ end

# pack arguments in a buffer that CUDA expects
@inline @generated function pack_arguments(f::Function, args...)
for arg in args
isbitstype(arg) || throw(ArgumentError("Arguments to kernel should be bitstype."))
end

ex = quote end

# If f has N parameters, then kernelParams needs to be an array of N pointers.
Expand Down
9 changes: 0 additions & 9 deletions src/compiler/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,6 @@ end
call_t = Type[x[1] for x in zip(sig.parameters, to_pass) if x[2]]
call_args = Union{Expr,Symbol}[x[1] for x in zip(argexprs, to_pass) if x[2]]

# replace non-isbits arguments (they should be unused, or compilation would have failed)
# alternatively, make it possible to `launch` with non-isbits arguments.
for (i,dt) in enumerate(call_t)
if !(isbitstype(dt) || dt === Symbol)
call_t[i] = Ptr{Any}
call_args[i] = :C_NULL
end
end

# add the kernel state, passing an instance with a unique seed
pushfirst!(call_t, KernelState)
pushfirst!(call_args, :(KernelState(kernel.state.exception_info, make_seed(kernel))))
Expand Down

0 comments on commit a1454ce

Please sign in to comment.