pytorch
24b9bd43 - [MPS] Add version check (#78192)

Commit
3 years ago
[MPS] Add version check (#78192) Use `instancesRespondToSelector:` to test the presence of `optimizationLevel` in `MPSGraphCompilationDescriptor`, which according to https://developer.apple.com/documentation/metalperformanceshadersgraph/mpsgraphcompilationdescriptor/3922624-optimizationlevel is only available on 12.3 or newer This works around a limitations of `@available(macOS 12.3, *)` macro in shared libraries dynamically loaded by apps targeting older runtime. And deployment target for macos Python conda binaries is 10.14: ``` % otool -l `which python3` ... Load command 9 cmd LC_BUILD_VERSION cmdsize 32 platform 1 minos 10.14 sdk 10.14 ... ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/78192 Approved by: https://github.com/atalman, https://github.com/seemethere (cherry picked from commit b7bb34d7625d95e5088638721dcc07c2bc5e2ade)
Author
Committer
Parents
Loading