Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,12 @@ jobs:
cargo run
working-directory: examples/etdump

- name: Check nano-gpt example
run: cargo check
- name: Build nano-gpt example
run: cargo build
working-directory: examples/nano-gpt
env:
EXECUTORCH_RS_LINK: 0
- name: Check llama3 example
run: cargo check
- name: Build llama3 example
run: cargo build
working-directory: examples/llama3
env:
EXECUTORCH_RS_LINK: 0

check:
runs-on: ${{ matrix.runner }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copy of executorch/requirements-dev.txt as of v1.0.0
# Copy of executorch/requirements-dev.txt as of v1.0.1
cmake>=3.29, <4.0.0
packaging>=24.2
pip>=23
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ See `example/hello_world` for a complete example.
## Build
To use the library you must compile the C++ executorch library yourself, as there are many configurations that
determines which modules, backends, and operations are supported. See the `executorch-sys` crate for more info.
Currently the supported Cpp executorch version is `1.0.0`.
Currently the supported Cpp executorch version is `1.0.0` (or `1.0.1`).


## Cargo Features
Expand Down
2 changes: 1 addition & 1 deletion etc/setup_dev_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def clone_executorch():
"--depth",
"1",
"--branch",
"v1.0.0",
"v1.0.1",
"https://github.com/pytorch/executorch.git",
".",
],
Expand Down
2 changes: 1 addition & 1 deletion examples/data_map/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/data_map/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
publish = false
name = "example-hello-world"
name = "example-data-map"
version = "0.0.0"
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/llama3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ To run the example, follow these steps (note that some steps should run from the
The llama model can be exported with many options, such as quantization, different data types (f32, bf16), different backends, kv caching, etc.
This example use a specific set of options, as specified above.
Different options require different export commands and modifications to the code and build script which you can play around with.
See the [llama README](https://github.com/pytorch/executorch/blob/v1.0.0/examples/models/llama/README.md) at the Cpp executorch repository for more details.
See the [llama README](https://github.com/pytorch/executorch/blob/v1.0.1/examples/models/llama/README.md) at the Cpp executorch repository for more details.
3 changes: 1 addition & 2 deletions examples/llama3/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ fn main() {
.expect("EXECUTORCH_RS_EXECUTORCH_LIB_DIR is not set, can't locate executorch static libs");

println!("cargo::rustc-link-search=native={libs_dir}/kernels/portable/");
println!("cargo::rustc-link-lib=static=portable_kernels");
// println!("cargo::rustc-link-lib=static:+whole-archive=portable_ops_lib");
println!("cargo::rustc-link-lib=static:+whole-archive=portable_kernels");

println!("cargo::rustc-link-search=native={libs_dir}/configurations/");
println!("cargo::rustc-link-lib=static:+whole-archive=optimized_native_cpu_ops_lib");
Expand Down
28 changes: 26 additions & 2 deletions examples/nano-gpt/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,32 @@ fn main() {

println!("cargo::rustc-link-search=native={libs_dir}/kernels/portable/");
println!("cargo::rustc-link-lib=static:+whole-archive=portable_kernels");
println!("cargo::rustc-link-lib=static:+whole-archive=portable_ops_lib");

println!("cargo::rustc-link-search=native={libs_dir}/configurations/");
println!("cargo::rustc-link-lib=static=optimized_native_cpu_ops_lib");
println!("cargo::rustc-link-lib=static:+whole-archive=optimized_native_cpu_ops_lib");

println!("cargo::rustc-link-search=native={libs_dir}/kernels/optimized/");
println!("cargo::rustc-link-lib=static:+whole-archive=optimized_kernels");
println!("cargo::rustc-link-lib=static:+whole-archive=eigen_blas");
println!("cargo::rustc-link-lib=static:+whole-archive=cpublas");

println!("cargo::rustc-link-search=native={libs_dir}/extension/threadpool/");
println!("cargo::rustc-link-lib=static:+whole-archive=extension_threadpool");

println!("cargo::rustc-link-search=native={libs_dir}/backends/xnnpack/");
println!("cargo::rustc-link-search=native={libs_dir}/backends/xnnpack/third-party/XNNPACK/");
println!("cargo::rustc-link-search=native={libs_dir}/backends/xnnpack/third-party/cpuinfo/");
println!(
"cargo::rustc-link-search=native={libs_dir}/backends/xnnpack/third-party/pthreadpool/"
);
println!("cargo::rustc-link-lib=static:+whole-archive=xnnpack_backend");
println!("cargo::rustc-link-lib=static:+whole-archive=XNNPACK");
println!("cargo::rustc-link-lib=static:+whole-archive=xnnpack-microkernels-prod");
println!("cargo::rustc-link-lib=static:+whole-archive=cpuinfo");
println!("cargo::rustc-link-lib=static:+whole-archive=pthreadpool");

if cfg!(target_arch = "arm") || cfg!(target_arch = "aarch64") {
println!("cargo::rustc-link-search=native={libs_dir}/kleidiai/");
println!("cargo::rustc-link-lib=static:+whole-archive=kleidiai");
}
}
4 changes: 0 additions & 4 deletions examples/run_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
):
extra_args = []
case "nano-gpt":
# TODO: https://github.com/pytorch/executorch/issues/15285
# TODO: remove when we bump cpp lib to 1.0.1
print("Skipping nanogpt example...")
continue
extra_args = [
*["--model", "nanogpt.pte"],
*["--tokenizer", "vocab.json"],
Expand Down
2 changes: 1 addition & 1 deletion executorch-sys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In the following example we build the C++ library with the necessary flags to ru
```bash
# Clone the C++ library
cd ${EXECUTORCH_CPP_DIR}
git clone --depth 1 --branch v1.0.0 https://github.com/pytorch/executorch.git .
git clone --depth 1 --branch v1.0.1 https://github.com/pytorch/executorch.git .
git submodule sync --recursive
git submodule update --init --recursive

Expand Down
2 changes: 1 addition & 1 deletion executorch-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::{Path, PathBuf};

// const EXECUTORCH_VERSION: &str = "1.0.0";
// const EXECUTORCH_VERSION: &str = "1.0.1";

fn main() {
// TODO: verify on runtime we use the correct version of executorch
Expand Down
4 changes: 2 additions & 2 deletions executorch-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//! ```bash
//! # Clone the C++ library
//! cd ${EXECUTORCH_CPP_DIR}
//! git clone --depth 1 --branch v1.0.0 https://github.com/pytorch/executorch.git .
//! git clone --depth 1 --branch v1.0.1 https://github.com/pytorch/executorch.git .
//! git submodule sync --recursive
//! git submodule update --init --recursive
//!
Expand Down Expand Up @@ -133,7 +133,7 @@ extern crate core as std;
extern crate link_cplusplus;

/// The version of the ExecuTorch C++ library that this crate is compatible and linked with.
pub const EXECUTORCH_CPP_VERSION: &str = "1.0.0";
pub const EXECUTORCH_CPP_VERSION: &str = "1.0.1";

mod c_bridge;
pub use c_bridge::*;
Expand Down
2 changes: 1 addition & 1 deletion executorch-sys/third-party/executorch/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0a0
1.0.1a0
2 changes: 1 addition & 1 deletion executorch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ See `example/hello_world` for a complete example.
## Build
To use the library you must compile the C++ executorch library yourself, as there are many configurations that
determines which modules, backends, and operations are supported. See the `executorch-sys` crate for more info.
Currently the supported Cpp executorch version is `1.0.0`.
Currently the supported Cpp executorch version is `1.0.0` (or `1.0.1`).


## Cargo Features
Expand Down
2 changes: 1 addition & 1 deletion executorch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
//! ## Build
//! To use the library you must compile the C++ executorch library yourself, as there are many configurations that
//! determines which modules, backends, and operations are supported. See the `executorch-sys` crate for more info.
//! Currently the supported Cpp executorch version is `1.0.0`.
//! Currently the supported Cpp executorch version is `1.0.0` (or `1.0.1`).
//!
//! ## Embedded Systems
//! The library is designed to be used both in `std` and `no_std` environments. The `no_std` environment is useful for
Expand Down
Loading