Could TVM support function with int8, uint8, int16, or uint16 inputs?

I tried to modify the file, “pack_args.h”, to run the kernel function with int8, uint8, int16, or uint16 input. The following is a part of code.

enum ArgConvertCode { INT64_TO_INT64, INT64_TO_INT32, INT64_TO_UINT32, FLOAT64_TO_FLOAT32, FLOAT64_TO_FLOAT64, HANDLE_TO_HANDLE, INT64_TO_INT8, INT64_TO_UINT8, INT64_TO_INT16, INT64_TO_UINT16 };

inline ArgConvertCode GetArgConvertCode(DLDataType t) { CHECK_EQ(t.lanes, 1U) << “Cannot pass vector type argument to devic function for now”; if (t.code == kDLInt) { if (t.bits == 64U) return INT64_TO_INT64; if (t.bits == 32U) return INT64_TO_INT32; if (t.bits == 8U) return INT64_TO_INT8; if (t.bits == 16U) return INT64_TO_INT16; } else if (t.code == kDLUInt) { if (t.bits == 32U) return INT64_TO_UINT32; if (t.bits == 8U) return INT64_TO_UINT8; if (t.bits == 16U) return INT64_TO_UINT16; } else if (t.code == kDLFloat) { if (t.bits == 64U) return FLOAT64_TO_FLOAT64; if (t.bits == 32U) return FLOAT64_TO_FLOAT32; } else if (t.code == kTVMOpaqueHandle) { return HANDLE_TO_HANDLE; } LOG(FATAL) << “Cannot handle " << t << " as device function argument”; return HANDLE_TO_HANDLE; }

But I got the error as below:

TVMError: Check failed: ret == 0 (-1 vs. 0) : Check failed: i < num_args (1 vs. 1) : not enough argument passed, 1 passed but request arg[1].

I traced this error. it seems the argument lose when call PackedFunc().

class PackedFunc { template <typename… Args> inline TVMRetValue operator()(Args&&… args) const;

Could you help me solve this problem?

TVM do support function with int8, int16, or uint16 inputs. The problem you mentioned above might be the runtime error. " not enough argument passed," I guess. You need to check your python code, which means the data you passed in should match you device data format and input arguments.

I mean the input of the partition function, not the model.