Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sycl/doc/EnvironmentVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ compiler and runtime.
| `SYCL_CACHE_MIN_DEVICE_IMAGE_SIZE` | Positive integer | Minimum size of device code image in bytes which is reasonable to cache on disk because disk access operation may take more time than do JIT compilation for it. Default value is 0 to cache all images. |
| `SYCL_CACHE_MAX_DEVICE_IMAGE_SIZE` | Positive integer | Maximum size of device image in bytes which is cached. Too big kernels may overload disk too fast. Default value is 1 GB. |
| `SYCL_ENABLE_DEFAULT_CONTEXTS` | '1' or '0' | Enable ('1') or disable ('0') creation of default platform contexts in SYCL runtime. The default context for each platform contains all devices in the platform. Refer to [Platform Default Contexts](extensions/supported/sycl_ext_oneapi_default_context.asciidoc) extension to learn more. Enabled by default on Linux and disabled on Windows. |
| `SYCL_RT_WARNING_LEVEL` | Positive integer | The higher warning level is used the more warnings and performance hints the runtime library may print. Default value is '0', which means no warning/hint messages from the runtime library are allowed. The value '1' enables performance warnings from device runtime/codegen. The values greater than 1 are reserved for future use. |
| `SYCL_USM_HOSTPTR_IMPORT` | Integer | Enable by specifying non-zero value. Buffers created with a host pointer will result in host data promotion to USM, improving data transfer performance. To use this feature, also set SYCL_HOST_UNIFIED_MEMORY=1. |

`(*) Note: Any means this environment variable is effective when set to any non-null value.`
Expand Down
4 changes: 4 additions & 0 deletions sycl/source/detail/program_manager/program_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ static void appendCompileOptionsFromImage(std::string &CompileOpts,
if (!CompileOpts.empty())
CompileOpts += " ";
CompileOpts += "-vc-codegen";
// Allow warning and performance hints from vc/finalizer if the RT warning
// level is at least 1.
if (detail::SYCLConfig<detail::SYCL_RT_WARNING_LEVEL>::get() == 0)
CompileOpts += " -disable-finalizer-msg";
}
}

Expand Down
9 changes: 4 additions & 5 deletions sycl/unittests/misc/KernelBuildOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,14 @@ TEST(KernelBuildOptions, KernelBundleBasic) {
sycl::kernel_bundle KernelBundle =
sycl::get_kernel_bundle<sycl::bundle_state::input>(Ctx, {Dev});
auto ExecBundle = sycl::build(KernelBundle);
EXPECT_EQ(BuildOpts, "-compile-img -vc-codegen -link-img");
EXPECT_EQ(BuildOpts,
"-compile-img -vc-codegen -disable-finalizer-msg -link-img");

auto ObjBundle = sycl::compile(KernelBundle, KernelBundle.get_devices());
// TODO: uncomment when image options are passed to BE
// EXPECT_EQ(BuildOpts, "-compile-img -vc-codegen");
EXPECT_EQ(BuildOpts, "-compile-img -vc-codegen -disable-finalizer-msg");

auto LinkBundle = sycl::link(ObjBundle, ObjBundle.get_devices());
// TODO: uncomment when image options are passed to BE
// EXPECT_EQ(BuildOpts, "-link-img -vc-codegen");
EXPECT_EQ(BuildOpts, "-link-img");
}

TEST(KernelBuildOptions, Program) {
Expand Down