pub fn autocast<T, F>(enabled: bool, f: F) -> Twhere F: FnOnce() -> T,
Runs a closure in mixed precision.