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 8
8
9
9
#pragma once
10
10
11
+ #if SYCL_EXT_JIT_ENABLE
11
12
#include " JITBinaryInfo.h"
13
+ #endif // SYCL_EXT_JIT_ENABLE
12
14
#include < detail/adapter_impl.hpp>
13
15
#include < detail/compiler.hpp>
14
16
#include < detail/context_impl.hpp>
35
37
#include < mutex>
36
38
#include < vector>
37
39
40
+ namespace jit_compiler {
41
+ enum class BinaryFormat : uint32_t ;
42
+ }
43
+
38
44
namespace sycl {
39
45
inline namespace _V1 {
40
46
namespace detail {
@@ -700,7 +706,9 @@ class device_image_impl
700
706
return MRTCBinInfo && MRTCBinInfo->MLanguage == Lang;
701
707
}
702
708
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
704
712
switch (Backend) {
705
713
case backend::ext_oneapi_level_zero:
706
714
case backend::opencl:
@@ -714,6 +722,10 @@ class device_image_impl
714
722
sycl::make_error_code (sycl::errc::invalid),
715
723
" Backend does not support kernel_compiler extension" );
716
724
}
725
+ #else
726
+ throw sycl::exception (sycl::make_error_code (sycl::errc::invalid),
727
+ " JIT not supported" );
728
+ #endif // SYCL_EXT_JIT_ENABLE
717
729
}
718
730
719
731
std::vector<std::shared_ptr<device_image_impl>> buildFromSource (
Original file line number Diff line number Diff line change 8
8
9
9
#pragma once
10
10
11
- #include < JITBinaryInfo.h>
12
11
#include < detail/jit_device_binaries.hpp>
13
12
#include < detail/queue_impl.hpp>
14
13
#include < sycl/detail/kernel_name_str_t.hpp>
15
14
#include < sycl/feature_test.hpp>
16
15
#if SYCL_EXT_JIT_ENABLE
16
+ #include < JITBinaryInfo.h>
17
17
#include < Materializer.h>
18
18
#include < RTC.h>
19
19
#endif // SYCL_EXT_JIT_ENABLE
@@ -28,6 +28,7 @@ struct RTCDevImgInfo;
28
28
struct RTCBundleInfo ;
29
29
template <typename T> class DynArray ;
30
30
using JITEnvVar = DynArray<char >;
31
+ enum class BinaryFormat : uint32_t ;
31
32
} // namespace jit_compiler
32
33
33
34
namespace sycl {
Original file line number Diff line number Diff line change 8
8
9
9
#pragma once
10
10
11
- #include < JITBinaryInfo.h>
11
+ #if SYCL_EXT_JIT_ENABLE
12
+ #include " JITBinaryInfo.h"
13
+ #endif // SYCL_EXT_JIT_ENABLE
12
14
#include < sycl/detail/defines_elementary.hpp>
13
15
#include < sycl/detail/export.hpp> // __SYCL_EXPORT
14
16
#include < sycl/detail/string_view.hpp>
18
20
#include < string>
19
21
#include < vector>
20
22
23
+ namespace jit_compiler {
24
+ enum class BinaryFormat : uint32_t ;
25
+ }
26
+
21
27
namespace sycl {
22
28
inline namespace _V1 {
23
29
namespace ext ::oneapi::experimental {
You can’t perform that action at this time.
0 commit comments