Skip to content

Commit

Permalink
Merge branch 'main' into perf/dynamic-mm-slice-adressing
Browse files Browse the repository at this point in the history
  • Loading branch information
mepatrick73 committed Jun 25, 2024
2 parents 3139c42 + 2fbc462 commit 9bf3b30
Show file tree
Hide file tree
Showing 36 changed files with 1,524 additions and 174 deletions.
116 changes: 61 additions & 55 deletions Cargo.lock

Large diffs are not rendered by default.

23 changes: 13 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@ license = "MIT OR Apache-2.0"

[workspace.dependencies]
async-trait = "0.1.80"
bytemuck = "1.16.0"
bytemuck = "1.16.1"
candle-core = { version = "0.5.1" }
clap = { version = "4.5.7", features = ["derive"] }
colored = "2.1.0"
console_error_panic_hook = "0.1.7"
csv = "1.3.0"
dashmap = "5.5.3"
data-encoding = { version = "2.6.0", default-features = false, features = [
"alloc",
] }
dirs = "5.0.1"
fake = "2.9.2"
flate2 = "1.0.30"
Expand All @@ -42,16 +45,19 @@ getrandom = { version = "0.2.15", default-features = false }
gix-tempfile = { version = "13.1.1", features = ["signals"] }
globwalk = "0.9.1"
hashbrown = "0.14.5"
hound = "3.5.1"
image = "0.25.1"
indicatif = "0.17.8"
js-sys = "0.3.69"
libm = "0.2.8"
log = { default-features = false, version = "0.4.21" }
md5 = "0.7.0"
percent-encoding = "2.3.1"
pretty_assertions = "1.4.0"
proc-macro2 = "1.0.85"
proc-macro2 = "1.0.86"
protobuf = "3.4.0"
protobuf-codegen = "3.4.0"
quote = "1.0.36"
percent-encoding = "2.3.1"
r2d2 = "0.8.10"
r2d2_sqlite = { version = "0.24.0" }
rayon = "1.10.0"
Expand All @@ -63,21 +69,18 @@ rusqlite = { version = "0.31.0" }
rust-format = { version = "0.3.4" }
sanitize-filename = "0.5.0"
serde_rusqlite = "0.35.0"
serial_test = "3.1.1"
spin = { version = "0.9.8", features = ["mutex", "spin_mutex"] }
strum = "0.26.2"
strum = "0.26.3"
strum_macros = "0.26.4"
syn = { version = "2.0.66", features = ["full", "extra-traits"] }
syn = { version = "2.0.68", features = ["full", "extra-traits"] }
tempfile = "3.10.1"
thiserror = "1.0.61"
tokio = { version = "1.38.0", features = ["rt", "macros"] }
tracing-appender = "0.2.3"
tracing-core = "0.1.32"
tracing-subscriber = "0.3.18"
md5 = "0.7.0"
serial_test = "3.1.1"
web-time = "1.1.0"
hound = "3.5.1"
image = "0.25.1"
zip = "2.1.3"

# Terminal UI
Expand All @@ -88,7 +91,7 @@ crossterm = "0.27.0"
futures-intrusive = "0.5.0"
text_placeholder = "0.5.0"
pollster = "0.3.0"
wgpu = "0.20.0"
wgpu = "0.20.1"

# Benchmarks and Burnbench
arboard = "3.4.0"
Expand Down
14 changes: 7 additions & 7 deletions burn-book/src/building-blocks/learner.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Learner

The [burn-train](https://github.com/tracel-ai/burn/tree/main/burn-train) crate encapsulates multiple
utilities for training deep learning models. The goal of the crate is to provide users with a
well-crafted and flexible training loop, so that projects do not have to write such components from
the ground up. Most of the interactions with `burn-train` will be with the `LearnerBuilder` struct,
briefly presented in the previous [training section](../basic-workflow/training.md). This struct
enables you to configure the training loop, offering support for registering metrics, enabling
logging, checkpointing states, using multiple devices, and so on.
The [burn-train](https://github.com/tracel-ai/burn/tree/main/crates/burn-train) crate encapsulates
multiple utilities for training deep learning models. The goal of the crate is to provide users with
a well-crafted and flexible training loop, so that projects do not have to write such components
from the ground up. Most of the interactions with `burn-train` will be with the `LearnerBuilder`
struct, briefly presented in the previous [training section](../basic-workflow/training.md). This
struct enables you to configure the training loop, offering support for registering metrics,
enabling logging, checkpointing states, using multiple devices, and so on.

There are still some assumptions in the current provided APIs, which may make them inappropriate for
your learning requirements. Indeed, they assume your model will learn from a training dataset and be
Expand Down
6 changes: 3 additions & 3 deletions crates/burn-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ version.workspace = true

[features]
default = ["std"]
std = ["rand/std"]
std = ["rand/std", "data-encoding/std"]
doc = ["default"]
wasm-sync = []
network = ["dep:indicatif", "dep:reqwest", "dep:tokio"]
Expand All @@ -27,10 +27,10 @@ web-time = { version = "1.1.0" }
# ** Please make sure all dependencies support no_std when std is disabled **

rand = { workspace = true }
spin = { workspace = true } # using in place of use std::sync::Mutex;
uuid = { workspace = true }
spin = { workspace = true } # using in place of use std::sync::Mutex;
derive-new = { workspace = true }
serde = { workspace = true }
data-encoding = { workspace = true }

# Network downloader
indicatif = { workspace = true, optional = true }
Expand Down
17 changes: 10 additions & 7 deletions crates/burn-common/src/id.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
use alloc::string::String;

use crate::rand::gen_random;
use alloc::string::{String, ToString};
use uuid::{Builder, Bytes};

use data_encoding::BASE32_DNSSEC;

/// Simple ID generator.
pub struct IdGenerator {}

impl IdGenerator {
/// Generates a new ID in the form of a UUID.
/// Generates a new ID.
pub fn generate() -> String {
let random_bytes: Bytes = gen_random();

let uuid = Builder::from_random_bytes(random_bytes).into_uuid();
// Generate 6 random bytes (281,474,976,710,656 combinations)
let random_bytes: [u8; 6] = gen_random();

uuid.as_hyphenated().to_string()
// Encode the random bytes in base32 DNSSEC
// 6 bytes encodes to 10 lower case characters, e.g. "3uu5e6vv7c"
BASE32_DNSSEC.encode(&random_bytes)
}
}

Expand Down
Loading

0 comments on commit 9bf3b30

Please sign in to comment.