Skip to main content

cusolverDnSetFixedPointEmulationMantissaBitOffset

Function cusolverDnSetFixedPointEmulationMantissaBitOffset 

Source
pub unsafe extern "C" fn cusolverDnSetFixedPointEmulationMantissaBitOffset(
    handle: cusolverDnHandle_t,
    mantissaBitOffset: c_int,
) -> cusolverStatus_t
Expand description

This function sets the mantissa bit offset for fixed point FP64 emulation in case of dynamic mantissa control mode.

The mantissa bit offset, which is set by this API only has an effect, once one of the following math modes is enabled (see also cusolverMathMode_t):

And the following mantissa control is enabled (see also cusolverDnSetFixedPointEmulationMantissaControl):

  • CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC

You may tune values for mantissaBitOffset based on your accuracy and performance requirements, e.g., choose negative values -8, -16, … for better performance while fewer mantissa bits may reduce accuracy.

Please note that values of mantissaBitOffset which are unequal to zero require the mantissa control to be equal to CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC. Otherwise, the computational cuSOLVER routines will return cusolverStatus_t::CUSOLVER_STATUS_INVALID_VALUE, indicating an unsupported handle state.

§Parameters

  • handle: Handle to the cuSolverDN library context.
  • mantissaBitOffset: The mantissa bit offset (default = 0) to be used when the mantissa control is CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC.

§Return value