Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cat indices along dim 1 instead of transposing
  • Loading branch information
Brennan Vincent committed Nov 21, 2018
commit d546d901b8e10b0270a9571275e6a331053cda40
4 changes: 2 additions & 2 deletions aten/src/ATen/native/TensorShape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ static Tensor cat_sparse(TensorList tensors, int64_t dim) {
zeros_sizes[values_dim] = total_size - cumulative_size;
auto z2 = native::zeros(sizes, t._values().options());
vals_pieces.push_back(native::cat({z1, t._values(), z2}, values_dim));
idxs_pieces.push_back(t._indices().t());
idxs_pieces.push_back(t._indices());
}
auto sizes_copy = sizes.vec();
sizes_copy[wrapped] = total_size;
return native::sparse_coo_tensor(native::cat(idxs_pieces).t(), native::cat(vals_pieces), sizes_copy, tensors[0].options());
return native::sparse_coo_tensor(native::cat(idxs_pieces, 1), native::cat(vals_pieces), sizes_copy, tensors[0].options());

This comment was marked as off-topic.

}
}

Expand Down