Skip to content

Commit d2ac722

Browse files
committed
Remove v_bool in cython bindings
1 parent 133290a commit d2ac722

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/tvm/_ffi/_cython/packed_func.pxi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ cdef inline int make_arg(object arg,
121121
elif isinstance(arg, bool):
122122
# A python `bool` is a subclass of `int`, so this check
123123
# must occur before `Integral`.
124-
value[0].v_bool = arg
124+
value[0].v_int64 = arg
125125
tcode[0] = kTVMArgBool
126126
elif isinstance(arg, Integral):
127127
value[0].v_int64 = arg
@@ -215,7 +215,7 @@ cdef inline object make_ret(TVMValue value, int tcode):
215215
elif tcode == kTVMNullptr:
216216
return None
217217
elif tcode == kTVMArgBool:
218-
return value.v_bool
218+
return bool(value.v_int64)
219219
elif tcode == kInt:
220220
return value.v_int64
221221
elif tcode == kFloat:

0 commit comments

Comments
 (0)