Skip to content

Commit 6a94375

Browse files
authored
Update usm.cpp
1 parent 500e693 commit 6a94375

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/adapters/level_zero/usm.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urUSMHostAlloc(
308308
uint32_t Align = USMDesc ? USMDesc->align : 0;
309309
// L0 supports alignment up to 64KB and silently ignores higher values.
310310
// We flag alignment > 64KB as an invalid value.
311+
// L0 spec says that alignment values that are not powers of 2 are invalid.
311312
if (Align > 65536 || Align & (Align - 1) != 0)
312313
return UR_RESULT_ERROR_INVALID_VALUE;
313314

0 commit comments

Comments
 (0)