ptrendx commented on a change in pull request #18104:
URL: https://github.com/apache/incubator-mxnet/pull/18104#discussion_r413989900
##########
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,"
+
+ mshadowTypeToString(input_type) + "," +
std::to_string(shape.ndim()) +
+ "," + std::to_string(ndim) + ">(" + var_name + ", " +
var_name +
+ "_shape," + begin + "," + end + ", offset);\n";
CHECK_EQ(outputs[i], 1);
variables[{i, 0}] = vec_name;
+ variables[{node_id, 0}] = vec_name;
+ if (is_broadcast_op) {
+ int node_id_arg2 = node.inputs[1].node_id;
+ const uint32_t input_entry_id_arg2 = g.entry_id(node.inputs[1]);
+ const auto& var_name_arg2 = g[node_id_arg2].source->attrs.name;
+ const auto vec_name_arg2 = "vec_" + var_name_arg2 + "_" +
std::to_string(i);
+ if (input_entry_id_arg2 != input_entry_id) {
+ const int input_type_arg2 = node_dtypes[input_entry_id_arg2];
+ const auto& shape_arg2 = node_shapes[input_entry_id_arg2];
+ load_index[node_id_arg2] = 0;
Review comment:
Wasn't it already set?
----------------------------------------------------------------
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]