Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/tvm/_ffi/_cython/packed_func.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ cdef inline int make_arg(object arg,
ptr = arg._tvm_handle
value[0].v_handle = (<void*>ptr)
tcode[0] = arg.__class__._tvm_tcode
elif isinstance(arg, (int, long)):
elif isinstance(arg, Integral):
value[0].v_int64 = arg
tcode[0] = kInt
elif isinstance(arg, float):
Expand Down
5 changes: 4 additions & 1 deletion tests/python/unittest/test_runtime_packed_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,14 @@ def check_assign(dtype):
for t in ["float64", "float32"]:
check_assign(t)

def test_numpy_scalar():
maxint = (1<<63) - 1
assert tvm.testing.echo(np.int64(maxint)) == maxint


if __name__ == "__main__":
test_numpy_scalar()
test_rvalue_ref()
exit(0)
test_empty_array()
test_get_global()
test_get_callback_with_node()
Expand Down