-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic while playing with the MNIST example in the book #2754
Comments
Root:
Seems very much related to this user's error posted on discord this morning I can't reproduce the issue on the last release but will try to look into it. If you try the latest github revision instead of the last release do you still have this issue? There have been some minor changes in this area so curious if it had any impact. |
@laggui I'm unable to compile in release mode due to compilation errors.❯ cargo run --release
Compiling burn-guide v0.1.0 (/home/schneider/Dropbox/burn-guide)
error[E0275]: overflow evaluating the requirement `wgpu_core::validation::NumericType: Sync`
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`burn_guide`)
note: required because it appears within the type `wgpu_core::validation::InterfaceVar`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/validation.rs:109:12
|
109 | pub struct InterfaceVar {
| ^^^^^^^^^^^^
note: required because it appears within the type `wgpu_core::validation::Varying`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/validation.rs:136:6
|
136 | enum Varying {
| ^^^^^^^
note: required because it appears within the type `PhantomData<wgpu_core::validation::Varying>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/marker.rs:753:12
|
753 | pub struct PhantomData<T: ?Sized>;
| ^^^^^^^^^^^
note: required because it appears within the type `alloc::raw_vec::RawVec<wgpu_core::validation::Varying>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec.rs:76:19
|
76 | pub(crate) struct RawVec<T, A: Allocator = Global> {
| ^^^^^^
note: required because it appears within the type `Vec<wgpu_core::validation::Varying>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:397:12
|
397 | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ^^^
note: required because it appears within the type `wgpu_core::validation::EntryPoint`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/validation.rs:149:8
|
149 | struct EntryPoint {
| ^^^^^^^^^^
= note: required because it appears within the type `((naga::ShaderStage, std::string::String), wgpu_core::validation::EntryPoint)`
= note: required for `RawTable<((ShaderStage, String), EntryPoint)>` to implement `Sync`
note: required because it appears within the type `HashMap<(ShaderStage, String), EntryPoint, BuildHasherDefault<...>>`
--> /rust/deps/hashbrown-0.15.0/src/map.rs:185:12
note: required because it appears within the type `HashMap<(ShaderStage, String), EntryPoint, BuildHasherDefault<...>>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/map.rs:211:12
|
211 | pub struct HashMap<K, V, S = RandomState> {
| ^^^^^^^
note: required because it appears within the type `wgpu_core::validation::Interface`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/validation.rs:161:12
|
161 | pub struct Interface {
| ^^^^^^^^^
note: required because it appears within the type `std::option::Option<wgpu_core::validation::Interface>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:572:10
|
572 | pub enum Option<T> {
| ^^^^^^
note: required because it appears within the type `wgpu_core::pipeline::ShaderModule`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/pipeline.rs:48:12
|
48 | pub struct ShaderModule {
| ^^^^^^^^^^^^
= note: required for `Arc<wgpu_core::pipeline::ShaderModule>` to implement `Send`
note: required because it appears within the type `ManuallyDrop<Arc<wgpu_core::pipeline::ShaderModule>>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/manually_drop.rs:157:12
|
157 | pub struct ManuallyDrop<T: ?Sized> {
| ^^^^^^^^^^^^
note: required because it appears within the type `MaybeUninit<Arc<wgpu_core::pipeline::ShaderModule>>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/maybe_uninit.rs:241:11
|
241 | pub union MaybeUninit<T> {
| ^^^^^^^^^^^
= note: required because it appears within the type `[MaybeUninit<Arc<wgpu_core::pipeline::ShaderModule>>; 2]`
note: required because it appears within the type `arrayvec::arrayvec::ArrayVec<Arc<wgpu_core::pipeline::ShaderModule>, 2>`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrayvec-0.7.6/src/arrayvec.rs:43:12
|
43 | pub struct ArrayVec<T, const CAP: usize> {
| ^^^^^^^^
note: required because it appears within the type `wgpu_core::pipeline::RenderPipeline`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/pipeline.rs:578:12
|
578 | pub struct RenderPipeline {
| ^^^^^^^^^^^^^^
= note: required for `std::sync::Weak<wgpu_core::pipeline::RenderPipeline>` to implement `Send`
note: required because it appears within the type `wgpu_core::binding_model::ExclusivePipeline`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/binding_model.rs:478:17
|
478 | pub(crate) enum ExclusivePipeline {
| ^^^^^^^^^^^^^^^^^
= note: required for `OnceLock<wgpu_core::binding_model::ExclusivePipeline>` to implement `Send`
note: required because it appears within the type `wgpu_core::binding_model::BindGroupLayout`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/binding_model.rs:508:12
|
508 | pub struct BindGroupLayout {
| ^^^^^^^^^^^^^^^
= note: required for `Arc<wgpu_core::binding_model::BindGroupLayout>` to implement `Sync`
note: required because it appears within the type `ManuallyDrop<Arc<wgpu_core::binding_model::BindGroupLayout>>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/manually_drop.rs:157:12
|
157 | pub struct ManuallyDrop<T: ?Sized> {
| ^^^^^^^^^^^^
note: required because it appears within the type `MaybeUninit<Arc<wgpu_core::binding_model::BindGroupLayout>>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/maybe_uninit.rs:241:11
|
241 | pub union MaybeUninit<T> {
| ^^^^^^^^^^^
= note: required because it appears within the type `[MaybeUninit<Arc<wgpu_core::binding_model::BindGroupLayout>>; 8]`
note: required because it appears within the type `arrayvec::arrayvec::ArrayVec<Arc<wgpu_core::binding_model::BindGroupLayout>, 8>`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrayvec-0.7.6/src/arrayvec.rs:43:12
|
43 | pub struct ArrayVec<T, const CAP: usize> {
| ^^^^^^^^
note: required because it appears within the type `wgpu_core::binding_model::PipelineLayout`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/binding_model.rs:660:12
|
660 | pub struct PipelineLayout {
| ^^^^^^^^^^^^^^
= note: required for `Arc<wgpu_core::binding_model::PipelineLayout>` to implement `Sync`
note: required because it appears within the type `wgpu_core::pipeline::RenderPipeline`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/pipeline.rs:578:12
|
578 | pub struct RenderPipeline {
| ^^^^^^^^^^^^^^
= note: required for `std::sync::Weak<wgpu_core::pipeline::RenderPipeline>` to implement `Sync`
note: required because it appears within the type `wgpu_core::binding_model::ExclusivePipeline`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/binding_model.rs:478:17
|
478 | pub(crate) enum ExclusivePipeline {
| ^^^^^^^^^^^^^^^^^
= note: required for `OnceLock<wgpu_core::binding_model::ExclusivePipeline>` to implement `Sync`
note: required because it appears within the type `wgpu_core::binding_model::BindGroupLayout`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/binding_model.rs:508:12
|
508 | pub struct BindGroupLayout {
| ^^^^^^^^^^^^^^^
= note: required for `Arc<wgpu_core::binding_model::BindGroupLayout>` to implement `Send`
note: required because it appears within the type `wgpu_core::binding_model::BindGroup`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/binding_model.rs:908:12
|
908 | pub struct BindGroup {
| ^^^^^^^^^
= note: required for `Arc<wgpu_core::binding_model::BindGroup>` to implement `Send`
note: required because it appears within the type `PhantomData<Arc<wgpu_core::binding_model::BindGroup>>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/marker.rs:753:12
|
753 | pub struct PhantomData<T: ?Sized>;
| ^^^^^^^^^^^
note: required because it appears within the type `alloc::raw_vec::RawVec<Arc<wgpu_core::binding_model::BindGroup>>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec.rs:76:19
|
76 | pub(crate) struct RawVec<T, A: Allocator = Global> {
| ^^^^^^
note: required because it appears within the type `Vec<Arc<wgpu_core::binding_model::BindGroup>>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:397:12
|
397 | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ^^^
note: required because it appears within the type `wgpu_core::track::stateless::StatelessTracker<wgpu_core::binding_model::BindGroup>`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/track/stateless.rs:8:19
|
8 | pub(crate) struct StatelessTracker<T> {
| ^^^^^^^^^^^^^^^^
note: required because it appears within the type `wgpu_core::track::Tracker`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/track/mod.rs:600:19
|
600 | pub(crate) struct Tracker {
| ^^^^^^^
note: required because it appears within the type `wgpu_core::device::queue::EncoderInFlight`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/device/queue.rs:266:19
|
266 | pub(crate) struct EncoderInFlight {
| ^^^^^^^^^^^^^^^
note: required because it appears within the type `PhantomData<wgpu_core::device::queue::EncoderInFlight>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/marker.rs:753:12
|
753 | pub struct PhantomData<T: ?Sized>;
| ^^^^^^^^^^^
note: required because it appears within the type `alloc::raw_vec::RawVec<wgpu_core::device::queue::EncoderInFlight>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec.rs:76:19
|
76 | pub(crate) struct RawVec<T, A: Allocator = Global> {
| ^^^^^^
note: required because it appears within the type `Vec<wgpu_core::device::queue::EncoderInFlight>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:397:12
|
397 | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ^^^
note: required because it appears within the type `wgpu_core::device::life::ActiveSubmission`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/device/life.rs:24:8
|
24 | struct ActiveSubmission {
| ^^^^^^^^^^^^^^^^
note: required because it appears within the type `PhantomData<wgpu_core::device::life::ActiveSubmission>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/marker.rs:753:12
|
753 | pub struct PhantomData<T: ?Sized>;
| ^^^^^^^^^^^
note: required because it appears within the type `alloc::raw_vec::RawVec<wgpu_core::device::life::ActiveSubmission>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec.rs:76:19
|
76 | pub(crate) struct RawVec<T, A: Allocator = Global> {
| ^^^^^^
note: required because it appears within the type `Vec<wgpu_core::device::life::ActiveSubmission>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:397:12
|
397 | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ^^^
note: required because it appears within the type `wgpu_core::device::life::LifetimeTracker`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/device/life.rs:137:19
|
137 | pub(crate) struct LifetimeTracker {
| ^^^^^^^^^^^^^^^
= note: required for `Mutex<RawMutex, LifetimeTracker>` to implement `Send`
note: required because it appears within the type `wgpu_core::lock::vanilla::Mutex<wgpu_core::device::life::LifetimeTracker>`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/lock/vanilla.rs:16:12
|
16 | pub struct Mutex<T>(parking_lot::Mutex<T>);
| ^^^^^
note: required because it appears within the type `wgpu_core::device::queue::Queue`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/device/queue.rs:41:12
|
41 | pub struct Queue {
| ^^^^^
= note: required for `std::sync::Weak<wgpu_core::device::queue::Queue>` to implement `Send`
= note: 1 redundant requirement hidden
= note: required for `OnceLock<std::sync::Weak<wgpu_core::device::queue::Queue>>` to implement `Send`
note: required because it appears within the type `wgpu_core::device::resource::Device`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/device/resource.rs:59:12
|
59 | pub struct Device {
| ^^^^^^
= note: required for `Arc<wgpu_core::device::resource::Device>` to implement `Sync`
note: required because it appears within the type `wgpu_core::binding_model::BindGroup`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/binding_model.rs:908:12
|
908 | pub struct BindGroup {
| ^^^^^^^^^
= note: required for `std::sync::Weak<wgpu_core::binding_model::BindGroup>` to implement `Send`
note: required because it appears within the type `PhantomData<std::sync::Weak<wgpu_core::binding_model::BindGroup>>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/marker.rs:753:12
|
753 | pub struct PhantomData<T: ?Sized>;
| ^^^^^^^^^^^
note: required because it appears within the type `alloc::raw_vec::RawVec<std::sync::Weak<wgpu_core::binding_model::BindGroup>>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec.rs:76:19
|
76 | pub(crate) struct RawVec<T, A: Allocator = Global> {
| ^^^^^^
note: required because it appears within the type `Vec<std::sync::Weak<wgpu_core::binding_model::BindGroup>>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:397:12
|
397 | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ^^^
note: required because it appears within the type `wgpu_core::weak_vec::WeakVec<wgpu_core::binding_model::BindGroup>`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/weak_vec.rs:8:19
|
8 | pub(crate) struct WeakVec<T> {
| ^^^^^^^
note: required because it appears within the type `wgpu_core::resource::DestroyedBuffer`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/resource.rs:781:12
|
781 | pub struct DestroyedBuffer {
| ^^^^^^^^^^^^^^^
note: required because it appears within the type `wgpu_core::device::queue::TempResource`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/device/queue.rs:254:10
|
254 | pub enum TempResource {
| ^^^^^^^^^^^^
note: required because it appears within the type `PhantomData<wgpu_core::device::queue::TempResource>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/marker.rs:753:12
|
753 | pub struct PhantomData<T: ?Sized>;
| ^^^^^^^^^^^
note: required because it appears within the type `alloc::raw_vec::RawVec<wgpu_core::device::queue::TempResource>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec.rs:76:19
|
76 | pub(crate) struct RawVec<T, A: Allocator = Global> {
| ^^^^^^
note: required because it appears within the type `Vec<wgpu_core::device::queue::TempResource>`
--> /home/schneider/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:397:12
|
397 | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ^^^
note: required because it appears within the type `wgpu_core::device::queue::PendingWrites`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/device/queue.rs:298:19
|
298 | pub(crate) struct PendingWrites {
| ^^^^^^^^^^^^^
= note: required for `Mutex<RawMutex, PendingWrites>` to implement `Sync`
note: required because it appears within the type `wgpu_core::lock::vanilla::Mutex<wgpu_core::device::queue::PendingWrites>`
--> /home/schneider/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-24.0.0/src/lock/vanilla.rs:16:12
|
16 | pub struct Mutex<T>(parking_lot::Mutex<T>);
| ^^^^^
= note: the full name for the type has been written to '/home/schneider/Dropbox/burn-guide/target/release/deps/burn_guide-2c2014b614557dfe.long-type-16600178113547706552.txt'
= note: consider using `--verbose` to print the full type name to the console
For more information about this error, try `rustc --explain E0275`.
error: could not compile `burn-guide` (bin "burn-guide") due to 1 previous error I'm able to compile in development mode just fine (here's the |
Ahh right, we've seen this issue with the update to wgpu 0.24 that has more complex types. It can be solved by increasing the default recursion limit (128) at the top of your program: #![recursion_limit = "256"] |
I got a panic while playing around with the MNIST example in the book. The panic only happens in release mode.
I'm using the WGPU backend. I've also attached the
experiment.log
andconfig.json
files.The text was updated successfully, but these errors were encountered: