Skip to content

Commit

Permalink
Fix no-std
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielsimard committed Jul 22, 2024
1 parent e686da9 commit 49d844b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions crates/cubecl-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ version.workspace = true

[features]
default = ["std"]
std = ["rand/std"]
std = ["rand/std", "pollster"]

[target.'cfg(target_family = "wasm")'.dependencies]
getrandom = { workspace = true, features = ["js"] }
Expand All @@ -24,7 +24,7 @@ spin = { workspace = true } # using in place of use std::sy
derive-new = { workspace = true }
serde = { workspace = true }
rand = { workspace = true }
pollster = { workspace = true }
pollster = { workspace = true, optional = true }

[dev-dependencies]
dashmap = { workspace = true }
10 changes: 5 additions & 5 deletions crates/cubecl-linalg/src/tensor/contiguous.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub fn into_contiguous<R: Runtime, E: CubePrimitive>(
// Vectorization is only enabled when the last dimension is contiguous.
let rank = input.strides.len();
let vectorization_factor =
tensor_vectorization_factor(&[4, 2], &input.shape, &input.strides, rank - 1);
tensor_vectorization_factor(&[4, 2], input.shape, input.strides, rank - 1);

let num_elems: usize = input.shape.iter().product();
let cube_count = calculate_cube_count_elemwise(
Expand All @@ -73,14 +73,14 @@ pub fn into_contiguous<R: Runtime, E: CubePrimitive>(
let output = TensorHandle::new_contiguous(input.shape.to_vec(), handle);

into_contiguous_kernel::launch::<E, R>(
&client,
client,
cube_count,
CubeDim::default(),
TensorArg::vectorized(
vectorization_factor,
&input.handle,
&input.strides,
&input.shape,
input.handle,
input.strides,
input.shape,
),
TensorArg::vectorized(
vectorization_factor,
Expand Down

0 comments on commit 49d844b

Please sign in to comment.