zhiics commented on a change in pull request #4312:
URL: https://github.com/apache/incubator-tvm/pull/4312#discussion_r434987705
##########
File path: src/relay/transforms/combine_parallel_conv2d.cc
##########
@@ -164,19 +164,40 @@ class ParallelConv2DCombiner : public ParallelOpCombiner {
void UpdateGroupOutput(const Expr& data, const Group& branches, size_t depth,
ExprSubstMap* subst_map) {
int64_t index = 0;
+
for (const auto& branch : branches) {
const CallNode* conv2d = branch[0];
int64_t channels = GetConv2DSuperChannelsDim(conv2d);
Array<Integer> begin;
Array<Integer> end;
for (size_t i = 0; i < channel_pos_; i++) {
begin.push_back(0);
- end.push_back(NullValue<Integer>());
+ end.push_back(-1);
}
begin.push_back(index);
index += channels;
end.push_back(index);
- auto slice = MakeStridedSlice(data, std::move(begin), std::move(end),
Array<Integer>{});
+ DLContext ctx;
+ ctx.device_type = kDLCPU;
+ ctx.device_id = 0;
+ auto begin_ndarray = runtime::NDArray::Empty({int64_t(begin.size())},
DataType::Int(64), ctx);
Review comment:
better to use `static_cast<int64_t>(begin.size())`
same to other cases below
----------------------------------------------------------------
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]