We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5de5a5c commit a29682aCopy full SHA for a29682a
src/validation.jl
@@ -88,6 +88,15 @@ function check_invocation(@nospecialize(job::CompilerJob))
88
Core.Compiler.isconstType(dt) && continue
89
real_arg_i += 1
90
91
+ @static if VERSION >= v"1.7"
92
+ # XXX: can we support these for CPU targets?
93
+ if dt <: Core.OpaqueClosure
94
+ throw(KernelError(job, "passing an opaque closure",
95
+ """Argument $arg_i to your kernel function is an opaque closure.
96
+ This is a CPU-only object not supported by GPUCompiler."""))
97
+ end
98
99
+
100
if !isbitstype(dt)
101
throw(KernelError(job, "passing and using non-bitstype argument",
102
"""Argument $arg_i to your kernel function is of type $dt, which is not isbits:
0 commit comments