Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
louisfd committed May 19, 2024
1 parent a14cb5c commit 02d8bf7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/burn-cube/src/codegen/dialect/procedure/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl IndexOffsetGlobalWithLayout {
let index_item_ty = Item::new(Elem::UInt);
let offset_ref = self.position;
let zero: Variable = 0u32.into();
let vectorization_factor: u8 = self.tensors[0].item().vectorization.into();
let vectorization_factor: u8 = self.tensors[0].item().vectorization;
let vectorization_factor: Variable = (vectorization_factor as u32).into();
for index in self.indexes.iter() {
cpa!(scope, index = zero);
Expand Down
2 changes: 1 addition & 1 deletion crates/burn-cube/src/language/element/bool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl PrimitiveVariable for Bool {
}

fn vectorization(&self) -> Vectorization {
self.vectorization.into()
self.vectorization
}

fn to_f64(&self) -> f64 {
Expand Down
2 changes: 1 addition & 1 deletion crates/burn-cube/src/language/element/numeric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub trait Numeric:
fn from_vec_expand(context: &mut CubeContext, vec: &[i64]) -> <Self as CubeType>::ExpandType {
let mut new_var = context.create_local(Item {
elem: Self::as_elem(),
vectorization: (vec.len() as u8).into(),
vectorization: (vec.len() as u8),
});
for (i, element) in vec.iter().enumerate() {
new_var = index_assign::expand(context, new_var, i.into(), (*element).into());
Expand Down
2 changes: 1 addition & 1 deletion crates/burn-cube/src/language/element/uint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl PrimitiveVariable for UInt {
}

fn vectorization(&self) -> Vectorization {
self.vectorization.into()
self.vectorization
}

fn to_f64(&self) -> f64 {
Expand Down

0 comments on commit 02d8bf7

Please sign in to comment.