From 55f34eb71a6cbc9af37fd201177d8409f1d8b9ef Mon Sep 17 00:00:00 2001 From: Mathieu Poumeyrol Date: Thu, 27 Jun 2024 13:39:53 +0200 Subject: [PATCH] clips --- core/src/ops/matmul/lir_unary.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/ops/matmul/lir_unary.rs b/core/src/ops/matmul/lir_unary.rs index 57fd836a0f..e3e3721b86 100644 --- a/core/src/ops/matmul/lir_unary.rs +++ b/core/src/ops/matmul/lir_unary.rs @@ -290,8 +290,8 @@ impl EvalOp for LirMatMulUnary { fn state( &self, - session: &mut SessionState, - node_id: usize, + _session: &mut SessionState, + _node_id: usize, ) -> TractResult>> { Ok(Some(Box::new(LirMatMulUnaryState::default()))) } @@ -318,6 +318,7 @@ impl OpState for LirMatMulUnaryState { *cell = None } self.0.reserve(op.micro_ops.len().saturating_sub(self.0.capacity())); + #[allow(clippy::uninit_vec)] self.0.set_len(op.micro_ops.len()); // kill static lifefime! let fused_spec: &mut Vec = std::mem::transmute(&mut self.0); @@ -329,13 +330,13 @@ impl OpState for LirMatMulUnaryState { let mut c = Tensor::uninitialized_dt(op.c_fact.datum_type, c_shape)?; for i in 0..op.micro_ops.len() { *fused_spec.get_unchecked_mut(i) = - op.micro_ops.get_unchecked(i).resolve_trivial(&*inputs, &mut c); + op.micro_ops.get_unchecked(i).resolve_trivial(&inputs, &mut c); } op.mmm.run_with_scratch_space( geometry.m, geometry.n, scratch.as_mut(), - &fused_spec, + fused_spec, )?; c } else { @@ -355,7 +356,7 @@ impl OpState for LirMatMulUnaryState { geometry.m, geometry.n, scratch.as_mut(), - &fused_spec, + fused_spec, ) .context("In mmm.run_with_scratch_space")?; }