espnet2.asr.transducer.rnnt_multi_blank.utils.cuda_utils.reduce.R_Op
espnet2.asr.transducer.rnnt_multi_blank.utils.cuda_utils.reduce.R_Op
class espnet2.asr.transducer.rnnt_multi_blank.utils.cuda_utils.reduce.R_Op(value)
Bases: Enum
Represents a reduction operation performed on the input tensor.
This enumeration defines the types of reduction operations that can be performed during the CUDA kernel execution. The available operations are as follows:
ADD
Represents the addition operation for reduction.
MAXIMUM
Represents the maximum operation for reduction.
Examples
To use the R_Op enum for reduction in a CUDA kernel:
``
`
python reduction_operation = R_Op.ADD if reduction_operation == R_Op.ADD:
Perform addition reduction
elif reduction_operation == R_Op.MAXIMUM: : # Perform maximum reduction
``
`
NOTE
This enum is typically used in conjunction with the CTAReduce and other reduction functions to specify the desired reduction behavior.
ADD
MAXIMUM