pub enum Cuda {}
Expand description
Cuda related helper functions.
Implementations
sourceimpl Cuda
impl Cuda
sourcepub fn device_count() -> i64
pub fn device_count() -> i64
Returns the number of GPU that can be used.
sourcepub fn is_available() -> bool
pub fn is_available() -> bool
Returns true if cuda support is available.
sourcepub fn cudnn_is_available() -> bool
pub fn cudnn_is_available() -> bool
Returns true if cudnn support is available.
sourcepub fn user_enabled_cudnn() -> bool
pub fn user_enabled_cudnn() -> bool
Returns true if cudnn is enabled by the user.
This does not indicate whether cudnn is actually usable.
sourcepub fn set_user_enabled_cudnn(b: bool)
pub fn set_user_enabled_cudnn(b: bool)
Enable or disable cudnn.
sourcepub fn cudnn_set_benchmark(b: bool)
pub fn cudnn_set_benchmark(b: bool)
Sets cudnn benchmark mode.
When set cudnn will try to optimize the generators durning the first network runs and then use the optimized architecture in the following runs. This can result in significant performance improvements.
Auto Trait Implementations
impl RefUnwindSafe for Cuda
impl Send for Cuda
impl Sync for Cuda
impl Unpin for Cuda
impl UnwindSafe for Cuda
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more