diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17efc9c..5b9c9f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,10 @@ jobs: - name: Install dependencies if: matrix.install_deps run: ${{ matrix.install_deps }} + - name: Cargo deps locks + if: ${{ matrix.rust == '1.41.1' }} + run: + cargo update -p either --precise 1.13.0 - name: Tests run: | rustc -C target-cpu=native --print cfg @@ -138,11 +142,7 @@ jobs: profile: minimal targets: ${{ matrix.target }} - name: Cache cargo plugins - id: cache - uses: actions/cache@v1 - with: - path: ~/.cargo/bin/ - key: ${{ runner.os }}-cargo-plugins + uses: Swatinem/rust-cache@v2 - name: Install cross if: steps.cache.outputs.cache-hit != 'true' run: cargo install cross diff --git a/examples/usegemm.rs b/examples/usegemm.rs index efae1df..e837f1c 100644 --- a/examples/usegemm.rs +++ b/examples/usegemm.rs @@ -21,7 +21,6 @@ use core::fmt::{Display, Debug}; trait Float : Copy + Display + Debug + PartialEq { fn zero() -> Self; - fn one() -> Self; fn from(x: i64) -> Self; fn nan() -> Self; fn is_nan(self) -> bool; @@ -29,7 +28,6 @@ trait Float : Copy + Display + Debug + PartialEq { impl Float for f32 { fn zero() -> Self { 0. } - fn one() -> Self { 1. } fn from(x: i64) -> Self { x as Self } fn nan() -> Self { 0./0. } fn is_nan(self) -> bool { self.is_nan() } @@ -37,7 +35,6 @@ impl Float for f32 { impl Float for f64 { fn zero() -> Self { 0. } - fn one() -> Self { 1. } fn from(x: i64) -> Self { x as Self } fn nan() -> Self { 0./0. } fn is_nan(self) -> bool { self.is_nan() } diff --git a/src/debugmacros.rs b/src/debugmacros.rs index 2ce62ff..f973fdb 100644 --- a/src/debugmacros.rs +++ b/src/debugmacros.rs @@ -13,14 +13,14 @@ macro_rules! dprint { } } -#[cfg(feature = "use_debug")] +/* macro_rules! debug { ($e:expr) => { $e; } } +*/ -#[cfg(not(feature = "use_debug"))] macro_rules! debug { ($e:expr) => { } diff --git a/src/kernel.rs b/src/kernel.rs index e82a2cb..66fb910 100644 --- a/src/kernel.rs +++ b/src/kernel.rs @@ -94,6 +94,7 @@ pub(crate) trait GemmKernel { pub(crate) trait Element : Copy + Send + Sync { fn zero() -> Self; fn one() -> Self; + #[cfg_attr(not(test), allow(unused))] fn test_value() -> Self; fn is_zero(&self) -> bool; fn add_assign(&mut self, rhs: Self);