Add support for kernel payload arguments describing data const and
data global buffers in zeInfo.
Argument contains:
* Offset in cross thread data where buffer's address should be written to.
To be removed later. Relocations should be used instead.
* Index in binding table where corresponding Surface State should be present.
Required for bindful access to data buffers.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
Observed about 50MB reduction in overall binaries size (directory build))
when building all targets
with MSVC (Visual Studio 2022 17.3.0 preview 6)
using Debug 64 configuration.
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Previous implementation was missing crucial part.
When ray tracing global buffer argument is passed set
hasRTCalls to true.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
Handle misaligned access when aplying debug relocations in zebin.
Debug relocations entries have offsets which are not of natural
alignment, and need to be specificialy handled.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
Add support in zeInfo for "is_ptr" payload argument describing if field
of structure (argument passed by value) is a pointer.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
Read intel_reqd_sub_group_size attribute and return it for
CL_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL getSubgroupInfo.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
Pipe qualifier must be set (known) on kernel initialization in order
to properly chose kernel arg handler. A new attribute is_pipe has been
introduced; this commit adds support for it.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
Fix given scenarios in yaml parsings:
- Correct reading string containing multiple words separated by a
whitespace (space/tab) on token value retrieving
- Remove any unnecessary whitespaces from the end of a string on token
value retrieving
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
OpenCL expects args type names without additional information (type size).
- Use only the part up to the delimiter, without quotes
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
- Set initial value for ArgIndexT index in
KernelArgMiscInfoT struct
- Add check for arg index in extended metadata in order to avoid OOB
accesses
- Fix missing: populating ArgTypeTraits + refactor ULTs in order to
check it
- Add missing ULTs for Program::callPopulateZebinExtendedArgsMetadataOnce
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit adds support for retrieving extended args metadata passed in
.kernel_misc_info zeInfo's section on clGetKernelArgInfo call.
Related-To: NEO-7372
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit adds support for parsing new .kernel_arg_metadata zeInfo's section,
which will be parsed only on demand (it won't get parsed on initial
zeInfo parsing).
Usage of populated structs will be added in the next commit.
Implemented section's parsing, decoding & populating corresponding fields in
kernelDescriptor.
Related-To: NEO-7372
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
Add support for newly added indirect statelss count check;
populate related field in kernelInfo.
- Move hasIndirectStatelessAccess check from KernelInfo to
KernelDescriptor.
Related-To: NEO-7428
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit adds option to disassemble and assemble zebinary.
Disasm disassembles zebinary into sections. Text sections are
translated to assembly, relocations and symbols are
translated into human readable format.
Asm assembles zebinary from files generated by disasm.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
Add support for inline samplers in zebin.
Generate required SAMPLER_STATEs in DSH.
Resolves: NEO-7388
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
Current implementation of getIntelGTNotes function causes
segfault in case empty owner name string would be passed.
This commit removes potential out-of-bound array access.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit adds support for 32 bit zebinary in NEO runtime and in
ocloc validate.
Resolves: NEO-7288
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
Remove code duplication. Parsing zebin elf for relocations and symbols
is moved to decodeSingleDeviceBinary.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit adds parsing of "user_attributes" section of zeInfo
containing kernel's language attributes.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@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>
Set missing pointer size for argument type buffer address in zebin.
This PR is related to test failures after merging corresponding IGC
change.
Related-To: IGC-5486
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit adds support for sampler's metadata in zebinary and
updates some image's metadata field names.
Resolves: NEO-7257
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
Usage of initializer list in for loop to iterate over heavy types
has bad consequences. std::initialize_list is only a view and its
data is silently created as T[N]. Therefore, if someone uses
std::vector with it, it will cause deep-copying of the elements.
This change introduces usage of pointers on std::initializer_list
to perform a shallow-copy of an addresses. Furthermore, it adds
const references in few places, where copy is not needed.
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit simplifies parsing of enums in zebin decoder and removes
unnecessary tests.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
When an IntelGT note type is not recognized, skip it instead of
returning negative target device validating result.
Related-To: NEO-7190
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>