burn_dragon_core 0.4.0

burn dragon core model and utilities
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(()))
}