[llvm] [offload] add support for aligned allocations (PR #203353)

Alex Duran via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 00:46:23 PDT 2026


================
@@ -124,9 +124,9 @@ GenericKernelTy::getKernelLaunchEnvironment(
       KernelArgs.DynCGroupMem == 0)
     return reinterpret_cast<KernelLaunchEnvironmentTy *>(~0);
 
-  auto AllocOrErr = GenericDevice.dataAlloc(sizeof(KernelLaunchEnvironmentTy),
-                                            /*HostPtr=*/nullptr,
-                                            TargetAllocTy::TARGET_ALLOC_DEVICE);
+  auto AllocOrErr = GenericDevice.dataAlloc(
+      sizeof(KernelLaunchEnvironmentTy),
+      /*HostPtr=*/nullptr, TargetAllocTy::TARGET_ALLOC_DEVICE, 0);
----------------
adurang wrote:

Please add inline comments for constant args:

```suggestion
      /*HostPtr=*/nullptr, TargetAllocTy::TARGET_ALLOC_DEVICE, /*Alignment=*/0);
```

And the same for all the other similar cases.

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


More information about the llvm-commits mailing list