Fix web examples with wgpu (#2433)

This commit is contained in:
Guillaume Lagrange 2024-10-28 15:09:55 -04:00 committed by GitHub
parent b422a65a3c
commit 65aa8b5eaa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 10 deletions

4
Cargo.lock generated
View File

@ -3264,9 +3264,8 @@ dependencies = [
"burn",
"burn-candle",
"burn-import",
"burn-wgpu",
"console_error_panic_hook",
"cubecl",
"cubecl-runtime",
"js-sys",
"log",
"serde",
@ -3794,6 +3793,7 @@ version = "0.15.0"
dependencies = [
"burn",
"console_error_panic_hook",
"cubecl-runtime",
"js-sys",
"serde",
"wasm-bindgen",

View File

@ -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 }

View File

@ -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::*;

View File

@ -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 }