Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[Scala/Java] Remove unnecessary data slicing #17544

Merged
merged 1 commit into from
Feb 11, 2020
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private object DataParallelExecutorGroup {
majorAxis: Seq[Int]): Unit = {
for (((dSrc, dTargets), axis) <- data zip targets zip majorAxis) {
for (((sliceIdxStart, sliceIdxStop), dDst) <- dTargets) {
if (axis >= 0) {
if (axis >= 0 && (sliceIdxStart > 0 || sliceIdxStop < dSrc.shape(axis))) {
// copy slice
val shape = dSrc.shape
val begin = Array.fill(shape.length)(0)
Expand Down