mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-24 01:17:26 +08:00
Bump nanobind to 2.2 (#1461)
* bump nanobind * extension version for tests
This commit is contained in:
parent
0070e1db40
commit
f374b6ca4d
@ -31,7 +31,7 @@ jobs:
|
||||
name: Install dependencies
|
||||
command: |
|
||||
pip install --upgrade cmake
|
||||
pip install nanobind==2.1.0
|
||||
pip install nanobind==2.2.0
|
||||
pip install numpy
|
||||
sudo apt-get update
|
||||
sudo apt-get install libblas-dev liblapack-dev liblapacke-dev
|
||||
@ -83,7 +83,7 @@ jobs:
|
||||
source env/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade cmake
|
||||
pip install nanobind==2.1.0
|
||||
pip install nanobind==2.2.0
|
||||
pip install numpy
|
||||
pip install torch
|
||||
pip install tensorflow
|
||||
@ -172,7 +172,7 @@ jobs:
|
||||
source env/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade cmake
|
||||
pip install nanobind==2.1.0
|
||||
pip install nanobind==2.2.0
|
||||
pip install --upgrade setuptools
|
||||
pip install numpy
|
||||
pip install twine
|
||||
@ -237,7 +237,7 @@ jobs:
|
||||
source env/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade cmake
|
||||
pip install nanobind==2.1.0
|
||||
pip install nanobind==2.2.0
|
||||
pip install --upgrade setuptools
|
||||
pip install numpy
|
||||
pip install auditwheel
|
||||
|
@ -2,7 +2,7 @@
|
||||
requires = [
|
||||
"setuptools>=42",
|
||||
"cmake>=3.24",
|
||||
"mlx>=0.17.0",
|
||||
"nanobind==2.1.0",
|
||||
"mlx>=0.18.0",
|
||||
"nanobind==2.2.0",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
@ -1,4 +1,4 @@
|
||||
setuptools>=42
|
||||
cmake>=3.24
|
||||
mlx>=0.17.0
|
||||
nanobind==2.1.0
|
||||
mlx>=0.18.0
|
||||
nanobind==2.2.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools>=42",
|
||||
"nanobind==2.1.0",
|
||||
"nanobind==2.2.0",
|
||||
"cmake>=3.24",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
@ -688,6 +688,13 @@ class TestArray(mlx_tests.MLXTestCase):
|
||||
|
||||
self.assertEqual(b_npy.dtype, np_dtype)
|
||||
|
||||
def test_array_from_noncontiguous_np(self):
|
||||
for t in [np.int8, np.int32, np.float16, np.float32, np.complex64]:
|
||||
np_arr = np.random.uniform(size=(10, 10)).astype(np.complex64)
|
||||
np_arr = np_arr.T
|
||||
mx_arr = mx.array(np_arr)
|
||||
self.assertTrue(mx.array_equal(np_arr, mx_arr))
|
||||
|
||||
def test_array_np_shape_dim_check(self):
|
||||
a_npy = np.empty(2**31, dtype=np.bool_)
|
||||
with self.assertRaises(ValueError) as e:
|
||||
|
Loading…
Reference in New Issue
Block a user