DPC++ Runtime
Runtime libraries for oneAPI DPC++
program_manager.cpp File Reference
#include <detail/config.hpp>
#include <detail/context_impl.hpp>
#include <detail/device_image_impl.hpp>
#include <detail/device_impl.hpp>
#include <detail/global_handler.hpp>
#include <detail/persistent_device_code_cache.hpp>
#include <detail/program_impl.hpp>
#include <detail/program_manager/program_manager.hpp>
#include <detail/spec_constant_impl.hpp>
#include <sycl/backend_types.hpp>
#include <sycl/context.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/detail/os_util.hpp>
#include <sycl/detail/type_traits.hpp>
#include <sycl/detail/util.hpp>
#include <sycl/device.hpp>
#include <sycl/exception.hpp>
#include <sycl/ext/oneapi/experimental/spec_constant.hpp>
#include <sycl/stl.hpp>
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <memory>
#include <mutex>
#include <sstream>
#include <string>
Include dependency graph for program_manager.cpp:

Go to the source code of this file.

Namespaces

 sycl
 ---— Error handling, matching OpenCL plugin semantics.
 
 sycl::_V1
 
 sycl::_V1::detail
 

Enumerations

enum  sycl::_V1::detail::BuildState { sycl::_V1::detail::BS_InProgress, sycl::_V1::detail::BS_Done, sycl::_V1::detail::BS_Failed }
 

Functions

static constexpr char sycl::_V1::detail::UseSpvEnv ("SYCL_USE_KERNEL_SPV")
 
static void sycl::_V1::detail::enableITTAnnotationsIfNeeded (const RT::PiProgram &Prog, const plugin &Plugin)
 This function enables ITT annotations in SPIR-V module by setting a specialization constant if INTEL_LIBITTNOTIFY64 env variable is set. More...
 
static RT::PiProgram sycl::_V1::detail::createBinaryProgram (const ContextImplPtr Context, const device &Device, const unsigned char *Data, size_t DataLen, const std::vector< pi_device_binary_property > Metadata)
 
static RT::PiProgram sycl::_V1::detail::createSpirvProgram (const ContextImplPtr Context, const unsigned char *Data, size_t DataLen)
 
template<typename ExceptionT , typename RetT >
RetT * sycl::_V1::detail::waitUntilBuilt (KernelProgramCache &Cache, KernelProgramCache::BuildResult< RetT > *BuildResult)
 
template<typename RetT , typename ExceptionT , typename KeyT , typename AcquireFT , typename GetCacheFT , typename BuildFT >
KernelProgramCache::BuildResult< RetT > * sycl::_V1::detail::getOrBuild (KernelProgramCache &KPCache, KeyT &&CacheKey, AcquireFT &&Acquire, GetCacheFT &&GetCache, BuildFT &&Build)
 Try to fetch entity (kernel or program) from cache. More...
 
static bool sycl::_V1::detail::isDeviceBinaryTypeSupported (const context &C, RT::PiDeviceBinaryType Format)
 
static const charsycl::_V1::detail::getFormatStr (RT::PiDeviceBinaryType Format)
 
static void sycl::_V1::detail::appendLinkOptionsFromImage (std::string &LinkOpts, const RTDeviceBinaryImage &Img)
 
static bool sycl::_V1::detail::getUint32PropAsBool (const RTDeviceBinaryImage &Img, const char *PropName)
 
static void sycl::_V1::detail::appendCompileOptionsFromImage (std::string &CompileOpts, const RTDeviceBinaryImage &Img)
 
static void sycl::_V1::detail::applyOptionsFromImage (std::string &CompileOpts, std::string &LinkOpts, const RTDeviceBinaryImage &Img)
 
static void sycl::_V1::detail::applyCompileOptionsFromEnvironment (std::string &CompileOpts)
 
static void sycl::_V1::detail::applyLinkOptionsFromEnvironment (std::string &LinkOpts)
 
static void sycl::_V1::detail::applyOptionsFromEnvironment (std::string &CompileOpts, std::string &LinkOpts)
 
static void sycl::_V1::detail::emitBuiltProgramInfo (const pi_program &Prog, const ContextImplPtr &Context)
 Emits information about built programs if the appropriate contitions are met, namely when SYCL_RT_WARNING_LEVEL is greater than or equal to 2. More...
 
static bool sycl::_V1::detail::loadDeviceLib (const ContextImplPtr Context, const char *Name, RT::PiProgram &Prog)
 
static const charsycl::_V1::detail::getDeviceLibFilename (DeviceLibExt Extension)
 
static const charsycl::_V1::detail::getDeviceLibExtensionStr (DeviceLibExt Extension)
 
static RT::PiProgram sycl::_V1::detail::loadDeviceLibFallback (const ContextImplPtr Context, DeviceLibExt Extension, const RT::PiDevice &Device)
 
static bool sycl::_V1::detail::isDeviceLibRequired (DeviceLibExt Ext, uint32_t DeviceLibReqMask)
 
static std::vector< RT::PiProgram > sycl::_V1::detail::getDeviceLibPrograms (const ContextImplPtr Context, const RT::PiDevice &Device, uint32_t DeviceLibReqMask)
 
static ProgramManager::KernelArgMask sycl::_V1::detail::createKernelArgMask (const ByteArray &Bytes)
 
static bundle_state sycl::_V1::detail::getBinImageState (const RTDeviceBinaryImage *BinImage)
 
static bool sycl::_V1::detail::compatibleWithDevice (RTDeviceBinaryImage *BinImage, const device &Dev)
 
void __sycl_register_lib (pi_device_binaries desc)
 Executed as a part of current module's (.exe, .dll) static initialization. More...
 
void __sycl_unregister_lib (pi_device_binaries desc)
 Executed as a part of current module's (.exe, .dll) static de-initialization. More...
 

Variables

static constexpr int sycl::_V1::detail::DbgProgMgr = 0
 

Function Documentation

◆ __sycl_register_lib()

void __sycl_register_lib ( pi_device_binaries  desc)

Executed as a part of current module's (.exe, .dll) static initialization.

Registers device executable images with the runtime.

Definition at line 2052 of file program_manager.cpp.

◆ __sycl_unregister_lib()

void __sycl_unregister_lib ( pi_device_binaries  desc)

Executed as a part of current module's (.exe, .dll) static de-initialization.

Unregisters device executable images with the runtime.

Definition at line 2057 of file program_manager.cpp.