[llvm] [libsycl] SYCL Extension naming policy. (PR #226967)

Greg Lueck via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 06:46:32 PDT 2026


================
@@ -31,3 +31,90 @@ Coding Standards.
   files in directories `cmake/modules` and `docs` should be named in camel
   case.
 
+### Extension Naming Policy
+
+The SYCL 2020 specification gives every vendor extension a vendor string. The
+extension's APIs are declared in the `sycl::ext::<vendor>` namespace, its
+feature-test macro is `SYCL_EXT_<VENDOR>_<NAME>`, and any enumerators or members
+it adds to core SYCL classes (for example aspects) are prefixed with
+`ext_<vendor>_`.
+
+The vendor string tells users who defines the behavior of the feature. libsycl
+picks it by that rule, not by who wrote the implementation.
+
+| Origin of the extension                                       | Vendor string                                  |
+| ------------------------------------------------------------- | ---------------------------------------------- |
+| Not defined by any vendor: designed in the LLVM community     | `llvm`                                         |
+| Defined by another vendor and implemented as specified        | The original one (e.g. `oneapi`, `intel`)      |
+| Defined by another vendor, but libsycl intentionally deviates | `llvm`, only after the deviation is justified  |
----------------
gmlueck wrote:

Looks good!  I don't seem to have permission to click "Approve", but I like the current wording.

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


More information about the llvm-commits mailing list