Skip to content

Commit

Permalink
Fix expand pattern when strides of src/dst are not matching (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisVieriu97 committed Dec 19, 2022
1 parent a023830 commit 506fa5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aten/src/ATen/native/mps/operations/View.mm
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
NSUInteger targetDimLength = currSrcDimLength;
if (currDimLength != targetDimLength)
targetDimLength = 1;
if (currDimLength != targetDimLength && currStride != currSrcStride)
if (currDimLength != targetDimLength || currStride != currSrcStride)
isValidExpand = NO;
if (currSrcDim >= 0 && currSrcDimLength == targetDimLength) {
currSrcStride *= currSrcDimLength;
Expand Down

0 comments on commit 506fa5b

Please sign in to comment.