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/event_impl.hpp>
#include <detail/global_handler.hpp>
#include <detail/persistent_device_code_cache.hpp>
#include <detail/platform_impl.hpp>
#include <detail/program_impl.hpp>
#include <detail/program_manager/program_manager.hpp>
#include <detail/queue_impl.hpp>
#include <detail/spec_constant_impl.hpp>
#include <sycl/aspects.hpp>
#include <sycl/backend_types.hpp>
#include <sycl/context.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/detail/kernel_properties.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/stl.hpp>
#include <sycl/ext/oneapi/matrix/query-types.hpp>
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <memory>
#include <mutex>
#include <sstream>
#include <string>
#include <variant>
#include <sycl/info/aspects.def>
#include <sycl/info/aspects_deprecated.def>
Include dependency graph for program_manager.cpp:

Go to the source code of this file.

Namespaces

 sycl
 
 sycl::_V1
 
 sycl::_V1::detail
 

Macros

#define __SYCL_ASPECT(ASPECT, ID)
 
#define __SYCL_ASPECT_DEPRECATED(ASPECT, ID, MESSAGE)   __SYCL_ASPECT(ASPECT, ID)
 
#define __SYCL_ASPECT_DEPRECATED_ALIAS(ASPECT, ID, MESSAGE)
 

Functions

static constexpr char sycl::_V1::detail::UseSpvEnv ("SYCL_USE_KERNEL_SPV")
 
static void sycl::_V1::detail::enableITTAnnotationsIfNeeded (const sycl::detail::pi::PiProgram &Prog, const PluginPtr &Plugin)
 This function enables ITT annotations in SPIR-V module by setting a specialization constant if INTEL_LIBITTNOTIFY64 env variable is set. More...
 
static sycl::detail::pi::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 sycl::detail::pi::PiProgram sycl::_V1::detail::createSpirvProgram (const ContextImplPtr Context, const unsigned char *Data, size_t DataLen)
 
static bool sycl::_V1::detail::isDeviceBinaryTypeSupported (const context &C, sycl::detail::pi::PiDeviceBinaryType Format)
 
static const char * sycl::_V1::detail::getFormatStr (sycl::detail::pi::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 std::string sycl::_V1::detail::getUint32PropAsOptStr (const RTDeviceBinaryImage &Img, const char *PropName)
 
static void sycl::_V1::detail::appendCompileOptionsForGRFSizeProperties (std::string &CompileOpts, const RTDeviceBinaryImage &Img, bool IsEsimdImage)
 
static void sycl::_V1::detail::appendCompileOptionsFromImage (std::string &CompileOpts, const RTDeviceBinaryImage &Img, const std::vector< device > &Devs, const PluginPtr &)
 
static void sycl::_V1::detail::appendCompileEnvironmentVariablesThatAppend (std::string &CompileOpts)
 
static void sycl::_V1::detail::appendLinkEnvironmentVariablesThatAppend (std::string &LinkOpts)
 
static void sycl::_V1::detail::applyOptionsFromImage (std::string &CompileOpts, std::string &LinkOpts, const RTDeviceBinaryImage &Img, const std::vector< device > &Devices, const PluginPtr &Plugin)
 
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, sycl::detail::pi::PiProgram &Prog)
 
static const char * sycl::_V1::detail::getDeviceLibFilename (DeviceLibExt Extension, bool Native)
 
static const char * sycl::_V1::detail::getDeviceLibExtensionStr (DeviceLibExt Extension)
 
static sycl::detail::pi::PiProgram sycl::_V1::detail::loadDeviceLibFallback (const ContextImplPtr Context, DeviceLibExt Extension, const sycl::detail::pi::PiDevice &Device, bool UseNativeLib)
 
void sycl::_V1::detail::CheckJITCompilationForImage (const RTDeviceBinaryImage *const &Image, bool JITCompilationIsRequired)
 
template<typename StorageKey >
RTDeviceBinaryImage * sycl::_V1::detail::getBinImageFromMultiMap (const std::unordered_multimap< StorageKey, RTDeviceBinaryImage * > &ImagesSet, const StorageKey &Key, const context &Context, const device &Device)
 
static bool sycl::_V1::detail::isDeviceLibRequired (DeviceLibExt Ext, uint32_t DeviceLibReqMask)
 
static std::vector< sycl::detail::pi::PiProgramsycl::_V1::detail::getDeviceLibPrograms (const ContextImplPtr Context, const sycl::detail::pi::PiDevice &Device, uint32_t DeviceLibReqMask)
 
static bundle_state sycl::_V1::detail::getBinImageState (const RTDeviceBinaryImage *BinImage)
 
static bool sycl::_V1::detail::compatibleWithDevice (RTDeviceBinaryImage *BinImage, const device &Dev)
 
static void sycl::_V1::detail::setSpecializationConstants (const std::shared_ptr< device_image_impl > &InputImpl, sycl::detail::pi::PiProgram Prog, const PluginPtr &Plugin)
 
bool sycl::_V1::detail::doesDevSupportDeviceRequirements (const device &Dev, const RTDeviceBinaryImage &Img)
 
static std::string sycl::_V1::detail::getAspectNameStr (sycl::aspect AspectNum)
 
template<typename T >
static std::enable_if_t< std::is_unsigned_v< T >, std::optional< T > > sycl::_V1::detail::multiply_with_overflow_check (T x, T y)
 
std::optional< matrix_ext::matrix_type > sycl::_V1::detail::convertMatrixTypeStringMatrixTypeEnumValue (const std::string &MatrixTypeString)
 
bool sycl::_V1::detail::isMatrixSupportedByHW (const std::string &MatrixTypeStrUser, size_t RowsUser, size_t ColsUser, matrix_ext::matrix_type MatrixTypeRuntime, size_t MaxRowsRuntime, size_t MaxColsRuntime, size_t RowsRuntime, size_t ColsRuntime)
 
std::optional< sycl::exceptionsycl::_V1::detail::checkDevSupportJointMatrix (const std::string &JointMatrixProStr, const std::vector< ext::oneapi::experimental::matrix::combination > &SupportedMatrixCombinations)
 
std::optional< sycl::exceptionsycl::_V1::detail::checkDevSupportJointMatrixMad (const std::string &JointMatrixProStr, const std::vector< ext::oneapi::experimental::matrix::combination > &SupportedMatrixCombinations)
 
std::optional< sycl::exceptionsycl::_V1::detail::checkDevSupportDeviceRequirements (const device &Dev, const RTDeviceBinaryImage &Img, const NDRDescT &NDRDesc)
 
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
 
static const std::map< DeviceLibExt, std::pair< const char *, const char * > > sycl::_V1::detail::DeviceLibNames
 
static const std::map< DeviceLibExt, const char * > sycl::_V1::detail::DeviceLibExtensionStrs
 

Macro Definition Documentation

◆ __SYCL_ASPECT

#define __SYCL_ASPECT (   ASPECT,
  ID 
)
Value:
case aspect::ASPECT: \
return #ASPECT;

◆ __SYCL_ASPECT_DEPRECATED

#define __SYCL_ASPECT_DEPRECATED (   ASPECT,
  ID,
  MESSAGE 
)    __SYCL_ASPECT(ASPECT, ID)

◆ __SYCL_ASPECT_DEPRECATED_ALIAS

#define __SYCL_ASPECT_DEPRECATED_ALIAS (   ASPECT,
  ID,
  MESSAGE 
)

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 2876 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 2881 of file program_manager.cpp.