Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL] Return nullptr when allocation size is zero in usm allocator (#…
…12765) Currently, usm allocator throws when the allocation size is zero. However, this behavior is not aligned with that of std::allocator. Refer KhronosGroup/SYCL-Docs#355 for discussion regarding this. The spec says that the allocation functions must succeed when the size is zero. The value returned in this case is unspecified (it can either be a NULL pointer or a non-NULL pointer) This PR makes USM allocator return a null pointer when the allocation size is zero.
- Loading branch information