[llvm] [offload] add support for aligned allocations (PR #203353)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 08:27:13 PDT 2026
================
@@ -600,20 +615,44 @@ struct CUDADeviceTy : public GenericDeviceTy {
switch (Kind) {
case TARGET_ALLOC_DEFAULT:
case TARGET_ALLOC_DEVICE:
+ if (Alignment > 0 && Alignment > Granularity) {
+ return Plugin::error(
+ ErrorCode::UNSUPPORTED,
+ "too large alignment size for the device allocation");
+ }
+
----------------
EuphoricThinking wrote:
We can, so it's done. Outside the switch the error messages are less accurate, but I suppose that the user would know which type of the allocation they have requested.
https://github.com/llvm/llvm-project/pull/203353
More information about the llvm-commits
mailing list