pub use cubecl_runtime::memory_management::*;
pub(crate) mod memory_pool;
mod error_graph;
mod taint;
#[cfg(multi_threading)]
pub mod drop_queue;
pub use error_graph::*;
pub use taint::*;
mod dynamic;
pub(crate) use dynamic::*;
mod memory_manage;
pub use memory_manage::*;
pub mod relocation;
pub(crate) fn release_or_leak<T>(memory: T, err: &crate::server::ServerError) {
if err.is_device_poisoned() {
core::mem::drop(memory);
} else {
core::mem::forget(memory);
log::error!("leaking memory the device may still be using, after a failed wait: {err}");
}
}