Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MPS] Fwd-fix for clamp regression (#122148)
Forward fix for regressions introduced by #121381 as we failed to run MPS CI twice on it - Do not call `minimumWithNaNPropagationWithPrimaryTensor` for integral tensors as it will crash with ``` /AppleInternal/Library/BuildRoots/ce725a5f-c761-11ee-a4ec-b6ef2fd8d87b/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MPSCore/Utility/MPSKernelDAG.mm:805: failed assertion `Error getting visible function: (null) Function isNaN_i16_i8 was not found in the library' ``` - Change the order of max and min call as it's apparently important for consistency, as `min(max(a, b), c)` might not equal to `max(min(a, c), b)` if `c` is not always less or equal than `b` Pull Request resolved: #122148 Approved by: https://github.com/huydhn (cherry picked from commit 34f36a2)
- Loading branch information
1 parent
a8f93a5
commit b874749
Showing
1 changed file
with
35 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters