How to interpret NV_ENC_ERR_INVALID_DEVICE error on encoding?

Hello!
Sometimes I get the NV_ENC_ERR_INVALID_DEVICE on nvEncEncodePicture API function. But the description “This indicates that device passed to the API call is invalid.” doesn’t tell me too much about the error.
What could be a possible reason of getting is? Is it the same as DXGI “GPU device removed” error meaning that the device becomes unavailable somewhere along the way?