chore(notice): add rocm-rs provenance and deviations

This commit is contained in:
Hanzo Dev
2026-07-13 16:07:41 -07:00
parent 608451be84
commit b7124f0316
2 changed files with 48 additions and 9 deletions
+41 -5
View File
@@ -1,11 +1,47 @@
Hanzo rocm-rs
Copyright (c) 2026 Hanzo AI, Inc.
This product includes software from rocm-rs (https://github.com/RustNSparks/rocm-rs),
licensed under the MIT License:
This product includes software from rocm-rs, a Rust bindings library for AMD
ROCm by Diaconu Radu-Mihai (https://github.com/RustNSparks/rocm-rs), licensed
under the MIT License:
Copyright (c) 2025 Diaconu Radu-Mihai
The upstream MIT license (retaining the original author's copyright) is preserved in
this repository as LICENSE. This work is a derivative of rocm-rs and remains
MIT-licensed; the upstream license has not been changed.
Forked from https://github.com/RustNSparks/rocm-rs at upstream crate version
0.5.1 (upstream master commit 6a873cc).
The upstream MIT license (retaining the original author's copyright) is
preserved in this repository as LICENSE. This work is a derivative of rocm-rs
and remains MIT-licensed; the upstream license has not been changed.
DEVIATIONS
Changes in this fork relative to upstream rocm-rs 0.5.1:
- Renamed the published crate from `rocm-rs` to `hanzo-rocm` (version 0.5.1 ->
0.5.2) and repointed `repository` and `documentation` to
github.com/hanzoai/rocm-rs and docs.rs/hanzo-rocm (Cargo.toml). Workspace
example crates depend on it via a package rename
(`rocm-rs = { package = "hanzo-rocm" }`), so `use rocm_rs::...` paths are
unchanged.
- Added a default-on `gpu-sort` feature that gates the embedded amdgcn
bitonic-sort kernel; with the feature off, `SORTING_KERNEL` is empty bytes and
`sort()` is a runtime no-op, so the crate builds on hosts where the kernel's
nested nightly + build-std compile is unavailable (Cargo.toml,
src/hip/memory_ext/sorting.rs).
- Changed FFI status/enum return types and enum arguments from hardcoded `u32`
to the bindgen-generated types (`ffi::rocblas_status`,
`bindings::rocrand_rng_type`, `rocfft_status_e`, ...) so the crate compiles
under MSVC, where those C enums are `i32`; a no-op on Linux where the alias is
already `u32` (src/rocblas/macros.rs, src/rocrand/{error,generator,mod}.rs,
src/rocfft/{error,plan,description}.rs, src/rocarray/random.rs).
- Wrapped unsafe trait-method calls in explicit `unsafe { }` blocks in the
rocBLAS forwarders to satisfy edition-2024 `unsafe_op_in_unsafe_fn`
(src/rocblas/level1.rs, level2.rs, level3.rs).
- Regenerated the FFI bindings against the installed ROCm headers, substantially
expanding the rocSOLVER, rocSPARSE, HIP, MIOpen, rocBLAS, rocRAND, and rocFFT
`bindings.rs`.
- Added UPSTREAM_PR_NOTES.md recording the Windows/MSVC portability changes as
candidates for an upstream pull request.
- Added a README hero banner (.github/hero.svg) and rebranded the README to
"Hanzo rocm-rs".
+7 -4
View File
@@ -1,9 +1,11 @@
<p align="center"><img src=".github/hero.svg" alt="rocm-rs" width="880"></p>
<p align="center"><img src=".github/hero.svg" alt="Hanzo rocm-rs" width="880"></p>
# rocm-rs: Safe Rust wrappers for AMD ROCm Libraries
# Hanzo rocm-rs: Safe Rust wrappers for AMD ROCm Libraries
This project provides Rust bindings for AMD's ROCm (Radeon Open Compute) libraries, allowing Rust developers to leverage AMD GPUs for high-performance computing.
Hanzo rocm-rs is a fork of [rocm-rs](https://github.com/RustNSparks/rocm-rs) by Diaconu Radu-Mihai (MIT), published as the `hanzo-rocm` crate. See [NOTICE](NOTICE) for provenance and the full list of changes.
## Disclaimer
This project is **not affiliated with, endorsed by, or sponsored by Advanced Micro Devices, Inc. (AMD)**.
@@ -40,7 +42,8 @@ Add this to your `Cargo.toml`:
```toml
[dependencies]
rocm-rs = "5.1"
# Published as `hanzo-rocm`; the package rename keeps `use rocm_rs::...` paths working.
rocm-rs = { package = "hanzo-rocm", version = "0.5.2" }
```
## Usage
@@ -227,7 +230,7 @@ fn main() {
```bash
# Clone the repository
git clone https://github.com/RustNSparks/rocm-rs
git clone https://github.com/hanzoai/rocm-rs
cd rocm-rs
# Set the ROCm path if not in the default location