diff --git a/src/rocdecode/roc_decoder.cpp b/src/rocdecode/roc_decoder.cpp index 8bc85510a0..fd779db560 100644 --- a/src/rocdecode/roc_decoder.cpp +++ b/src/rocdecode/roc_decoder.cpp @@ -135,10 +135,6 @@ rocDecStatus RocDecoder::InitHIP(int device_id) { ERR("ERROR: didn't find any GPU!"); return ROCDEC_DEVICE_INVALID; } - if (device_id >= num_devices_) { - ERR("ERROR: the requested device_id is not found! "); - return ROCDEC_DEVICE_INVALID; - } CHECK_HIP(hipSetDevice(device_id)); CHECK_HIP(hipGetDeviceProperties(&hip_dev_prop_, device_id)); diff --git a/utils/rocvideodecode/roc_video_dec.cpp b/utils/rocvideodecode/roc_video_dec.cpp index 7c34025cca..066fd7e194 100644 --- a/utils/rocvideodecode/roc_video_dec.cpp +++ b/utils/rocvideodecode/roc_video_dec.cpp @@ -1073,10 +1073,6 @@ bool RocVideoDecoder::InitHIP(int device_id) { std::cerr << "ERROR: didn't find any GPU!" << std::endl; return false; } - if (device_id >= num_devices_) { - std::cerr << "ERROR: the requested device_id is not found! " << std::endl; - return false; - } HIP_API_CALL(hipSetDevice(device_id)); HIP_API_CALL(hipGetDeviceProperties(&hip_dev_prop_, device_id)); HIP_API_CALL(hipStreamCreate(&hip_stream_));