Skip to content

Commit

Permalink
Setting up empty mlx-nn crate for future NN works (#99)
Browse files Browse the repository at this point in the history
* adding empty mlx-nn crate for future nn works

* cargo fmt

* fix clippy warning
  • Loading branch information
minghuaw authored Jul 29, 2024
1 parent b1312be commit b461988
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

[workspace]
members = ["mlx-macros", "mlx-sys", "mlx-rs"]
members = ["mlx-macros", "mlx-sys", "mlx-rs", "mlx-nn"]

resolver = "2"

[workspace.dependencies]
mlx-sys = { version = "0.0.8", path = "mlx-sys" }
mlx-macros = { version = "0.1.0", path = "mlx-macros" }
mlx-macros = { version = "0.1.0", path = "mlx-macros" }
mlx-rs = { version = "0.14.0", path = "mlx-rs" }
7 changes: 7 additions & 0 deletions mlx-nn/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "mlx-nn"
version = "0.1.0"
edition = "2021"

[dependencies]
mlx-rs = { workspace = true }
1 change: 1 addition & 0 deletions mlx-nn/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

8 changes: 4 additions & 4 deletions mlx-rs/src/fft/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
//! The difference are explained below using `fftn` as an example:
//!
//! 1. `fftn_unchecked`/`fftn_device_unchecked`: This function is simply a wrapper around the C API
//! and does not perform any checks on the input. It may panic or get an fatal error that cannot
//! be caught by the rust runtime if the input is invalid.
//! and does not perform any checks on the input. It may panic or get an fatal error that cannot
//! be caught by the rust runtime if the input is invalid.
//! 2. `try_fftn`/`try_fftn_device`: This function performs checks on the input and returns a
//! `Result` instead of panicking.
//! `Result` instead of panicking.
//! 3. `fftn`/`fftn_device`: This function is a wrapper around `try_fftn` and unwraps the result. It
//! panics if the input is invalid.
//! panics if the input is invalid.
//!
//! The functions that contains `device` in their name are meant to be used with a user-specified
//! `StreamOrDevice`. If you don't care about the stream, you can use the functions without `device`
Expand Down

0 comments on commit b461988

Please sign in to comment.