Skip to content

Commit

Permalink
Fix web examples with wgpu (#2433)
Browse files Browse the repository at this point in the history
  • Loading branch information
laggui authored Oct 28, 2024
1 parent b422a65 commit 65aa8b5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions examples/image-classification-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ half_precision = []

[dependencies]
burn = { path = "../../crates/burn", version = "0.15.0", default-features = false, features = [
"ndarray",
] }
cubecl = { workspace = true, features = ["wgpu"] }
burn-wgpu = { path = "../../crates/burn-wgpu", version = "0.15.0", default-features = false, features = [
"autotune",
"ndarray", "wgpu",
] }
cubecl-runtime = { version = "0.3.0", features = ["channel-mpsc"] } # missing feature flags
burn-candle = { path = "../../crates/burn-candle", version = "0.15.0", default-features = false }

log = { workspace = true }
Expand Down
3 changes: 1 addition & 2 deletions examples/image-classification-web/src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ use crate::model::{label::LABELS, normalizer::Normalizer, squeezenet::Model as S

use burn::{backend::NdArray, prelude::*, tensor::activation::softmax};

use burn::backend::wgpu::{init_async, AutoGraphicsApi, Wgpu, WgpuDevice};
use burn_candle::Candle;
use burn_wgpu::{Wgpu, WgpuDevice};
use cubecl::wgpu::{init_async, AutoGraphicsApi};

use serde::Serialize;
use wasm_bindgen::prelude::*;
Expand Down
3 changes: 2 additions & 1 deletion examples/mnist-inference-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ crate-type = ["cdylib"]
default = ["ndarray"]

ndarray = ["burn/ndarray"]
wgpu = ["burn/wgpu"]
wgpu = ["burn/wgpu", "cubecl-runtime"]

[dependencies]
burn = { path = "../../crates/burn", default-features = false }
cubecl-runtime = { version = "0.3.0", optional = true, features = ["channel-mpsc"] } # missing feature flag
serde = { workspace = true }
console_error_panic_hook = { workspace = true }

Expand Down

0 comments on commit 65aa8b5

Please sign in to comment.