Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
laggui committed Dec 9, 2024
1 parent 8f5f219 commit cdef4f7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/burn-tensor/src/tensor/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,8 @@ impl TensorData {
panic!("Invalid quantized type");
}
// Scale is always stored as f32 and zero-point offset as i32
let scale = q.scale as f32;
let offset = q.offset as i32;
let scale_bytes = bytemuck::bytes_of(&scale);
let scale_bytes = bytemuck::bytes_of(&q.scale);
let offset_bytes = bytemuck::bytes_of(&offset);
value.extend_from_slice(offset_bytes);
value.extend_from_slice(scale_bytes);
Expand Down

0 comments on commit cdef4f7

Please sign in to comment.