Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
laggui committed Jul 16, 2024
1 parent 09098e7 commit c38099c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/burn-tensor/src/tensor/quantization/scheme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ impl QuantizationScheme {
QuantizationScheme::PerTensorAffine(dtype) => match dtype {
QuantizationType::QInt8 => {
// Quantized range `[a, b]`
let a = i8::min_value() as i32;
let b = i8::max_value() as i32;
let a = i8::MIN as i32;
let b = i8::MAX as i32;

// Input range `[alpha, beta]`
let input_range = range.max.clone().sub(range.min.clone());
Expand All @@ -54,7 +54,7 @@ impl QuantizationScheme {
QuantizationScheme::PerTensorSymmetric(dtype) => match dtype {
QuantizationType::QInt8 => {
// Quantized range `[a, b]`
let b = i8::max_value() as i32;
let b = i8::MAX as i32;
let a = -b;

// Compute scale to convert an input value in range `[-alpha, alpha]`
Expand Down

0 comments on commit c38099c

Please sign in to comment.