Skip to content

Commit 599a9e3

Browse files
[UR] Fixed bug with zero depth ur_rect_region which must be checked before calling func (#17681)
Its PR migrated from oneapi-src/unified-runtime#2746 It looks like a common typo when writing functions. Fixed functions: - urEnqueueMemBufferWriteRect() - urEnqueueMemBufferReadRect() Co-authored-by: Nicolas Miller <[email protected]>
1 parent 018679f commit 599a9e3

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

unified-runtime/include/ur_api.h

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unified-runtime/scripts/core/enqueue.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ returns:
328328
- "An event in `phEventWaitList` has $X_EVENT_STATUS_ERROR."
329329
- $X_RESULT_ERROR_INVALID_MEM_OBJECT
330330
- $X_RESULT_ERROR_INVALID_SIZE:
331-
- "`region.width == 0 || region.height == 0 || region.width == 0`"
331+
- "`region.width == 0 || region.height == 0 || region.depth == 0`"
332332
- "`bufferRowPitch != 0 && bufferRowPitch < region.width`"
333333
- "`hostRowPitch != 0 && hostRowPitch < region.width`"
334334
- "`bufferSlicePitch != 0 && bufferSlicePitch < region.height * (bufferRowPitch != 0 ? bufferRowPitch : region.width)`"
@@ -406,7 +406,7 @@ returns:
406406
- "An event in `phEventWaitList` has $X_EVENT_STATUS_ERROR."
407407
- $X_RESULT_ERROR_INVALID_MEM_OBJECT
408408
- $X_RESULT_ERROR_INVALID_SIZE:
409-
- "`region.width == 0 || region.height == 0 || region.width == 0`"
409+
- "`region.width == 0 || region.height == 0 || region.depth == 0`"
410410
- "`bufferRowPitch != 0 && bufferRowPitch < region.width`"
411411
- "`hostRowPitch != 0 && hostRowPitch < region.width`"
412412
- "`bufferSlicePitch != 0 && bufferSlicePitch < region.height * (bufferRowPitch != 0 ? bufferRowPitch : region.width)`"

unified-runtime/source/loader/layers/validation/ur_valddi.cpp

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unified-runtime/source/loader/ur_libapi.cpp

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unified-runtime/source/ur_api.cpp

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unified-runtime/test/conformance/enqueue/urEnqueueMemBufferCopyRect.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ TEST_P(urEnqueueMemBufferCopyRectTest, InvalidNullPtrEventWaitList) {
240240
TEST_P(urEnqueueMemBufferCopyRectTest, InvalidSize) {
241241
UUR_KNOWN_FAILURE_ON(uur::NativeCPU{});
242242

243-
// region.width == 0 || region.height == 0 || region.width == 0
243+
// region.width == 0 || region.height == 0 || region.depth == 0
244244
src_region.width = 0;
245245
ASSERT_EQ_RESULT(urEnqueueMemBufferCopyRect(
246246
queue, src_buffer, dst_buffer, src_origin, dst_origin,

unified-runtime/test/conformance/enqueue/urEnqueueMemBufferReadRect.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ TEST_P(urEnqueueMemBufferReadRectTest, InvalidSize) {
197197

198198
std::vector<uint32_t> dst(count);
199199

200-
// region.width == 0 || region.height == 0 || region.width == 0
200+
// region.width == 0 || region.height == 0 || region.depth == 0
201201
region.width = 0;
202202
ASSERT_EQ_RESULT(urEnqueueMemBufferReadRect(
203203
queue, buffer, true, buffer_offset, host_offset, region,

unified-runtime/test/conformance/enqueue/urEnqueueMemBufferWriteRect.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ TEST_P(urEnqueueMemBufferWriteRectTest, InvalidSize) {
210210
std::vector<uint32_t> src(count);
211211
std::fill(src.begin(), src.end(), 1);
212212

213-
// region.width == 0 || region.height == 0 || region.width == 0
213+
// region.width == 0 || region.height == 0 || region.depth == 0
214214
region.width = 0;
215215
ASSERT_EQ_RESULT(urEnqueueMemBufferWriteRect(
216216
queue, buffer, true, buffer_offset, host_offset, region,

0 commit comments

Comments
 (0)