wrongtest commented on a change in pull request #4459: [RUNTIME] Implement TVMDSOOp(TensorFlow custom op) for TVM runtime URL: https://github.com/apache/incubator-tvm/pull/4459#discussion_r367282927
########## File path: src/contrib/tf_op/index_seq.h ########## @@ -0,0 +1,44 @@ +/** + * Refer to std::index_sequence (since c++14) + * Utilities to invoke variadic function with template <size_t N> + */ +#ifndef __TFTVM_INDEX_SEQ__ +#define __TFTVM_INDEX_SEQ__ + +template <std::size_t ...> Review comment: > Do we need these helpers? I think we can probably directly invoke using PackedFunc, right? PackedFunc is invoked variadic but DLPack input tensors is array. Thus direct implementation maybe like: ```c++ switch(NUM_INPUTS) { case 1 : f(args[0]); break; case 2: f(args[0], args[1]); break; case 3: f(args[0], args[1], args[2]); break; // update to 8 ... } ``` This seems quite strange so we use some template utility to call the PackedFunc. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services