Skip to content

Support for Apple Silicon (Metal/MPS)#357

Open
fnachon wants to merge 7 commits intouw-ipd:masterfrom
fnachon:master
Open

Support for Apple Silicon (Metal/MPS)#357
fnachon wants to merge 7 commits intouw-ipd:masterfrom
fnachon:master

Conversation

@fnachon
Copy link
Copy Markdown

@fnachon fnachon commented Apr 5, 2026

This is an MPS fork I needed for a Proteina-Complexa fork running on Apple Silicon.

Florian

fnachon and others added 7 commits April 3, 2026 15:17
Apple Silicon-compatible fork created with Claude.
Use Python 3.13 environment. This fork was created for use with a mps fork of Proteina-Complexa.
…n crash

- Add CMake/ninja/scikit-build artifacts to .gitignore (.cmake/reply/,
  CMakeFiles/, CMakeCache.txt, build.ninja, .ninja_*, .skbuild-info.json,
  metal_air/, Makefile, cmake_install.cmake, pack_rotamers_*.pdb)
- Untrack 108 previously-committed build artifacts via git rm --cached
- Fix _cpp_lib.py: use glob to locate _C.so instead of importlib.util.find_spec
  (find_spec executes the .so init as a side effect, causing double-registration
  of TORCH_LIBRARY ops and a C++ abort on subsequent load_library calls);
  add sys.modules guard as additional safety

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Set KMP_DUPLICATE_LIB_OK=TRUE in execute_process calls that import torch
so the duplicate-libomp crash no longer prevents resolving the conda torch
cmake prefix path. Also auto-discover pybind11's cmake dir from the active
Python environment the same way, replacing the need for a system-installed
pybind11.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The KMP_DUPLICATE_LIB_OK=TRUE workaround was missing from the
execute_process that fetches the torch version, causing an abort
and an empty _TORCH_VERSION list → "list GET given empty list" errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant