File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 88
99#pragma once
1010
11+ #if SYCL_EXT_JIT_ENABLE
1112#include " JITBinaryInfo.h"
13+ #endif // SYCL_EXT_JIT_ENABLE
1214#include < detail/adapter_impl.hpp>
1315#include < detail/compiler.hpp>
1416#include < detail/context_impl.hpp>
3537#include < mutex>
3638#include < vector>
3739
40+ namespace jit_compiler {
41+ enum class BinaryFormat : uint32_t ;
42+ }
43+
3844namespace sycl {
3945inline namespace _V1 {
4046namespace detail {
@@ -700,7 +706,9 @@ class device_image_impl
700706 return MRTCBinInfo && MRTCBinInfo->MLanguage == Lang;
701707 }
702708
703- static ::jit_compiler::BinaryFormat getTargetFormat (const backend Backend) {
709+ static ::jit_compiler::BinaryFormat
710+ getTargetFormat ([[maybe_unused]] const backend Backend) {
711+ #if SYCL_EXT_JIT_ENABLE
704712 switch (Backend) {
705713 case backend::ext_oneapi_level_zero:
706714 case backend::opencl:
@@ -714,6 +722,10 @@ class device_image_impl
714722 sycl::make_error_code (sycl::errc::invalid),
715723 " Backend does not support kernel_compiler extension" );
716724 }
725+ #else
726+ throw sycl::exception (sycl::make_error_code (sycl::errc::invalid),
727+ " JIT not supported" );
728+ #endif // SYCL_EXT_JIT_ENABLE
717729 }
718730
719731 std::vector<std::shared_ptr<device_image_impl>> buildFromSource (
Original file line number Diff line number Diff line change 88
99#pragma once
1010
11- #include < JITBinaryInfo.h>
1211#include < detail/jit_device_binaries.hpp>
1312#include < detail/queue_impl.hpp>
1413#include < sycl/detail/kernel_name_str_t.hpp>
1514#include < sycl/feature_test.hpp>
1615#if SYCL_EXT_JIT_ENABLE
16+ #include < JITBinaryInfo.h>
1717#include < Materializer.h>
1818#include < RTC.h>
1919#endif // SYCL_EXT_JIT_ENABLE
@@ -28,6 +28,7 @@ struct RTCDevImgInfo;
2828struct RTCBundleInfo ;
2929template <typename T> class DynArray ;
3030using JITEnvVar = DynArray<char >;
31+ enum class BinaryFormat : uint32_t ;
3132} // namespace jit_compiler
3233
3334namespace sycl {
Original file line number Diff line number Diff line change 88
99#pragma once
1010
11- #include < JITBinaryInfo.h>
11+ #if SYCL_EXT_JIT_ENABLE
12+ #include " JITBinaryInfo.h"
13+ #endif // SYCL_EXT_JIT_ENABLE
1214#include < sycl/detail/defines_elementary.hpp>
1315#include < sycl/detail/export.hpp> // __SYCL_EXPORT
1416#include < sycl/detail/string_view.hpp>
1820#include < string>
1921#include < vector>
2022
23+ namespace jit_compiler {
24+ enum class BinaryFormat : uint32_t ;
25+ }
26+
2127namespace sycl {
2228inline namespace _V1 {
2329namespace ext ::oneapi::experimental {
You can’t perform that action at this time.
0 commit comments