Skip to content

Commit

Permalink
Update usm.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
lbushi25 authored May 1, 2024
1 parent 500e693 commit 6a94375
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/adapters/level_zero/usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urUSMHostAlloc(
uint32_t Align = USMDesc ? USMDesc->align : 0;
// L0 supports alignment up to 64KB and silently ignores higher values.
// We flag alignment > 64KB as an invalid value.
// L0 spec says that alignment values that are not powers of 2 are invalid.
if (Align > 65536 || Align & (Align - 1) != 0)
return UR_RESULT_ERROR_INVALID_VALUE;

Expand Down

0 comments on commit 6a94375

Please sign in to comment.