Skip to content

Commit 1c3f01b

Browse files
committed
Clarify behavior of unsupported properties
1 parent 5f85662 commit 1c3f01b

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler.asciidoc

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ _Throws:_
228228

229229
* An `exception` with the `errc::invalid` error code if the source language
230230
`lang` is not supported by any device contained by the context `ctxt`.
231+
* An `exception` with the `errc::invalid` error code if the source language
232+
`lang` does not support one of the properties in `PropertyListT`.
231233
* Overload (1) throws an `exception` with the `errc::invalid` error code if the
232234
source language `lang` is binary format.
233235
* Overload (2) throws an `exception` with the `errc::invalid` error code if the
@@ -296,8 +298,10 @@ _Throws:_
296298
`devs` does not support compilation of kernels in the source language of
297299
`sourceBundle`.
298300

299-
* An `exception` with the `errc::invalid` error code if `props` contains an
300-
`options` property that specifies an invalid option.
301+
* An `exception` with the `errc::invalid` error code if the source language
302+
`lang` does not support one of the properties in `PropertyListT` or if
303+
`props` contains a `build_options` property that contains an option that is
304+
not supported by `lang`.
301305

302306
* An `exception` with the `errc::build` error code if the compilation or
303307
linking operations fail.
@@ -419,10 +423,8 @@ struct is_property_key<build_options_key> : std::true_type {};
419423

420424
This property provides build options that may affect the compilation or linking
421425
of the kernel, where each build option is a string.
422-
There are no standard build options that are common across all source
423-
languages.
424-
Instead, each source language specification defines its own set of build
425-
options.
426+
All source languages support the `build_options` property, but each source
427+
language defines the specific options that it supports.
426428
The `source_language::sycl` language does not define any standard build
427429
options, but an implementation may support implementation-defined options.
428430

@@ -466,8 +468,8 @@ provides a description of the error.
466468
Instead, the `save_log` property provides information about a build operation
467469
that succeeds.
468470
This might include warning messages or other diagnostics.
469-
Each source language specification can define specific information that is
470-
provided in the log.
471+
All source languages support the `save_log` property, but each source language
472+
defines the specific information that is provided in the log.
471473
The `source_language::sycl` language does not define any specific information
472474
that is provided in the log, so implementations are free to provide any
473475
information they choose here.

sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler_opencl.asciidoc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,15 @@ As a result, the application must use the overload of
114114
`create_kernel_bundle_from_source` taking `std::string` when creating a kernel
115115
bundle from this language.
116116

117-
=== Build options
117+
=== Supported properties
118118

119-
The `build_options` property accepts any of the compiler or linker options
120-
defined by the OpenCL specification, except for those that are specific to
121-
creating an OpenCL library.
119+
The `opencl` language supports only those properties from
120+
link:../experimental/sycl_ext_oneapi_kernel_compiler.asciidoc[
121+
sycl_ext_oneapi_kernel_compiler] that are common to all source languages.
122+
123+
The `build_options` property that is passed to the `build` function may contain
124+
any of the compiler or linker options defined by the OpenCL specification,
125+
except for those that are specific to creating an OpenCL library.
122126
The kernel compiler can be used to create an OpenCL program, but not an OpenCL
123127
library.
124128

sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler_spirv.asciidoc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,15 @@ As a result, the application must use the overload of
121121
`create_kernel_bundle_from_source` taking `std::vector<std::byte>` when
122122
creating a kernel bundle from this language.
123123

124-
=== Build options
124+
=== Supported properties
125+
126+
The `spirv` language supports only those properties from
127+
link:../experimental/sycl_ext_oneapi_kernel_compiler.asciidoc[
128+
sycl_ext_oneapi_kernel_compiler] that are common to all source languages.
125129

126130
This extension does not specify any options that may be passed via the
127-
`build_options` property, however an implementation may allow
128-
implementation-defined options to be passed this way.
131+
`build_options` property to the `build` function, however an implementation may
132+
allow implementation-defined options to be passed this way.
129133

130134
=== SPIR-V execution environment
131135

0 commit comments

Comments
 (0)