Skip to content

Commit 1244582

Browse files
committed
add assert.
Signed-off-by: rbegam <[email protected]>
1 parent c30c840 commit 1244582

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,6 +2071,7 @@ pi_result piMemBufferCreate(pi_context Context, pi_mem_flags Flags, size_t Size,
20712071
}
20722072
PI_ASSERT(Context, PI_INVALID_CONTEXT);
20732073
PI_ASSERT(RetMem, PI_INVALID_VALUE);
2074+
PI_ASSERT(HostPtr && PI_MEM_FLAGS_HOST_PTR_ALLOC, PI_INVALID_VALUE);
20742075

20752076
if (properties != nullptr) {
20762077
die("piMemBufferCreate: no mem properties goes to Level-Zero RT yet");
@@ -2132,8 +2133,6 @@ pi_result piMemBufferCreate(pi_context Context, pi_mem_flags Flags, size_t Size,
21322133
HostPtr, Size, nullptr, 0,
21332134
nullptr));
21342135
}
2135-
} else if ((Flags & PI_MEM_FLAGS_HOST_PTR_ALLOC) != 0) {
2136-
// Nothing more to do.
21372136
} else if (Flags == 0 || (Flags == PI_MEM_FLAGS_ACCESS_RW)) {
21382137
// Nothing more to do.
21392138
} else {

0 commit comments

Comments
 (0)