Enum tch::Cuda

source ·
pub enum Cuda {}
Expand description

Cuda related helper functions.

Implementations

Returns the number of GPU that can be used.

Returns true if cuda support is available.

Returns true if cudnn support is available.

Returns true if cudnn is enabled by the user.

This does not indicate whether cudnn is actually usable.

Enable or disable cudnn.

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

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.