mirror of https://github.com/tracel-ai/burn.git
Fix web examples with wgpu (#2433)
This commit is contained in:
parent
b422a65a3c
commit
65aa8b5eaa
|
@ -3264,9 +3264,8 @@ dependencies = [
|
||||||
"burn",
|
"burn",
|
||||||
"burn-candle",
|
"burn-candle",
|
||||||
"burn-import",
|
"burn-import",
|
||||||
"burn-wgpu",
|
|
||||||
"console_error_panic_hook",
|
"console_error_panic_hook",
|
||||||
"cubecl",
|
"cubecl-runtime",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"log",
|
"log",
|
||||||
"serde",
|
"serde",
|
||||||
|
@ -3794,6 +3793,7 @@ version = "0.15.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"burn",
|
"burn",
|
||||||
"console_error_panic_hook",
|
"console_error_panic_hook",
|
||||||
|
"cubecl-runtime",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"serde",
|
"serde",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
|
|
|
@ -15,12 +15,9 @@ half_precision = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
burn = { path = "../../crates/burn", version = "0.15.0", default-features = false, features = [
|
burn = { path = "../../crates/burn", version = "0.15.0", default-features = false, features = [
|
||||||
"ndarray",
|
"ndarray", "wgpu",
|
||||||
] }
|
|
||||||
cubecl = { workspace = true, features = ["wgpu"] }
|
|
||||||
burn-wgpu = { path = "../../crates/burn-wgpu", version = "0.15.0", default-features = false, features = [
|
|
||||||
"autotune",
|
|
||||||
] }
|
] }
|
||||||
|
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 }
|
burn-candle = { path = "../../crates/burn-candle", version = "0.15.0", default-features = false }
|
||||||
|
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
|
|
|
@ -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::NdArray, prelude::*, tensor::activation::softmax};
|
||||||
|
|
||||||
|
use burn::backend::wgpu::{init_async, AutoGraphicsApi, Wgpu, WgpuDevice};
|
||||||
use burn_candle::Candle;
|
use burn_candle::Candle;
|
||||||
use burn_wgpu::{Wgpu, WgpuDevice};
|
|
||||||
use cubecl::wgpu::{init_async, AutoGraphicsApi};
|
|
||||||
|
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
|
|
@ -13,10 +13,11 @@ crate-type = ["cdylib"]
|
||||||
default = ["ndarray"]
|
default = ["ndarray"]
|
||||||
|
|
||||||
ndarray = ["burn/ndarray"]
|
ndarray = ["burn/ndarray"]
|
||||||
wgpu = ["burn/wgpu"]
|
wgpu = ["burn/wgpu", "cubecl-runtime"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
burn = { path = "../../crates/burn", default-features = false }
|
burn = { path = "../../crates/burn", default-features = false }
|
||||||
|
cubecl-runtime = { version = "0.3.0", optional = true, features = ["channel-mpsc"] } # missing feature flag
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
console_error_panic_hook = { workspace = true }
|
console_error_panic_hook = { workspace = true }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue