compile binding

This commit is contained in:
Awni Hannun
2024-01-14 14:26:53 -08:00
parent 21062680d5
commit cd1e5b25cc
5 changed files with 285 additions and 40 deletions

View File

@@ -0,0 +1,22 @@
# Copyright © 2023-2024 Apple Inc.
import unittest
import mlx.core as mx
import mlx_tests
class TestCompile(mlx_tests.MLXTestCase):
def test_simple_compile(self):
def fun(x, y):
return x + y
compiled_fn = mx.compile(fun)
compiled_fn = mx.compile(fun)
x = mx.array(1.0)
y = mx.array(1.0)
# out = compiled_fn(x, y)
if __name__ == "__main__":
unittest.main()