Description
torch-cpu builds fail on macOS with
OSError: Failed to open "[...]/einops-torch-ext/metadata.json": No such file or directory
The reason is that no backend is passed to get_local_kernels, kernels (correctly) detects the Torch build as being Metal-enabled and then tries to open the Metal variant torch-metal, which does not exist in the output path.
Besides the underlying issue, the error is also a red herring - the issue isn't so much that metadata cannot be opened, but that the variant does not exist at all.
The solution is to add a backend argument to get_local_kernel and pass it inside the Nix derivation (plus improve detection, so that we get the correct error).
I have a fix for this already, but I haven't created a PR for it, since it conflicts with all the changes I'm working on for dependency handling, so I postponed it until the dependency handling PRs are merged.
Steps to reproduce
Build a torch-cpu variant on macOS.
Expected behavior
No error.
Environment
...
Additional context
No response
Description
torch-cpubuilds fail on macOS withThe reason is that no backend is passed to
get_local_kernels,kernels(correctly) detects the Torch build as being Metal-enabled and then tries to open the Metal varianttorch-metal, which does not exist in the output path.Besides the underlying issue, the error is also a red herring - the issue isn't so much that metadata cannot be opened, but that the variant does not exist at all.
The solution is to add a
backendargument toget_local_kerneland pass it inside the Nix derivation (plus improve detection, so that we get the correct error).I have a fix for this already, but I haven't created a PR for it, since it conflicts with all the changes I'm working on for dependency handling, so I postponed it until the dependency handling PRs are merged.
Steps to reproduce
Build a
torch-cpuvariant on macOS.Expected behavior
No error.
Environment
...
Additional context
No response