diff --git a/Cargo.lock b/Cargo.lock index fe1724e..faf0a45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -274,7 +274,7 @@ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "oneapi-rs" -version = "0.0.9" +version = "0.1.0" dependencies = [ "sycl-rs", ] @@ -388,7 +388,7 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "sycl-rs" -version = "0.0.9" +version = "0.1.0" dependencies = [ "allocator-api2", "bytemuck", diff --git a/oneapi-rs/Cargo.toml b/oneapi-rs/Cargo.toml index 50fafe5..f8133ea 100644 --- a/oneapi-rs/Cargo.toml +++ b/oneapi-rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oneapi-rs" -version = "0.0.9" +version = "0.1.0" readme = "README.md" edition.workspace = true rust-version.workspace = true @@ -9,4 +9,4 @@ repository.workspace = true homepage.workspace = true [dependencies] -sycl-rs = { version = "0.0.9", path = "../sycl/sycl-rs" } +sycl-rs = { version = "0.1.0", path = "../sycl/sycl-rs" } diff --git a/sycl/sycl-rs/Cargo.toml b/sycl/sycl-rs/Cargo.toml index 14d5e87..1be9805 100644 --- a/sycl/sycl-rs/Cargo.toml +++ b/sycl/sycl-rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sycl-rs" -version = "0.0.9" +version = "0.1.0" description = "Rust bindings for SYCL" documentation = "https://docs.rs/sycl-rs" keywords = ["oneapi", "sycl", "gpu"] @@ -10,6 +10,7 @@ categories = [ "memory-management", "science"] publish = ["crates-io"] +readme = "README.md" # Inherit settings from the root workspace edition.workspace = true diff --git a/sycl/sycl-rs/README.md b/sycl/sycl-rs/README.md new file mode 100644 index 0000000..4cd798e --- /dev/null +++ b/sycl/sycl-rs/README.md @@ -0,0 +1,84 @@ +# SYCL-rs + +Rust bindings for SYCL and the Intel oneAPI programming environment. + +> [!WARNING] +> SYCL-rs is experimental, has not released version 0.1.0, and is not ready +> for production use. Its API may change without notice. + +## Supported platforms + +The tested configuration is: + +- Linux +- Intel oneAPI Toolkit 2026.1 +- A SYCL device supported by the installed oneAPI runtime + +Other operating systems, oneAPI releases, and SYCL implementations are not +currently tested or supported. + +## Prerequisites + +- A Rust toolchain with Rust 2024 edition support +- Intel oneAPI Toolkit 2026.1, including the DPC++/C++ compiler and SYCL runtime + +Initialize the oneAPI environment before building or running the project: + +```bash +source /opt/intel/oneapi/setvars.sh +``` + +Replace `/opt/intel/oneapi` if the toolkit is installed elsewhere. The build +also accepts an explicit compiler through `ONEAPI_CXX`; the compiler must +support C++17 and SYCL. + +## Installation + +Add your required dependencies with Cargo: + +```bash +cargo add sycl-rs +``` + +Make sure to source the `setvars.sh` file before building your project. + +```bash +source /opt/intel/oneapi/setvars.sh +cargo build +``` + +## Quick start + +Build the workspace from source: +```bash +git clone https://github.com/oneapi-src/oneapi-rs.git +cd oneapi-rs +source /opt/intel/oneapi/setvars.sh +cargo build --workspace +``` + +List the SYCL devices visible to the runtime: + +```bash +source /opt/intel/oneapi/setvars.sh +cargo run -p sycl-rs --example sycl-ls +``` + +The kernel launch examples demonstrate allocation, runtime kernel compilation, +kernel submission, and copying results back to the host: + +```bash +cargo run -p sycl-rs --example kernel_launch +``` + +## Documentation + +- [API documentation](https://docs.rs/sycl_rs/) +- [Examples](sycl/sycl-rs/examples) +- [Contributing](CONTRIBUTING.md) +- [Changelog](CHANGELOG.md) + +## License + +Licensed under either the [Apache License 2.0](LICENSE-APACHE) or the +[MIT License](LICENSE-MIT), at your option.