Trait coaster_nn::frameworks::cuda::ICudnnDesc
source · pub trait ICudnnDesc<T> {
// Required methods
fn cudnn_tensor_desc(&self) -> Result<TensorDescriptor, PluginError>;
fn cudnn_tensor_desc_softmax(&self) -> Result<TensorDescriptor, PluginError>;
fn cudnn_tensor_desc_flat(&self) -> Result<TensorDescriptor, PluginError>;
fn cudnn_filter_desc(&self) -> Result<FilterDescriptor, PluginError>;
fn cudnn_convolution_desc(
&self,
filter: &SharedTensor<T>
) -> Result<ConvolutionDescriptor, PluginError>;
fn cudnn_rnn_desc(
&self,
cudnn_framework: &Cudnn,
hidden_size: i32,
num_layers: i32,
dropout_desc: DropoutConfig,
input_mode: cudnnRNNInputMode_t,
direction: cudnnDirectionMode_t,
mode: cudnnRNNMode_t,
algorithm: cudnnRNNAlgo_t,
padding_mode: cudnnRNNPaddingMode_t
) -> Result<RnnDescriptor, PluginError>;
}
Required Methods§
fn cudnn_tensor_desc(&self) -> Result<TensorDescriptor, PluginError>
sourcefn cudnn_tensor_desc_softmax(&self) -> Result<TensorDescriptor, PluginError>
fn cudnn_tensor_desc_softmax(&self) -> Result<TensorDescriptor, PluginError>
Creates a TensorDescriptor similar to cudnn_tensor_desc
,
but will create a fitting 4D tensor if the actual tensor would be 1D-3D.
sourcefn cudnn_tensor_desc_flat(&self) -> Result<TensorDescriptor, PluginError>
fn cudnn_tensor_desc_flat(&self) -> Result<TensorDescriptor, PluginError>
Creates a TensorDescriptor similar to cudnn_tensor_desc
,
but will create a fitting 3D tensor if the actual tensor would be 1D/2D.
This should be used in operations where the shape doesn’t really matter e.g. activation like ReLU.