function
get_accum_type
get_accum_type[type: DType]() -> DType
Returns the recommended type for accumulation operations.
Half precision types can introduce numerical error if they are used in reduction/accumulation operations. This method returns a higher precision type to use for accumulation if a half precision types is provided, otherwise it returns the original type.
Parameters:
- type (
DType
): The type of some accumulation operation.
Returns:
DType.float32 if type is a half-precision float, type otherwise.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
If you'd like to share more information, please report an issue on GitHub
😔 What went wrong?