Skip to content

Commit 0975828

Browse files
wip
1 parent df3ea17 commit 0975828

File tree

5 files changed

+10
-33
lines changed

5 files changed

+10
-33
lines changed

Cargo.lock

-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+4-7
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,12 @@ nvml-wrapper = "0.10.0"
143143
sysinfo = "0.30.13"
144144
systemstat = "0.2.3"
145145

146-
portable-atomic = {version = "1.3.3", features = ["critical-section"]}
147-
portable-atomic-util = {version = "0.1.3", features = ["alloc"]} # alloc is for no_std
148-
149146
### For the main burn branch. ###
150-
cubecl = { git = "https://github.com/tracel-ai/cubecl", default-features = false, rev = "dd274b6515f853ab1c82db410d6fc7697060f69e" }
151-
cubecl-common = { git = "https://github.com/tracel-ai/cubecl", default-features = false, rev = "dd274b6515f853ab1c82db410d6fc7697060f69e" }
147+
# cubecl = { git = "https://github.com/tracel-ai/cubecl", default-features = false, rev = "dd274b6515f853ab1c82db410d6fc7697060f69e" }
148+
# cubecl-common = { git = "https://github.com/tracel-ai/cubecl", default-features = false, rev = "dd274b6515f853ab1c82db410d6fc7697060f69e" }
152149
### For local development. ###
153-
# cubecl = { path = "../cubecl/crates/cubecl" }
154-
# cubecl-common = { path = "../cubecl/crates/cubecl-common" }
150+
cubecl = { path = "../cubecl/crates/cubecl", default-features = false, features=["portable-atomic-critical-section"] }
151+
cubecl-common = { path = "../cubecl/crates/cubecl-common", default-features = false }
155152

156153
[profile.dev]
157154
debug = 0 # Speed up compilation time and not necessary.

crates/burn-core/Cargo.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ rand = { workspace = true, features = ["std_rng"] } # Default enables std
120120

121121
# Using in place of use std::sync::Mutex when std is disabled
122122
spin = { workspace = true, features = ["mutex", "spin_mutex", "portable_atomic"] }
123-
portable-atomic = {version = "1.3.3"}
124-
portable-atomic-util = {version = "0.1.3", features = ["alloc"]}
125123

126124
# The same implementation of HashMap in std but with no_std support (only alloc crate is needed)
127125
hashbrown = { workspace = true, features = ["serde"] } # no_std compatible
@@ -138,6 +136,10 @@ thiserror = { workspace = true, optional = true }
138136
regex = { workspace = true, optional = true }
139137
num-traits = { workspace = true }
140138

139+
[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies]
140+
portable-atomic = { version = "1.6.0" }
141+
portable-atomic-util = { version = "0.2.0", features = [ "alloc" ] }
142+
141143
[dev-dependencies]
142144
tempfile = { workspace = true }
143145
burn-dataset = { path = "../burn-dataset", version = "0.14.0", features = [

crates/burn-core/build.rs

-14
This file was deleted.

crates/burn-core/src/module/param/running.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use crate::module::{
66

77
use alloc::string::ToString;
88

9-
#[cfg(not(use_portable_atomics))]
9+
#[cfg(target_has_atomic = "ptr")]
1010
use alloc::sync::Arc;
1111

12-
#[cfg(use_portable_atomics)]
12+
#[cfg(not(target_has_atomic = "ptr"))]
1313
use portable_atomic_util::Arc;
1414

1515
use alloc::vec::Vec;

0 commit comments

Comments
 (0)