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
Cette révision appartient à :
Jonathan Kim a créé et Jonathan Kim a révisé 2023-03-16 09:50:10 -04:00
1 Parent 83a307c449
révision fc8f3f9fd5
1 fichier modifié
+1 -1
+1 -1
Voir le fichier
@@ -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;
}