Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the power of 2 pattern size requirement from USMFill #1845

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -6894,7 +6894,6 @@ urEnqueueMemUnmap(
/// - ::UR_RESULT_ERROR_INVALID_SIZE
/// + `patternSize == 0 || size == 0`
/// + `patternSize > size`
/// + `(patternSize & (patternSize - 1)) != 0`
/// + `size % patternSize != 0`
/// + If `size` is higher than the allocation size of `ptr`
/// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST
Expand Down Expand Up @@ -8388,7 +8387,6 @@ urCommandBufferAppendUSMMemcpyExp(
/// - ::UR_RESULT_ERROR_INVALID_SIZE
/// + `patternSize == 0 || size == 0`
/// + `patternSize > size`
/// + `(patternSize & (patternSize - 1)) != 0`
/// + `size % patternSize != 0`
/// + If `size` is higher than the allocation size of `ptr`
/// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT
Expand Down
1 change: 0 additions & 1 deletion scripts/core/enqueue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,6 @@ returns:
- $X_RESULT_ERROR_INVALID_SIZE:
- "`patternSize == 0 || size == 0`"
- "`patternSize > size`"
- "`(patternSize & (patternSize - 1)) != 0`"
EwanC marked this conversation as resolved.
Show resolved Hide resolved
- "`size % patternSize != 0`"
- "If `size` is higher than the allocation size of `ptr`"
- $X_RESULT_ERROR_INVALID_EVENT_WAIT_LIST:
Expand Down
1 change: 0 additions & 1 deletion scripts/core/exp-command-buffer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ returns:
- $X_RESULT_ERROR_INVALID_SIZE:
- "`patternSize == 0 || size == 0`"
- "`patternSize > size`"
- "`(patternSize & (patternSize - 1)) != 0`"
- "`size % patternSize != 0`"
- "If `size` is higher than the allocation size of `ptr`"
- $X_RESULT_ERROR_INVALID_MEM_OBJECT
Expand Down
8 changes: 0 additions & 8 deletions source/loader/layers/validation/ur_valddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5979,10 +5979,6 @@ __urdlllocal ur_result_t UR_APICALL urEnqueueUSMFill(
return UR_RESULT_ERROR_INVALID_SIZE;
}

if ((patternSize & (patternSize - 1)) != 0) {
return UR_RESULT_ERROR_INVALID_SIZE;
}

if (size % patternSize != 0) {
return UR_RESULT_ERROR_INVALID_SIZE;
}
Expand Down Expand Up @@ -8089,10 +8085,6 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferAppendUSMFillExp(
return UR_RESULT_ERROR_INVALID_SIZE;
}

if ((patternSize & (patternSize - 1)) != 0) {
return UR_RESULT_ERROR_INVALID_SIZE;
}

if (size % patternSize != 0) {
return UR_RESULT_ERROR_INVALID_SIZE;
}
Expand Down
2 changes: 0 additions & 2 deletions source/loader/ur_libapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5887,7 +5887,6 @@ ur_result_t UR_APICALL urEnqueueMemUnmap(
/// - ::UR_RESULT_ERROR_INVALID_SIZE
/// + `patternSize == 0 || size == 0`
/// + `patternSize > size`
/// + `(patternSize & (patternSize - 1)) != 0`
/// + `size % patternSize != 0`
/// + If `size` is higher than the allocation size of `ptr`
/// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST
Expand Down Expand Up @@ -7540,7 +7539,6 @@ ur_result_t UR_APICALL urCommandBufferAppendUSMMemcpyExp(
/// - ::UR_RESULT_ERROR_INVALID_SIZE
/// + `patternSize == 0 || size == 0`
/// + `patternSize > size`
/// + `(patternSize & (patternSize - 1)) != 0`
/// + `size % patternSize != 0`
/// + If `size` is higher than the allocation size of `ptr`
/// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT
Expand Down
2 changes: 0 additions & 2 deletions source/ur_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5023,7 +5023,6 @@ ur_result_t UR_APICALL urEnqueueMemUnmap(
/// - ::UR_RESULT_ERROR_INVALID_SIZE
/// + `patternSize == 0 || size == 0`
/// + `patternSize > size`
/// + `(patternSize & (patternSize - 1)) != 0`
/// + `size % patternSize != 0`
/// + If `size` is higher than the allocation size of `ptr`
/// - ::UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST
Expand Down Expand Up @@ -6404,7 +6403,6 @@ ur_result_t UR_APICALL urCommandBufferAppendUSMMemcpyExp(
/// - ::UR_RESULT_ERROR_INVALID_SIZE
/// + `patternSize == 0 || size == 0`
/// + `patternSize > size`
/// + `(patternSize & (patternSize - 1)) != 0`
/// + `size % patternSize != 0`
/// + If `size` is higher than the allocation size of `ptr`
/// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT
Expand Down