Commit Graph

120 Commits

Author SHA1 Message Date
Cheng 1091e3dd0a Use uv in macOS CI 2026-05-06 15:41:43 +09:00
Harrison Powers 9239808225 Fix CMake finding wrong Python during pip install (#3375) 2026-04-06 12:32:16 -07:00
Kellen Sun 8a6d28713c Fix np bfloat16 misinterpreted as complex (#3146)
Co-authored-by: Cheng <git@zcbenz.com>
2026-03-31 08:04:55 +09:00
Cheng 73136472e0 Delay load CUDA libs and resolve DLL paths at runtime (#3061) 2026-01-27 11:01:58 +09:00
Cheng fd27829efa Build and test python package on Windows CI (#3049) 2026-01-24 07:22:36 +09:00
Cheng 1650c4905a Link with prebuilt OpenBLAS and fix shared libs build on Windows (#3036) 2026-01-23 11:17:26 +09:00
Cheng 26dfe4f651 Fetch nanobind with cmake (#2949) 2025-12-24 10:23:45 +09:00
Cheng b01fc7eac7 Fix stubgen (#2942) 2025-12-22 09:42:20 +09:00
Cheng 7652f1c152 Make CUDA CI run faster (#2939) 2025-12-21 07:38:48 +09:00
Cheng b2e2b19bf7 Set rpath with cmake for CUDA build (#2932) 2025-12-19 12:53:38 +09:00
Awni Hannun 4b88f859b6 Fix CUDA pypi release (#2929) 2025-12-18 13:43:43 -08:00
Angelos Katharopoulos 9194ec20a8 Thunderbolt RDMA communications backend (#2808) 2025-12-17 11:27:54 -08:00
Nathan Goldbaum e1fee0074b Update nanobind pin to most recent version (#2896) 2025-12-11 06:07:36 -08:00
Awni Hannun 39289ef025 [CUDA] Release build for cuda 13 (#2872) 2025-12-04 21:42:26 -08:00
Awni Hannun fdcd2923fd patch + fix docs build (#2799) 2025-11-19 16:16:26 -08:00
Awni Hannun ad16f41a7f Fix version tag (#2790) 2025-11-19 08:55:57 -08:00
Awni Hannun 1bf605d56d use arch specific targets when possible (#2771) 2025-11-14 20:04:18 -08:00
Awni Hannun b65f882df3 fix release (#2759) 2025-11-13 15:34:01 -08:00
Awni Hannun d1e06117e8 bump python (#2694) 2025-10-27 11:34:31 -07:00
Cheng a44b27f5f8 Fix a few ccache cache miss (#2573)
* Fix ccache cache miss

* Do not define _VERSION_ in python bindings
2025-09-09 07:41:05 +09:00
Manuel Villanueva 89a3df9014 Fixed several type annotations in the MLX stubs which degraded to Unknown/Any (#2560)
* Added scalar to stubs to fix Unkown Type Hint

### Proposed changes

Issue #2478 reports that several type annotations in the MLX stubs degrade to Unknown/Any in editors like VS Code with Pylance, due to missing imports (Union, Optional, Tuple) and an undefined scalar type alias.

This PR updates the stub generation patterns to:
	•	Add missing typing imports in mlx.core.__prefix__ so that Union, Optional, Tuple, etc. are always available.
	•	Define and export scalar: TypeAlias = Union[int, float, bool] in mlx.core.__suffix__ so that functions typed with Union[scalar, array] resolve correctly instead of falling back to Any.
	•	Update submodule stub prefixes (distributed, fast, linalg, metal, random) to import scalar alongside array, Device, and Stream, ensuring type checkers resolve the union consistently across modules.

With these changes, functions like mlx.add now display rich type signatures such as:

```
def add(
    a: scalar | array,
    b: scalar | array,
    stream: Stream | Device | None = None
) -> array
```

instead of degrading to Any.

### Checklist

	•	I have read the CONTRIBUTING document
	•	I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
	•	I have added tests that prove my fix is effective or that my feature works (n/a — stub generation only)
	•	I have updated the necessary documentation (if needed)

* add bool to patterns

---------

Co-authored-by: Awni Hannun <awni@apple.com>
2025-09-03 12:52:08 -07:00
Awni Hannun f93f87c802 nccl dep + default for cuda (#2526) 2025-08-21 17:57:49 -07:00
Awni Hannun db5c7efcf6 revert default cuda install (#2465)
* revert default cuda install

* revert default cuda install
2025-08-06 06:19:12 -07:00
Awni Hannun ca973d1e83 fix install tags (#2464) 2025-08-04 20:01:23 -07:00
Awni Hannun 6ad0889c8a default install cuda on linux (#2462) 2025-08-04 15:33:05 -07:00
Cheng 970dbe8e25 Use ccache in CI (#2414)
* Detect ccache

* Use ccache in CI

* Separate cache for different images

* Test both 12.2 and 12.9 for PRs
2025-07-29 08:43:22 +09:00
Awni Hannun 641be9463b Add more CUDA architectures for PyPi package (#2427)
* add cuda sm 90

* add more archs
2025-07-28 12:35:15 -07:00
Awni Hannun 4ad53414dd fix cuda pypi package (#2423)
* fix cuda pypi package

* patch bump
2025-07-25 15:20:29 -07:00
Cheng 6f5874a2f2 [CUDA] Initial implementation of Convolution with cuDNN (#2385)
* Link with cuDNN

* Initial implementation

* Remove backend apis

* Fix recording cudnn conv

* More unused backend apis

* Fix C++ conv tests

* include cudnn as python dep

* Install libcudnn9-dev-cuda-12 in CI

* cudnn only accepts contiguous inputs

* Switch to backend apis

* Plan needs to be kept alive

* Turn off tf32

* Add cache

* Test the native cuda graph api

* Set cudnn stream before execution

* Make LRUCache more like a normal container

* Do error check for cublas handle

* Zero-initilizing array

* Use tf32 for conv

* Skip TestConv.test_torch_conv_2D test

---------

Co-authored-by: Awni Hannun <awni@apple.com>
2025-07-25 08:12:10 +09:00
Awni Hannun d1f4d291e8 Fix uv install and add dev release (#2411)
* fix uv install and add dev release

* fix docstring

* pin cuda deps

* cuda release on cpu-only machine
2025-07-23 16:54:19 -07:00
Awni Hannun 08638223ca Fix including stubs in wheel (#2398)
* fix including stubs in wheel

* fix bool_
2025-07-22 06:30:17 -07:00
Awni Hannun f0a0b077a0 Install linux with mlx[cuda] and mlx[cpu] (#2356)
* install linux with mlx[cuda] and mlx[cpu]

* temp for testing

* cleanup circle, fix cuda repair

* update circle

* update circle

* decouple python bindings from core libraries
2025-07-14 17:17:33 -07:00
Cheng 19facd4b20 Build with all cpu cores by default (#2336) 2025-07-07 06:06:45 -07:00
Awni Hannun 76831ed83d Build CUDA release in Circle (#2306)
* cuda release

* add license
2025-06-19 15:26:36 -07:00
Yi Wang 72ca1539e0 Remove unused variable in /setup.py (#2026)
This is a follow up of https://github.com/ml-explore/mlx/pull/2011
2025-03-30 12:52:33 -07:00
Awni Hannun aba899cef8 patch bump (#2000) 2025-03-24 12:47:05 -07:00
Awni Hannun 1177d28395 patch bump (#1981) 2025-03-20 15:12:22 -07:00
Chunyang Wen 85b34d59bc Clean unused sys (#1929) 2025-03-05 13:48:03 -08:00
Awni Hannun f599c11bc8 bump (#1931) 2025-03-05 13:16:53 -08:00
Angelos Katharopoulos 607181644f Add mlx.distributed_config script (#1902) 2025-02-28 11:16:39 -08:00
Angelos Katharopoulos 71de73a668 Fix convs by reverting #1803 (#1882) 2025-02-18 14:36:34 -08:00
Awni Hannun 6cec78d8f2 bump (#1866) 2025-02-14 13:09:34 -08:00
Awni Hannun 1a1b2108ec bump (#1840) 2025-02-06 11:53:24 -08:00
Angelos Katharopoulos ded914f442 Small distributed launch helper (#1810) 2025-01-29 17:55:04 -08:00
Angelos Katharopoulos 1ce0c0fcb0 Bump version (#1761) 2025-01-09 13:48:20 -08:00
Cheng ed4ec81bca Link python extension with mlx statically on Windows (#1716)
* Link python extension with mlx statically on Windows

* More readable code
2024-12-18 19:26:04 -08:00
Awni Hannun f110357aaa Bump nanobind to 2.4 + fix (#1710)
* bump nanobind to 2.4 + fix

* fix
2024-12-17 10:57:54 -08:00
Cheng a59fae040f Fix library output directory for MSVC (#1681) 2024-12-09 19:07:50 -08:00
Awni Hannun 50fa705125 patch bump (#1656) 2024-12-06 13:16:19 -08:00
Awni Hannun bb303c45a5 version (#1617) 2024-11-22 12:00:03 -08:00