From f1558adea3618b9a71ee4dd2fd1a0fba60f66988 Mon Sep 17 00:00:00 2001 From: Guillaume Lagrange Date: Mon, 9 Dec 2024 10:43:06 -0500 Subject: [PATCH] Allow unknown manual_div_ceil lint (#2605) --- crates/burn-jit/src/kernel/conv/conv2d/gemm/homogeneous/base.rs | 1 + crates/burn-jit/src/kernel/pool/adaptive_avg_pool2d.rs | 1 + crates/burn-jit/src/kernel/pool/adaptive_avg_pool2d_backward.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/crates/burn-jit/src/kernel/conv/conv2d/gemm/homogeneous/base.rs b/crates/burn-jit/src/kernel/conv/conv2d/gemm/homogeneous/base.rs index 582b1e59af..3a69960972 100644 --- a/crates/burn-jit/src/kernel/conv/conv2d/gemm/homogeneous/base.rs +++ b/crates/burn-jit/src/kernel/conv/conv2d/gemm/homogeneous/base.rs @@ -76,6 +76,7 @@ where ) { let k_step = SMM::K; let range = k_range.1 - k_range.0; + #[allow(unknown_lints)] // `manual_div_ceil` only appeared in 1.83 #[allow(clippy::manual_div_ceil)] let num_loops = (range + k_step - 1) / k_step; diff --git a/crates/burn-jit/src/kernel/pool/adaptive_avg_pool2d.rs b/crates/burn-jit/src/kernel/pool/adaptive_avg_pool2d.rs index e93d6f6b2b..564c99ab68 100644 --- a/crates/burn-jit/src/kernel/pool/adaptive_avg_pool2d.rs +++ b/crates/burn-jit/src/kernel/pool/adaptive_avg_pool2d.rs @@ -62,6 +62,7 @@ fn start_index(output_size_index: u32, output_size: u32, input_size: u32) -> u32 (output_size_index * input_size) / output_size } +#[allow(unknown_lints)] // `manual_div_ceil` only appeared in 1.83 #[allow(clippy::manual_div_ceil)] #[cube] fn end_index(output_size_index: u32, output_size: u32, input_size: u32) -> u32 { diff --git a/crates/burn-jit/src/kernel/pool/adaptive_avg_pool2d_backward.rs b/crates/burn-jit/src/kernel/pool/adaptive_avg_pool2d_backward.rs index 11b6796f88..1552389f0a 100644 --- a/crates/burn-jit/src/kernel/pool/adaptive_avg_pool2d_backward.rs +++ b/crates/burn-jit/src/kernel/pool/adaptive_avg_pool2d_backward.rs @@ -66,6 +66,7 @@ fn start_index(output_size_index: u32, output_size: u32, input_size: u32) -> u32 (output_size_index * input_size) / output_size } +#[allow(unknown_lints)] // `manual_div_ceil` only appeared in 1.83 #[allow(clippy::manual_div_ceil)] #[cube] fn end_index(output_size_index: u32, output_size: u32, input_size: u32) -> u32 {