hzfan commented on a change in pull request #18017: [Numpy] New FFIs for
Operator: tile, trace, transpose
URL: https://github.com/apache/incubator-mxnet/pull/18017#discussion_r409995466
##########
File path: src/api/operator/tensor/matrix_op.cc
##########
@@ -68,4 +68,25 @@ MXNET_REGISTER_API("_npi.clip")
}
});
+MXNET_REGISTER_API("_npi.tile")
+.set_body([](runtime::MXNetArgs args, runtime::MXNetRetValue* ret) {
+ using namespace runtime;
+ const nnvm::Op* op = Op::Get("_npi_tile");
+ nnvm::NodeAttrs attrs;
+ op::TileParam param;
+ if (args[1].type_code() == kDLInt) {
+ param.reps = Tuple<int>(1, args[1].operator int64_t());
+ } else {
+ param.reps = Tuple<int>(args[1].operator ObjectRef());
Review comment:
Indent
----------------------------------------------------------------
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]
With regards,
Apache Git Services