espnet2.asr.transducer.rnnt_multi_blank.utils.rnnt_helper.maximum
Less than 1 minute
espnet2.asr.transducer.rnnt_multi_blank.utils.rnnt_helper.maximum
espnet2.asr.transducer.rnnt_multi_blank.utils.rnnt_helper.maximum(x, y)
Computes the element-wise maximum of two input values.
This function takes two input values and returns the greater of the two. It is a device function intended to be used within CUDA kernels, enabling efficient computation on GPU hardware.
- Parameters:
- x (float) – The first input value.
- y (float) – The second input value.
- Returns: The maximum value between x and y.
- Return type: float
Examples
>>> from espnet2.asr.transducer.rnnt_multi_blank.utils.rnnt_helper import maximum
>>> result = maximum(3.0, 5.0)
>>> print(result)
5.0
>>> result = maximum(-1.0, 0.0)
>>> print(result)
0.0
NOTE
This function is decorated with @cuda.jit(device=True) to indicate that it can be called from other CUDA device functions.