Fix Invalid Engine Offset Check

Engine offset that is the maximum number of engines is still valid
as offset enum 0 is occupied by blit copies so raise the limit by 1.

Change-Id: I6fcab106290e6647702efe297a4281861da4e0b8


[ROCm/ROCR-Runtime commit: fc8f3f9fd5]
This commit is contained in:
Jonathan Kim
2023-03-15 10:52:16 -04:00
committed by Jonathan Kim
parent 2bb7d9cfe8
commit ad1a3fc9c4
@@ -788,7 +788,7 @@ hsa_status_t GpuAgent::DmaCopyOnEngine(void* dst, core::Agent& dst_agent,
(dst_agent.device_type() == core::Agent::kAmdGpuDevice)) &&
("Both devices are CPU agents which is not expected"));
if (engine_offset >= properties_.NumSdmaEngines + properties_.NumSdmaXgmiEngines) {
if (engine_offset > properties_.NumSdmaEngines + properties_.NumSdmaXgmiEngines) {
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
}