diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f7fa72..6c3fec0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,11 @@ -on: +on: schedule: - cron: '0 0 * * 1' push: - branches: + branches: - master pull_request: - branches: + branches: - master workflow_dispatch: @@ -117,7 +117,7 @@ jobs: uses: crate-ci/typos@master with: config: .typos.toml - + # run `mlc` (`cargo install mlc`) # markdown-link-check: # runs-on: ubuntu-latest diff --git a/.typos.toml b/.typos.toml index e69de29..96ff3fc 100644 --- a/.typos.toml +++ b/.typos.toml @@ -0,0 +1,2 @@ +[default.extend-words] +consts = "consts" diff --git a/Cargo.lock b/Cargo.lock index 912f53d..da651a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ dependencies = [ [[package]] name = "float8" -version = "0.6.0" +version = "0.6.1" dependencies = [ "bytemuck", "cudarc", diff --git a/Cargo.toml b/Cargo.toml index aed44f8..eb77270 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "float8" -version = "0.6.0" +version = "0.6.1" rust-version = "1.70" edition = "2021" description = "8-bit floating point types for Rust" @@ -38,13 +38,14 @@ cudarc = { version = "0.19.0", features = [ "nvrtc", "f16", "cuda-version-from-build-system", - "dynamic-linking", ], default-features = false, optional = true } [features] default = ["std"] std = ["half/std"] -cuda = ["dep:cudarc"] +cuda = ["cuda-dynamic"] +cuda-dynamic = ["dep:cudarc", "cudarc?/dynamic-linking"] +cuda-static = ["dep:cudarc", "cudarc?/static-linking"] all = [ "std", "num-traits", diff --git a/src/lib.rs b/src/lib.rs index 6776241..af855ed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1571,12 +1571,12 @@ macro_rules! from_t { from_t!(F8E4M3); from_t!(F8E5M2); -#[cfg(feature = "cuda")] +#[cfg(any(feature = "cuda-dynamic", feature = "cuda-static"))] unsafe impl cudarc::driver::DeviceRepr for F8E4M3 {} -#[cfg(feature = "cuda")] +#[cfg(any(feature = "cuda-dynamic", feature = "cuda-static"))] unsafe impl cudarc::driver::ValidAsZeroBits for F8E4M3 {} -#[cfg(feature = "cuda")] +#[cfg(any(feature = "cuda-dynamic", feature = "cuda-static"))] unsafe impl cudarc::driver::safe::DeviceRepr for F8E5M2 {} -#[cfg(feature = "cuda")] +#[cfg(any(feature = "cuda-dynamic", feature = "cuda-static"))] unsafe impl cudarc::driver::ValidAsZeroBits for F8E5M2 {}