Skip to content

Commit

Permalink
Improve cuda error (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Jan 6, 2025
1 parent 80e4f28 commit 03b8363
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/ReactantCUDAExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@ Reactant.@reactant_overlay @noinline function (func::LLVMFunc{F,tt})(
aliases = MLIR.IR.Attribute[]
rarrays = TracedRArray[]
for (i, a) in enumerate(args)
@assert a isa CuTracedArray
if !(a isa CuTracedArray)
throw(AssertionError("Expected a CuTracedArray found $(Core.Typeof(a)), $a"))
end
ta =
Base.unsafe_pointer_to_objref(Base.reinterpret(Ptr{Cvoid}, a.ptr))::TracedRArray
push!(rarrays, ta)
Expand Down

0 comments on commit 03b8363

Please sign in to comment.