[llvm] [libsycl] add USM alloc/free functions (PR #184111)

Sergey Semenov via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 09:57:34 PST 2026


================
@@ -25,6 +25,13 @@ bool DeviceImpl::has(aspect Aspect) const {
   case (aspect::emulated):
   case (aspect::host_debuggable):
     return false;
+  case (aspect::usm_device_allocations):
+  case (aspect::usm_host_allocations):
+  case (aspect::usm_shared_allocations):
+    // liboffload works with USM only and has no query to check support. We
+    // assume that USM is always supported otherwise lifoffload won't be able to
+    // work with device at all.
----------------
sergey-semenov wrote:

```suggestion
    // liboffload works with USM only and has no query to check support. We
    // assume that USM is always supported.
```
The last part seems redundant to me, but if you want to keep it:
```suggestion
    // liboffload works with USM only and has no query to check support. We
    // assume that USM is always supported, otherwise, liboffload won't be able
    // to work with the device at all.
```

https://github.com/llvm/llvm-project/pull/184111


More information about the llvm-commits mailing list