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

Dmitry Rogozhkin via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 07:55:10 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  |
+| Ratified by Khronos                                           | `khr`                                          |
----------------
dvrogozh wrote:

I agree that the line in the table needs to be dropped. As for the "Khronos Extensions" section, I feel it will be read as ad-hoc addition to the document. I would consider to pull it up and probably rewording introduction to highlight existence of khronos and vendor extensions upfront, then talk about KHR extensions in particular and then about vendor extensions.

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


More information about the llvm-commits mailing list