huggingface / huggingface/candle
the trait bound `half::bf16: SampleUniform` is not satisfied
- Dominant language
- Rust
- Stars
- 21k
- Forks
- 1.8k
- Avg merge
- 16h 42m
- Merged PRs (30d)
- 25
Description
To reproduce:
```bash
> rustc --version
rustc 1.85.0 (4d91de4e4 2025-02-17)
```
Cargo.toml
```toml
[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
```rust
use candle_core::{Device, Tensor};
fn main() -> Result<(), Box> {
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 {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
= note: required for `half::bf16` to implement `SampleBorrow`
note: required by a bound in `Uniform::::new`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:186:13
|
184 | pub fn new(low: B1, high: B2) -> Uniform
| --- required by a bound in this associated function
185 | where
186 | B1: SampleBorrow + Sized,
| ^^^^^^^^^^^^^^^ required by this bound in `Uniform::::new`
error[E0277]: the trait bound `half::bf16: SampleBorrow` 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 {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
= note: required for `half::bf16` to implement `SampleBorrow`
note: required by a bound in `Uniform::::new`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:187:13
|
184 | pub fn new(low: B1, high: B2) -> Uniform
| --- required by a bound in this associated function
...
187 | B2: SampleBorrow + Sized,
| ^^^^^^^^^^^^^^^ required by this bound in `Uniform::::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 {
| ------------------------- 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::Sampler);
| ^^^^^^^^^^^^^ required by this bound in `Uniform`
error[E0277]: the trait bound `half::bf16: SampleUniform` is not satisfied in `Uniform`
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2492:21
|
2492 | let uniform =
| ^^^^^^^ within `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 {
| ------------------------- 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`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:179:12
|
179 | pub struct Uniform(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::(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 {
| ------------------------- 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::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 {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
= note: required for `half::f16` to implement `SampleBorrow`
note: required by a bound in `Uniform::::new`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:186:13
|
184 | pub fn new(low: B1, high: B2) -> Uniform
| --- required by a bound in this associated function
185 | where
186 | B1: SampleBorrow + Sized,
| ^^^^^^^^^^^^^^^ required by this bound in `Uniform::::new`
error[E0277]: the trait bound `half::f16: SampleBorrow` 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 {
| ------------------------- this is the found trait
= help: you can use `cargo tree` to explore your dependency tree
= note: required for `half::f16` to implement `SampleBorrow`
note: required by a bound in `Uniform::::new`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:187:13
|
184 | pub fn new(low: B1, high: B2) -> Uniform
| --- required by a bound in this associated function
...
187 | B2: SampleBorrow + Sized,
| ^^^^^^^^^^^^^^^ required by this bound in `Uniform::::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 {
| ------------------------- 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::Sampler);
| ^^^^^^^^^^^^^ required by this bound in `Uniform`
error[E0277]: the trait bound `half::f16: SampleUniform` is not satisfied in `Uniform`
--> /home/ylk4626/.cargo/git/checkouts/candle-5b4d092929d18d36/e286cf7/candle-core/src/cpu_backend/mod.rs:2501:21
|
2501 | let uniform =
| ^^^^^^^ within `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 {
| ------------------------- 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`
--> /home/ylk4626/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand-0.8.5/src/distributions/uniform.rs:179:12
|
179 | pub struct Uniform(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::(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 {
| ------------------------- 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::Sampler);
| ^^^^^^^^^^^^^ required by this bound in `Uniform`
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution` 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` 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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ 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 {
| ------------------------- 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::::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
| ^^^^^^^^^^^^^^^ required by this bound in `Normal::::new`
...
156 | pub fn new(mean: F, std_dev: F) -> Result, Error> {
| --- required by a bound in this associated function
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution` 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` 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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ 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 {
| ------------------------- 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
| ------ required by a bound in this struct
118 | where F: Float, StandardNormal: Distribution
| ^^^^^^^^^^^^^^^ required by this bound in `Normal`
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution` 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` 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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ 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 {
| ------------------------- 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
| ------ required by a bound in this struct
118 | where F: Float, StandardNormal: Distribution
| ^^^^^^^^^^^^^^^ required by this bound in `Normal`
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution` 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` 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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ 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 {
| ------------------------- 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
| ------ required by a bound in this struct
118 | where F: Float, StandardNormal: Distribution
| ^^^^^^^^^^^^^^^ required by this bound in `Normal`
error[E0599]: the method `sample` exists for struct `Normal`, 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` 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`
...
117 | pub struct Normal
| -------------------- doesn't satisfy `_: Distribution`, `rand_distr::Normal: RngCore` or `rand_distr::Normal: rand::Rng`
|
= note: the following trait bounds were not satisfied:
`StandardNormal: rand_distr::Distribution`
which is required by `rand_distr::Normal: rand_distr::Distribution`
`rand_distr::Normal: RngCore`
which is required by `rand_distr::Normal: rand::Rng`
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution` 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` 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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ 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 {
| ------------------------- 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::::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
| ^^^^^^^^^^^^^^^ required by this bound in `Normal::::new`
...
156 | pub fn new(mean: F, std_dev: F) -> Result, Error> {
| --- required by a bound in this associated function
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution` 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` 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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ 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 {
| ------------------------- 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
| ------ required by a bound in this struct
118 | where F: Float, StandardNormal: Distribution
| ^^^^^^^^^^^^^^^ required by this bound in `Normal`
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution` 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` 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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ 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 {
| ------------------------- 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
| ------ required by a bound in this struct
118 | where F: Float, StandardNormal: Distribution
| ^^^^^^^^^^^^^^^ required by this bound in `Normal`
error[E0277]: the trait bound `StandardNormal: rand_distr::Distribution` 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` 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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ 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 {
| ------------------------- 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
| ------ required by a bound in this struct
118 | where F: Float, StandardNormal: Distribution
| ^^^^^^^^^^^^^^^ required by this bound in `Normal`
error[E0599]: the method `sample` exists for struct `Normal`, 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` 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`
...
117 | pub struct Normal
| -------------------- doesn't satisfy `_: Distribution`, `rand_distr::Normal: RngCore` or `rand_distr::Normal: rand::Rng`
|
= note: the following trait bounds were not satisfied:
`StandardNormal: rand_distr::Distribution`
which is required by `rand_distr::Normal: rand_distr::Distribution`
`rand_distr::Normal: RngCore`
which is required by `rand_distr::Normal: 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
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.