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
此提交包含在:
Jonathan Kim
2023-03-15 10:52:16 -04:00
提交者 Jonathan Kim
父節點 83a307c449
當前提交 fc8f3f9fd5
+1 -1
查看文件
@@ -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;
}