pub struct DryRun { /* private fields */ }Expand description
Makes every launch a dry run for as long as it lives, on every thread and every device.
Overlapping guards compose, so a pass that opens one while another is still open leaves the mode on until the last of them drops.
The flag is read on the thread issuing a launch, with relaxed ordering, so a launch another thread had already begun issuing may still execute. What is guaranteed is the launches issued by the thread that opened the guard, and every launch issued after other threads observe it.
This is the only way in: there is deliberately no configuration file or environment variable for it. A dry run left on by accident turns the rest of the process into launches that quietly do nothing and read back uninitialized memory, so its lifetime belongs to a scope in the code that wants it, not to an ambient default nothing in the process can see.
let _dry_run = cubecl_runtime::dry_run::DryRun::new();
warm_up();Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DryRun
impl RefUnwindSafe for DryRun
impl Send for DryRun
impl Sync for DryRun
impl Unpin for DryRun
impl UnsafeUnpin for DryRun
impl UnwindSafe for DryRun
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more