File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1089,19 +1089,20 @@ _pi_queue::getZeCopyCommandQueue(int *CopyQueueIndex,
1089
1089
int n = ZeCopyCommandQueues.size ();
1090
1090
int LowerCopyQueueIndex = getRangeOfAllowedCopyEngines.first ;
1091
1091
int UpperCopyQueueIndex = getRangeOfAllowedCopyEngines.second ;
1092
- LowerCopyQueueIndex =
1093
- (LowerCopyQueueIndex == -1 ) ? -1 : std::max (0 , LowerCopyQueueIndex);
1094
- UpperCopyQueueIndex = std::min (UpperCopyQueueIndex, n - 1 );
1095
1092
1096
1093
// Return nullptr when no copy command queues are allowed to be used or if
1097
1094
// no copy command queues are available.
1098
- if ((LowerCopyQueueIndex > UpperCopyQueueIndex) || (n == 0 )) {
1095
+ if ((LowerCopyQueueIndex == -1 ) || (UpperCopyQueueIndex == -1 ) ||
1096
+ (LowerCopyQueueIndex > UpperCopyQueueIndex) || (n == 0 )) {
1099
1097
if (CopyQueueGroupIndex)
1100
1098
*CopyQueueGroupIndex = -1 ;
1101
1099
*CopyQueueIndex = -1 ;
1102
1100
return nullptr ;
1103
1101
}
1104
1102
1103
+ LowerCopyQueueIndex = std::max (0 , LowerCopyQueueIndex);
1104
+ UpperCopyQueueIndex = std::min (UpperCopyQueueIndex, n - 1 );
1105
+
1105
1106
// If there is only one copy queue, it is the main copy queue, which is the
1106
1107
// first, and only entry in ZeCopyCommandQueues.
1107
1108
if (n == 1 ) {
You can’t perform that action at this time.
0 commit comments