From a1454ce07040d0dc715f3ca8b7fc2e49ab550191 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Fri, 17 Jan 2025 23:42:31 +0100 Subject: [PATCH] remove unecessary restrictions --- lib/cudadrv/execution.jl | 4 ---- src/compiler/execution.jl | 9 --------- 2 files changed, 13 deletions(-) diff --git a/lib/cudadrv/execution.jl b/lib/cudadrv/execution.jl index 59da0d4900..e90f386117 100644 --- a/lib/cudadrv/execution.jl +++ b/lib/cudadrv/execution.jl @@ -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. diff --git a/src/compiler/execution.jl b/src/compiler/execution.jl index 5d8f4ed525..82a940db60 100644 --- a/src/compiler/execution.jl +++ b/src/compiler/execution.jl @@ -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))))