20 namespace ext::intel::experimental {
22 using byte =
unsigned char;
30 static constexpr
int any = 0;
60 operator int() {
return Val; }
85 : OutputFormat(fmt), OutputFormatVersion({0, 0}),
86 DeviceType(sycl::info::device_type::all), DeviceArch(device_arch::any),
87 Is64Bit(
true), DeviceStepping(
"") {}
96 : OutputFormat(fmt), OutputFormatVersion({0, 0}), DeviceType(dev_type),
97 DeviceArch(arch), Is64Bit(
true), DeviceStepping(
"") {}
105 DeviceType(sycl::info::device_type::all), DeviceArch(device_arch::any),
106 Is64Bit(
true), DeviceStepping(
"") {}
114 template <
typename... Tys>
115 std::vector<byte>
compile(
const std::string &src,
const Tys &...args);
126 OutputFormatVersion = {major, minor};
166 std::pair<int, int> OutputFormatVersion;
178 std::string DeviceStepping;
181 void *CompileToSPIRVHandle =
nullptr;
182 void *FreeSPIRVOutputsHandle =
nullptr;
194 __SYCL_EXPORT std::vector<byte>
196 const std::string &src,
const std::vector<std::string> &options);
204 return compile(src, std::vector<std::string>{});
213 const std::string &src,
const std::vector<std::string> &options);
220 return compile(src, std::vector<std::string>{});
Represents an error happend during online compilation.
online_compile_error(const std::string &Msg)
online_compile_error()=default
Represents an online compiler for the language given as template parameter.
online_compiler(const sycl::device &)
Constructs online compiler for the target specified by given SYCL device.
std::vector< byte > compile(const std::string &src, const Tys &...args)
Compiles given in-memory Lang source to a binary blob.
online_compiler< Lang > & setOutputFormatVersion(int major, int minor)
Sets the compiled code format version of the compilation target and returns *this.
online_compiler< Lang > & setTargetDeviceArch(device_arch arch)
Sets the device architecture of the compilation target and returns *this.
online_compiler< Lang > & set64bitTarget()
Makes the compilation target 64-bit and returns *this.
online_compiler(compiled_code_format fmt=compiled_code_format::spir_v)
Constructs online compiler which can target any device and produces given compiled code format.
online_compiler< Lang > & setTargetDeviceType(sycl::info::device_type type)
Sets the device type of the compilation target and returns *this.
online_compiler< Lang > & setOutputFormat(compiled_code_format fmt)
Sets the compiled code format of the compilation target and returns *this.
online_compiler< Lang > & setTargetDeviceStepping(const std::string &id)
Sets implementation-defined target device stepping of the compilation target and returns *this.
online_compiler< Lang > & set32bitTarget()
Makes the compilation target 32-bit and returns *this.
online_compiler(sycl::info::device_type dev_type, device_arch arch, compiled_code_format fmt=compiled_code_format::spir_v)
Constructs online compiler which targets given architecture and produces given compiled code format.
A unique identifier of an item in an index space.
#define __SYCL_INLINE_VER_NAMESPACE(X)
source_language
Designates a source language for the online compiler.
kernel_bundle< bundle_state::object > compile(const kernel_bundle< bundle_state::input > &InputBundle, const std::vector< device > &Devs, const property_list &PropList={})
---— Error handling, matching OpenCL plugin semantics.