You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[package]
name = "test_candle2"version = "0.1.0"edition = "2024"
[dependencies]
candle-core = { git = "https://github.com/huggingface/candle.git", version = "0.8.3" }
main.rs
use candle_core::{Device,Tensor};fnmain() -> Result<(),Box<dyn std::error::Error>>{let device = Device::Cpu;let a = Tensor::randn(0f32,1.,(2,3),&device)?;let b = Tensor::randn(0f32,1.,(3,4),&device)?;let c = a.matmul(&b)?;println!("{c}");Ok(())}
error[E0277]: the trait bound `half::bf16: SampleUniform` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2493:55
|
2493 | rand::distributions::Uniform::new(bf16::from_f64(min), bf16::from_f64(max));
| --------------------------------- ^^^^^^^^^^^^^^^^^^^ the trait `SampleUniform` is not implemented for `half::bf16`
| |
| required by a bound introduced by this call
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:216:1
|
216 | pub trait SampleUniform: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/half-2.5.0/src/bfloat.rs:47:1
|
47 | pub struct bf16(u16);
| --------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
= note: required for `half::bf16` to implement `SampleBorrow<half::bf16>`
note: required by a bound in `Uniform::<X>::new`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:186:13
|
184 | pub fn new<B1, B2>(low: B1, high: B2) -> Uniform<X>
| --- required by a bound in this associated function
185 | where
186 | B1: SampleBorrow<X> + Sized,
| ^^^^^^^^^^^^^^^ required by this bound in `Uniform::<X>::new`
error[E0277]: the trait bound `half::bf16: SampleBorrow<half::bf16>` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2493:76
|
2493 | rand::distributions::Uniform::new(bf16::from_f64(min), bf16::from_f64(max));
| --------------------------------- ^^^^^^^^^^^^^^^^^^^ the trait `SampleUniform` is not implemented for `half::bf16`
| |
| required by a bound introduced by this call
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:216:1
|
216 | pub trait SampleUniform: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/half-2.5.0/src/bfloat.rs:47:1
|
47 | pub struct bf16(u16);
| --------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
= note: required for `half::bf16` to implement `SampleBorrow<half::bf16>`
note: required by a bound in `Uniform::<X>::new`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:187:13
|
184 | pub fn new<B1, B2>(low: B1, high: B2) -> Uniform<X>
| --- required by a bound in this associated function
...
187 | B2: SampleBorrow<X> + Sized,
| ^^^^^^^^^^^^^^^ required by this bound in `Uniform::<X>::new`
error[E0277]: the trait bound `half::bf16: SampleUniform` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2493:21
|
2493 | rand::distributions::Uniform::new(bf16::from_f64(min), bf16::from_f64(max));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `SampleUniform` is not implemented for `half::bf16`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:216:1
|
216 | pub trait SampleUniform: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/half-2.5.0/src/bfloat.rs:47:1
|
47 | pub struct bf16(u16);
| --------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `Uniform`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:179:23
|
179 | pub struct Uniform<X: SampleUniform>(X::Sampler);
| ^^^^^^^^^^^^^ required by this bound in `Uniform`
error[E0277]: the trait bound `half::bf16: SampleUniform` is not satisfied in `Uniform<half::bf16>`
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2492:21
|
2492 | let uniform =
| ^^^^^^^ within `Uniform<half::bf16>`, the trait `SampleUniform` is not implemented for `half::bf16`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:216:1
|
216 | pub trait SampleUniform: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/half-2.5.0/src/bfloat.rs:47:1
|
47 | pub struct bf16(u16);
| --------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required because it appears within the type `Uniform<half::bf16>`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:179:12
|
179 | pub struct Uniform<X: SampleUniform>(X::Sampler);
| ^^^^^^^
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
error[E0277]: the trait bound `half::bf16: SampleUniform` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2495:50
|
2495 | data.push(rng.sample::<bf16, _>(uniform))
| ^ the trait `SampleUniform` is not implemented for `half::bf16`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:216:1
|
216 | pub trait SampleUniform: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/half-2.5.0/src/bfloat.rs:47:1
|
47 | pub struct bf16(u16);
| --------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `Uniform`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:179:23
|
179 | pub struct Uniform<X: SampleUniform>(X::Sampler);
| ^^^^^^^^^^^^^ required by this bound in `Uniform`
error[E0277]: the trait bound `half::f16: SampleUniform` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2502:55
|
2502 | rand::distributions::Uniform::new(f16::from_f64(min), f16::from_f64(max));
| --------------------------------- ^^^^^^^^^^^^^^^^^^ the trait `SampleUniform` is not implemented for `half::f16`
| |
| required by a bound introduced by this call
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:216:1
|
216 | pub trait SampleUniform: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/half-2.5.0/src/binary16.rs:47:1
|
47 | pub struct f16(u16);
| -------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
= note: required for `half::f16` to implement `SampleBorrow<half::f16>`
note: required by a bound in `Uniform::<X>::new`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:186:13
|
184 | pub fn new<B1, B2>(low: B1, high: B2) -> Uniform<X>
| --- required by a bound in this associated function
185 | where
186 | B1: SampleBorrow<X> + Sized,
| ^^^^^^^^^^^^^^^ required by this bound in `Uniform::<X>::new`
error[E0277]: the trait bound `half::f16: SampleBorrow<half::f16>` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2502:75
|
2502 | rand::distributions::Uniform::new(f16::from_f64(min), f16::from_f64(max));
| --------------------------------- ^^^^^^^^^^^^^^^^^^ the trait `SampleUniform` is not implemented for `half::f16`
| |
| required by a bound introduced by this call
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:216:1
|
216 | pub trait SampleUniform: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/half-2.5.0/src/binary16.rs:47:1
|
47 | pub struct f16(u16);
| -------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
= note: required for `half::f16` to implement `SampleBorrow<half::f16>`
note: required by a bound in `Uniform::<X>::new`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:187:13
|
184 | pub fn new<B1, B2>(low: B1, high: B2) -> Uniform<X>
| --- required by a bound in this associated function
...
187 | B2: SampleBorrow<X> + Sized,
| ^^^^^^^^^^^^^^^ required by this bound in `Uniform::<X>::new`
error[E0277]: the trait bound `half::f16: SampleUniform` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2502:21
|
2502 | rand::distributions::Uniform::new(f16::from_f64(min), f16::from_f64(max));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `SampleUniform` is not implemented for `half::f16`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:216:1
|
216 | pub trait SampleUniform: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/half-2.5.0/src/binary16.rs:47:1
|
47 | pub struct f16(u16);
| -------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `Uniform`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:179:23
|
179 | pub struct Uniform<X: SampleUniform>(X::Sampler);
| ^^^^^^^^^^^^^ required by this bound in `Uniform`
error[E0277]: the trait bound `half::f16: SampleUniform` is not satisfied in `Uniform<half::f16>`
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2501:21
|
2501 | let uniform =
| ^^^^^^^ within `Uniform<half::f16>`, the trait `SampleUniform` is not implemented for `half::f16`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:216:1
|
216 | pub trait SampleUniform: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/half-2.5.0/src/binary16.rs:47:1
|
47 | pub struct f16(u16);
| -------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required because it appears within the type `Uniform<half::f16>`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:179:12
|
179 | pub struct Uniform<X: SampleUniform>(X::Sampler);
| ^^^^^^^
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
error[E0277]: the trait bound `half::f16: SampleUniform` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2504:49
|
2504 | data.push(rng.sample::<f16, _>(uniform))
| ^ the trait `SampleUniform` is not implemented for `half::f16`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:216:1
|
216 | pub trait SampleUniform: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/half-2.5.0/src/binary16.rs:47:1
|
47 | pub struct f16(u16);
| -------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `Uniform`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:179:23
|
179 | pub struct Uniform<X: SampleUniform>(X::Sampler);
| ^^^^^^^^^^^^^ required by this bound in `Uniform`
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution<half::bf16>` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2538:30
|
2538 | let normal = rand_distr::Normal::new(bf16::from_f64(mean), bf16::from_f64(std))
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_distr::Distribution<half::bf16>` is not implemented for `StandardNormal`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:41:1
|
41 | pub struct StandardNormal;
| ------------------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `rand_distr::Normal::<F>::new`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:147:33
|
147 | where F: Float, StandardNormal: Distribution<F>
| ^^^^^^^^^^^^^^^ required by this bound in `Normal::<F>::new`
...
156 | pub fn new(mean: F, std_dev: F) -> Result<Normal<F>, Error> {
| --- required by a bound in this associated function
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution<half::bf16>` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2538:30
|
2538 | let normal = rand_distr::Normal::new(bf16::from_f64(mean), bf16::from_f64(std))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_distr::Distribution<half::bf16>` is not implemented for `StandardNormal`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:41:1
|
41 | pub struct StandardNormal;
| ------------------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `rand_distr::Normal`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:118:33
|
117 | pub struct Normal<F>
| ------ required by a bound in this struct
118 | where F: Float, StandardNormal: Distribution<F>
| ^^^^^^^^^^^^^^^ required by this bound in `Normal`
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution<half::bf16>` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2538:30
|
2538 | let normal = rand_distr::Normal::new(bf16::from_f64(mean), bf16::from_f64(std))
| ______________________________^
2539 | | .map_err(Error::wrap)?;
| |_________________________________________^ the trait `rand_distr::Distribution<half::bf16>` is not implemented for `StandardNormal`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:41:1
|
41 | pub struct StandardNormal;
| ------------------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `rand_distr::Normal`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:118:33
|
117 | pub struct Normal<F>
| ------ required by a bound in this struct
118 | where F: Float, StandardNormal: Distribution<F>
| ^^^^^^^^^^^^^^^ required by this bound in `Normal`
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution<half::bf16>` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2538:30
|
2538 | let normal = rand_distr::Normal::new(bf16::from_f64(mean), bf16::from_f64(std))
| ______________________________^
2539 | | .map_err(Error::wrap)?;
| |__________________________________________^ the trait `rand_distr::Distribution<half::bf16>` is not implemented for `StandardNormal`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:41:1
|
41 | pub struct StandardNormal;
| ------------------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `rand_distr::Normal`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:118:33
|
117 | pub struct Normal<F>
| ------ required by a bound in this struct
118 | where F: Float, StandardNormal: Distribution<F>
| ^^^^^^^^^^^^^^^ required by this bound in `Normal`
error[E0599]: the method `sample` exists for struct `Normal<bf16>`, but its trait bounds were not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2541:38
|
2541 | data.push(normal.sample(&mut rng))
| ^^^^^^ method cannot be called on `Normal<bf16>` due to unsatisfied trait bounds
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:41:1
|
41 | pub struct StandardNormal;
| ------------------------- doesn't satisfy `_: Distribution<bf16>`
...
117 | pub struct Normal<F>
| -------------------- doesn't satisfy `_: Distribution<bf16>`, `rand_distr::Normal<half::bf16>: RngCore` or `rand_distr::Normal<half::bf16>: rand::Rng`
|
= note: the following trait bounds were not satisfied:
`StandardNormal: rand_distr::Distribution<half::bf16>`
which is required by `rand_distr::Normal<half::bf16>: rand_distr::Distribution<half::bf16>`
`rand_distr::Normal<half::bf16>: RngCore`
which is required by `rand_distr::Normal<half::bf16>: rand::Rng`
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution<half::f16>` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2547:30
|
2547 | let normal = rand_distr::Normal::new(f16::from_f64(mean), f16::from_f64(std))
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_distr::Distribution<half::f16>` is not implemented for `StandardNormal`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:41:1
|
41 | pub struct StandardNormal;
| ------------------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `rand_distr::Normal::<F>::new`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:147:33
|
147 | where F: Float, StandardNormal: Distribution<F>
| ^^^^^^^^^^^^^^^ required by this bound in `Normal::<F>::new`
...
156 | pub fn new(mean: F, std_dev: F) -> Result<Normal<F>, Error> {
| --- required by a bound in this associated function
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution<half::f16>` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2547:30
|
2547 | let normal = rand_distr::Normal::new(f16::from_f64(mean), f16::from_f64(std))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rand_distr::Distribution<half::f16>` is not implemented for `StandardNormal`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:41:1
|
41 | pub struct StandardNormal;
| ------------------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `rand_distr::Normal`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:118:33
|
117 | pub struct Normal<F>
| ------ required by a bound in this struct
118 | where F: Float, StandardNormal: Distribution<F>
| ^^^^^^^^^^^^^^^ required by this bound in `Normal`
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution<half::f16>` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2547:30
|
2547 | let normal = rand_distr::Normal::new(f16::from_f64(mean), f16::from_f64(std))
| ______________________________^
2548 | | .map_err(Error::wrap)?;
| |_________________________________________^ the trait `rand_distr::Distribution<half::f16>` is not implemented for `StandardNormal`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:41:1
|
41 | pub struct StandardNormal;
| ------------------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `rand_distr::Normal`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:118:33
|
117 | pub struct Normal<F>
| ------ required by a bound in this struct
118 | where F: Float, StandardNormal: Distribution<F>
| ^^^^^^^^^^^^^^^ required by this bound in `Normal`
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution<half::f16>` is not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2547:30
|
2547 | let normal = rand_distr::Normal::new(f16::from_f64(mean), f16::from_f64(std))
| ______________________________^
2548 | | .map_err(Error::wrap)?;
| |__________________________________________^ the trait `rand_distr::Distribution<half::f16>` is not implemented for `StandardNormal`
|
note: there are multiple different versions of crate `rand` in the dependency graph
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2482:13
|
2482 | use rand::prelude::*;
| ---- one version of crate `rand` used here, as a direct dependency of the current crate
|
::: /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/convert.rs:3:5
|
3 | use half::{bf16, f16, slice::HalfFloatSliceExt};
| ---- one version of crate `rand` used here, as a dependency of crate `half`
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:41:1
|
41 | pub struct StandardNormal;
| ------------------------- this type doesn't implement the required trait
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.9.0/src/distr/distribution.rs:35:1
|
35 | pub trait Distribution<T> {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `rand_distr::Normal`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:118:33
|
117 | pub struct Normal<F>
| ------ required by a bound in this struct
118 | where F: Float, StandardNormal: Distribution<F>
| ^^^^^^^^^^^^^^^ required by this bound in `Normal`
error[E0599]: the method `sample` exists for struct `Normal<f16>`, but its trait bounds were not satisfied
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2550:38
|
2550 | data.push(normal.sample(&mut rng))
| ^^^^^^ method cannot be called on `Normal<f16>` due to unsatisfied trait bounds
|
::: /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_distr-0.4.3/src/normal.rs:41:1
|
41 | pub struct StandardNormal;
| ------------------------- doesn't satisfy `_: Distribution<f16>`
...
117 | pub struct Normal<F>
| -------------------- doesn't satisfy `_: Distribution<f16>`, `rand_distr::Normal<half::f16>: RngCore` or `rand_distr::Normal<half::f16>: rand::Rng`
|
= note: the following trait bounds were not satisfied:
`StandardNormal: rand_distr::Distribution<half::f16>`
which is required by `rand_distr::Normal<half::f16>: rand_distr::Distribution<half::f16>`
`rand_distr::Normal<half::f16>: RngCore`
which is required by `rand_distr::Normal<half::f16>: rand::Rng`
Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `candle-core` (lib) due to 20 previous errors
The text was updated successfully, but these errors were encountered:
Is there a plan to release a bumped patch version with this fix? out of tree building the examples from burn fail because of this :( nothing too dramatic but took me a little to find the root cause.
To reproduce:
> rustc --version rustc 1.85.0 (4d91de4e4 2025-02-17)
Cargo.toml
main.rs
The text was updated successfully, but these errors were encountered: