Summary
The test test_same_argument_types_and_overload in numbast/src/numbast/experimental/mlir/static/tests/test_function_static_bindings.py is parametrized over ["int32", "float32"], but its kernel always calls add(int32(1), int32(2)) regardless of the dtype parameter. As a result, the float32 overload of add is never dispatched or verified.
Location
File: numbast/src/numbast/experimental/mlir/static/tests/test_function_static_bindings.py
Lines: ~112–127
Expected Behavior
Each parametrized case should invoke add with arguments matching the declared dtype, so the float32 run calls add(float32(1.0), float32(2.0)) and exercises the float overload path.
Suggested Fix
Select the argument constructor based on dtype before defining the kernel:
ctor = int32 if dtype == "int32" else float32
@cuda.jit(link=[impl])
def kernel(arr):
arr[0] = add(ctor(1), ctor(2))
References
/cc @isVoid
Summary
The test
test_same_argument_types_and_overloadinnumbast/src/numbast/experimental/mlir/static/tests/test_function_static_bindings.pyis parametrized over["int32", "float32"], but its kernel always callsadd(int32(1), int32(2))regardless of thedtypeparameter. As a result, thefloat32overload ofaddis never dispatched or verified.Location
File:
numbast/src/numbast/experimental/mlir/static/tests/test_function_static_bindings.pyLines: ~112–127
Expected Behavior
Each parametrized case should invoke
addwith arguments matching the declareddtype, so thefloat32run callsadd(float32(1.0), float32(2.0))and exercises the float overload path.Suggested Fix
Select the argument constructor based on
dtypebefore defining the kernel:References
/cc @isVoid