areusch commented on a change in pull request #5484:
URL: https://github.com/apache/incubator-tvm/pull/5484#discussion_r419610442
##########
File path: python/tvm/_ffi/_ctypes/packed_func.py
##########
@@ -141,6 +141,17 @@ def _make_tvm_args(args, temp_args):
elif isinstance(arg, TVMContext):
values[i].v_int64 = _ctx_to_int64(arg)
type_codes[i] = TypeCode.TVM_CONTEXT
+ elif isinstance(arg, bytes):
Review comment:
do you need the separate elif block here? seems like you could just make
the following block `elif isinstance(arg, (bytearray, bytes))` and collapse the
logic there.
##########
File path: python/tvm/_ffi/_cython/packed_func.pxi
##########
@@ -142,6 +142,18 @@ cdef inline int make_arg(object arg,
value[0].v_ctx = (<DLContext*>(
<unsigned long long>ctypes.addressof(arg)))[0]
tcode[0] = kTVMContext
+ elif isinstance(arg, bytes):
Review comment:
same question here
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]