code: def nvmlDeviceSetEccMode(handle, mode):
      r
      fn = _nvmlGetFunctionPointer("nvmlDeviceSetEccMode")
      ret = fn(handle, _nvmlEnableState_t(mode))
      _nvmlCheckReturn(ret)
      return None
docs: r"""
      /**
       * Set the ECC mode for the device.
       *
       * For Kepler &tm; or newer fully supported devices.
       * Only applicable to devices with ECC.
       * Requires \a NVML_INFOROM_ECC version 1.0 or higher.
       * Requires root/admin permissions.
       *
       * The ECC mode determines whether the GPU enables its ECC support.
       *
       * This operation takes effect after the next reboot.
       *
       * See \ref nvmlEnableState_t for details on available modes.
       *
       * @param device                               The identifier of the target device
       * @param ecc                                  The target ECC mode
       *
       * @return
       *         - \ref NVML_SUCCESS                 if the ECC mode was set
       *         - \ref NVML_ERROR_UNINITIALIZED     if the library has not been successfully initialized
       *         - \ref NVML_ERROR_INVALID_ARGUMENT  if \a device is invalid or \a ecc is invalid
       *         - \ref NVML_ERROR_NOT_SUPPORTED     if the device does not support this feature
       *         - \ref NVML_ERROR_NO_PERMISSION     if the user doesn't have permission to perform this operation
       *         - \ref NVML_ERROR_GPU_IS_LOST       if the target GPU has fallen off the bus or is otherwise inaccessible
       *         - \ref NVML_ERROR_UNKNOWN           on any unexpected error
       *
       * @see nvmlDeviceGetEccMode()
       */
      nvmlReturn_t DECLDIR nvmlDeviceSetEccMode