PyObjC-framework-MLCompute provides Python wrappers for Apple's MLCompute framework on macOS, enabling Python applications to leverage GPU acceleration for machine learning tasks. It is part of the larger PyObjC project, currently at version 12.1, with releases typically tied to macOS SDK updates and Python version support.
pip install pyobjc-framework-mlcomputeVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import MLCompute classes and query available CPU and GPU devices. MLCompute provides classes like MLCDevice and MLCGraph for building and executing machine learning models using Apple's Metal Performance Shaders.
Upgrade your Python environment to 3.10 or later.
Upgrade your Python environment to 3.9 or later (for PyObjC < 12.0) or 3.10 or later (for PyObjC >= 12.0).
Refactor code to use alternative macOS APIs or pin PyObjC to a version less than 10.0 if this framework is essential for legacy applications.
Most Python code should not be directly affected. However, low-level Objective-C integrations or code relying on specific reference counting behavior might require review. Consult the PyObjC 11.1 release notes for details.
If implementing `__new__` in a Python subclass, carefully manage initialization logic. Refer to the PyObjC 10.3 and 10.3.1 release notes for precise behavior and workarounds.