Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm (cross-compile) builds, mlx v0.0.9, py312 #4

Merged
merged 42 commits into from
Jan 12, 2024

Conversation

ngam
Copy link
Contributor

@ngam ngam commented Dec 21, 2023

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

closes #1
closes #3
closes #6
closes #7
closes #9

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@ngam
Copy link
Contributor Author

ngam commented Dec 21, 2023

@conda-forge-admin, please rerender.

Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you but ran into some issues. Please check the output logs of the latest rerendering GitHub actions workflow run for errors. You can also ping conda-forge/core for further assistance or try re-rendering locally.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/mlx-feedstock/actions/runs/7283892070.

@ngam ngam mentioned this pull request Dec 21, 2023
5 tasks
@ngam ngam changed the title arm cross compile arm (cross-compile) builds Dec 21, 2023
@ngam ngam marked this pull request as ready for review December 21, 2023 04:40
@ngam ngam requested a review from xhochy as a code owner December 21, 2023 04:40
@ngam
Copy link
Contributor Author

ngam commented Dec 21, 2023

@xhochy green like heaven 🤑

@xhochy
Copy link
Member

xhochy commented Dec 21, 2023

@conda-forge-admin please rerender

@xhochy
Copy link
Member

xhochy commented Dec 21, 2023

Tests sadly fail locally on an M1 and an M3 with

import: 'mlx'
import: 'mlx'
+ pip check
No broken requirements found.
+ python -m unittest discover python/tests
libc++abi: terminating due to uncaught exception of type std::runtime_error: Failed to load device
/Users/uwe/mambaforge/conda-bld/mlx_1703158166871/test_tmp/run_test.sh: line 8: 53907 Abort trap: 6           python -m unittest discover python/tests

@ngam
Copy link
Contributor Author

ngam commented Dec 21, 2023

Interesting, the only other thing I can think of is what you suggested (the very latest SDK). Btw, here's the page with SDKs offered inside the vmImages: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md

Let's try SDK macosx14.2?

@ngam
Copy link
Contributor Author

ngam commented Dec 21, 2023

We can also play around with the settings following their note: https://ml-explore.github.io/mlx/build/html/install.html

Note

If you have multiple Xcode installations and wish to use a specific one while building, you can do so by adding the following environment variable before building export DEVELOPER_DIR="/path/to/Xcode.app/Contents/Developer/"

Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/mlx-feedstock/actions/runs/7312890249.

@ngam ngam marked this pull request as draft December 24, 2023 06:53
recipe/meta.yaml Outdated Show resolved Hide resolved
recipe/build.sh Outdated Show resolved Hide resolved
@ngam
Copy link
Contributor Author

ngam commented Dec 24, 2023

Current status: as is,

  • ✅ builds and runs successfully without cf compilers (i.e., with apple's arm64 compilers) using both native and cross compiling (note that the compilers are arm64, so it is not really cross compiling). Also, python -m unittest discover python/tests passes
  • ❌❌ does not run when built with conda-forge's clang compilers (not native and not cross compiling); that is, it builds fine, but doesn't actually work
  • ❌ does not run when built with apple's x86_64 clang; that is, it builds fine, but doesn't actually work

For the latter two, the error is the same: libc++abi: terminating due to uncaught exception of type std::runtime_error: Failed to load device

@ngam
Copy link
Contributor Author

ngam commented Dec 24, 2023

Our options:

  • keep trying to build in the conda-forge ecosystem (using cf compilers and cross compiling)
  • upload packages built on arm64 manually

@xhochy
Copy link
Member

xhochy commented Jan 8, 2024

@conda-forge-admin please rerender

Copy link
Contributor

github-actions bot commented Jan 8, 2024

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/mlx-feedstock/actions/runs/7452400041.

@ngam ngam mentioned this pull request Jan 11, 2024
5 tasks
@ngam
Copy link
Contributor Author

ngam commented Jan 11, 2024

@xhochy this now works; could you please test? 4772b90 (download artifacts and tested locally; no more device load issues)

We will delay until they have a new release, but we likely are going to hit another block with the gguf (ml-explore/mlx#350) or maybe you have ideas how to incorporate the lib correctly?

Anyway, please review when you have a moment (ignore the git_url, etc. for now)

@ngam ngam mentioned this pull request Jan 11, 2024
3 tasks
@ngam ngam marked this pull request as ready for review January 12, 2024 02:51
@ngam ngam changed the title arm (cross-compile) builds arm (cross-compile) builds, mlx v0.0.9, py312 Jan 12, 2024
@ngam
Copy link
Contributor Author

ngam commented Jan 12, 2024

the py312 build from 78df303:

(test_mlx) ~/mlx$ 
(test_mlx) ~/mlx$ python -m unittest discover python/tests
...............s............................................ssss...............................................................................................................................................................................
----------------------------------------------------------------------
Ran 234 tests in 9.561s

OK (skipped=5)
(test_mlx) ~/mlx$ 
(test_mlx) ~/mlx$ micromamba list | grep mlx 
List of packages in environment: "/Users/ngam/.micromamba/envs/test_mlx"
  mlx              0.0.9       py312hc9e2cf5_0       mlx-feedstock_conda_artifacts_20240111
(test_mlx) ~/mlx$ 

@xhochy xhochy merged commit caeac39 into conda-forge:main Jan 12, 2024
22 checks passed
@xhochy
Copy link
Member

xhochy commented Jan 12, 2024

Thank you and awesome work @ngam ! Also feel free to add you as a maintainer.

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.

None yet

2 participants