Automatically add "-s" (source path) option if -g flag is present.
This applies only to non-spirv input.
Related-To: NEO-7285
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commits add support for relocating
symbols with local binding and of functional type
(STB_LOCAL, STT_FUNC).
Related-To: NEO-7299
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
Discarding RAII lock returned from function almost always
is a bug. This change introduces usage of [[no_discard]]
attribute from C++17 to prevent such misues.
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This change:
- removes redundant copying of std::vector
- removes unneeded includes from the header file
and introduces usage of forward declaration
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
When header is included for the first time in translation unit,
then preprocessor simply copy-pastes its content. If we define a
constant in a header file and this constant has internal linkage
then each and every translation unit, which includes this header
will have its own copy of this constant.
C++17 introduces inline variables, which are meant to allow creation
of variables in header files, which do not cause multiple instances.
The inline variable has a single instance when:
- constexpr is used without static (constexpr implicitly implies inline)
- inline is used without static
- inline const is used without static (const does not imply internal linkage
when used with inline)
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This change removes unneeded recalculation of hash as well
as redundant calls to std::to_string().
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
In decodeElfSymbolTableAndRelocations, when symbol's section is of
unknown type, then do not add it to linker's symbol table.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
feat(zebin): Use addend from RELA sections when performing relocations.
Resolves: NEO-6898
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit removes early fail in linking with zebin and external
functions which happens when, there's a relocation to external functions
section, but it's not modifying any external function. And only treats
GLOBAL FUNC symbols pointing to external functions section as external
function symbols.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit adds check in Linker::resolveExternalFunctions checking
if external functions are present before trying to resolve dependencies
and adds default values for ExternalFunctionInfo.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This change allows for modifying kernel's barrier count
based on called external functions metadata passed
via zeInfo section in zebin.
Added parsing external functions metadata.
Added resolving external functions call graph.
Added updating kernel barriers based on called external functions.
Added support for L0 dynamic link.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit adds support for querying global pointers via decorated
names passed in zeInfo.
Related-To: NEO-6734
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
Related-To: NEO-6075
After this change driver will fail clBuildProgram/zeModuleCreate api calls
whenever stateful access is discovered on PVC.
This is required since in this case allocation greater than 4GB
will not work.
If user still wants to use stateful addressing mode,
-cl-opt-smaller-than-4GB-buffers-only / -ze-opt-smaller-than-4GB-buffers-only
build option should be passed as build option, but then user can not use
bufers greater than 4GB.
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
IGC will be queried for max parameter size at the end of initializing
device caps.
Related-To: NEO-4851
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Introduced a new warning, which is printed to build log, when the
binary needs to be recompiled. Added a new flag -Wno-recompiled-from-ir
to allow suppression of that message. Removed a bug related to memcpy_s
from ModuleBuildLogImp::getString() and aligned it with specification.
Related-To: NEO-5819
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
Unifies usage of flags in case of IR exclusion from ocloc's output file.
When -exclude_ir parameter is active, then internal options passed to
IGC contain -exclude-ir-from-zebin to preserve consistency. Moreover,
when only -exclude-ir-from-zebin is present, then -exclude_ir is also set.
Related-To: NEO-6477
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
Skip undefined symbols when decoding ELF symbol table
instead of treating them as error in zebin path in
order to support dynamic linking scenarios.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
- add function for resolving builtins using relocations
- add relocation for __SubDeviceID symbol
Related-To: NEO-6258
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6075
After this change driver will fail clBuildProgram/zeModuleCreate api calls
whenever stateful access is discovered and device has shared system usm caps
enabled.This is required since in this case allocation greater than 4GB
will not work.
If user still wants to use stateful addressing mode,
-cl-opt-smaller-than-4GB-buffers-only / -ze-opt-smaller-than-4GB-buffers-only
build option should be passed as build option, but then user can not use
buffers greater than 4GB.
Related-To: NEO-6448
- add new IGC compilation flag when bindless mode used
- fix SBA programming of BindlessSurfaceStateSize -
always set maximum surface state count
- fix residency of global DSH heap on gen9 - gen12lp
in bindless mode
- add L0 aub test with bindless kernel - disabled
- partial fixes in OCL aub tests
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>