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

Commit

Permalink
[Scala/Java] Remove unnecessary data slicing
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhliu committed Feb 6, 2020
1 parent 0392514 commit 8158851
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 8158851

Please sign in to comment.