Skip to content

Commit 3f45655

Browse files
committed
test: Math intrinsics return type matches
1 parent c137a8c commit 3f45655

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/device/math.jl

+4
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ using Base.FastMath
1616
isdefined(SpecialFunctions, jlintr) ? SpecialFunctions :
1717
nothing)
1818
modname !== nothing || continue
19+
1920
# FIXME: Handle all input and output args
2021
T = intr.inp_args[1]
2122
intr_kern = Symbol("intr_$(jlintr)_$T")
23+
2224
@eval begin
2325
function $intr_kern(out, a)
2426
i = Device.workitemIdx().x
@@ -38,6 +40,8 @@ using Base.FastMath
3840
end
3941
len = prod(dims)
4042

43+
@test only(Base.return_types($modname.$jlintr, (eltype(d_a),))) === eltype(d_out)
44+
4145
wait(@roc groupsize=len $intr_kern(d_out, d_a))
4246
out = Array(d_out)
4347
@test $modname.$jlintr.(a) out

0 commit comments

Comments
 (0)