ptrendx commented on a change in pull request #18104:
URL: https://github.com/apache/incubator-mxnet/pull/18104#discussion_r413989438
##########
File path: src/operator/fusion/fused_op.cu
##########
@@ -338,15 +350,36 @@ std::string FusedOp::GenerateCode(const
std::vector<OpReqType> &req,
}
}
}
+ const int input_type = node_dtypes[input_entry_id];
std::string slice_func = "load_slice";
if (!check_shapes) {
slice_func = "fast_" + slice_func;
}
- code += "const auto " + vec_name + " = op::" + slice_func +
"<nvec>(" +
- var_name + ", " + var_name + "_shape," + begin +
- "," + end + ", offset);\n";
+ code += "const auto " + vec_name + " = op::" + slice_func + "<nvec,"
+
Review comment:
You could bring the unknown ndim to be the second template argument and
then you could just do `"<nvec, " + std::to_string(ndim) + ">"` without
specifying the rest.
----------------------------------------------------------------
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]