burn_dragon_train 0.4.0

Training utilities for burn_dragon
Documentation
1
2
3
4
5
6
use std::sync::{Mutex, OnceLock};

pub(crate) fn device_allocation_lock() -> &'static Mutex<()> {
    static LOCK: OnceLock<Mutex<()>> = OnceLock::new();
    LOCK.get_or_init(|| Mutex::new(()))
}