Skip to content

Commit daa3ee1

Browse files
committed
Remove the power of 2 pattern size requirement from USMFill
All adapters have sufficiently robust workarounds that this is no longer necessary, and the sycl runtime is now using USMFill in such a way that if we enable the validation layer this case will get hit and break stuff.
1 parent 9d3bce6 commit daa3ee1

File tree

5 files changed

+0
-8
lines changed

5 files changed

+0
-8
lines changed

include/ur_api.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6894,7 +6894,6 @@ urEnqueueMemUnmap(
68946894
/// - ::UR_RESULT_ERROR_INVALID_SIZE
68956895
/// + `patternSize == 0 || size == 0`
68966896
/// + `patternSize > size`
6897-
/// + `(patternSize & (patternSize - 1)) != 0`
68986897
/// + `size % patternSize != 0`
68996898
/// + If `size` is higher than the allocation size of `ptr`
69006899
/// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST

scripts/core/enqueue.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,6 @@ returns:
10611061
- $X_RESULT_ERROR_INVALID_SIZE:
10621062
- "`patternSize == 0 || size == 0`"
10631063
- "`patternSize > size`"
1064-
- "`(patternSize & (patternSize - 1)) != 0`"
10651064
- "`size % patternSize != 0`"
10661065
- "If `size` is higher than the allocation size of `ptr`"
10671066
- $X_RESULT_ERROR_INVALID_EVENT_WAIT_LIST:

source/loader/layers/validation/ur_valddi.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5979,10 +5979,6 @@ __urdlllocal ur_result_t UR_APICALL urEnqueueUSMFill(
59795979
return UR_RESULT_ERROR_INVALID_SIZE;
59805980
}
59815981

5982-
if ((patternSize & (patternSize - 1)) != 0) {
5983-
return UR_RESULT_ERROR_INVALID_SIZE;
5984-
}
5985-
59865982
if (size % patternSize != 0) {
59875983
return UR_RESULT_ERROR_INVALID_SIZE;
59885984
}

source/loader/ur_libapi.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5887,7 +5887,6 @@ ur_result_t UR_APICALL urEnqueueMemUnmap(
58875887
/// - ::UR_RESULT_ERROR_INVALID_SIZE
58885888
/// + `patternSize == 0 || size == 0`
58895889
/// + `patternSize > size`
5890-
/// + `(patternSize & (patternSize - 1)) != 0`
58915890
/// + `size % patternSize != 0`
58925891
/// + If `size` is higher than the allocation size of `ptr`
58935892
/// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST

source/ur_api.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5023,7 +5023,6 @@ ur_result_t UR_APICALL urEnqueueMemUnmap(
50235023
/// - ::UR_RESULT_ERROR_INVALID_SIZE
50245024
/// + `patternSize == 0 || size == 0`
50255025
/// + `patternSize > size`
5026-
/// + `(patternSize & (patternSize - 1)) != 0`
50275026
/// + `size % patternSize != 0`
50285027
/// + If `size` is higher than the allocation size of `ptr`
50295028
/// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST

0 commit comments

Comments
 (0)