Commit Graph

165 Commits

Author SHA1 Message Date
Kacper Nowak 966aa460f7 feat(yaml_parser): Correct parsing whitespaces-separated strings
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>
2022-11-15 12:48:17 +01:00
Kacper Nowak 4d6bb9a807 fix(zebin): use arg type name without size
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>
2022-11-09 14:34:24 +01:00
Krystian Chmielewski 62ed04d5c1 feat(zebin): add platform compatibility check
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-11-08 19:05:06 +01:00
Krystian Chmielewski 7be9881758 Fix 32b elf symbols
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-11-08 15:30:21 +01:00
Kacper Nowak a12251d464 feat(zebin): code improvements
- 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>
2022-11-08 14:10:55 +01:00
Mateusz Hoppe a30cc94708 Zebin - fix program headers
- do not add CPU segment LOAD in debug zebin

Resolves: NEO-7481

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-11-08 12:32:19 +01:00
Warchulski, Jaroslaw 6cbb3cfb05 Cleanup includes 3
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-11-07 14:52:31 +01:00
Kacper Nowak 709e322a4a feat(zebin): get extended args metadata on clGetKernelArgInfo API call
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>
2022-11-03 13:15:09 +01:00
Krystian Chmielewski 70da7c4b65 feat(zebin): add support for sync buffer
Adds support in zebinary for sync buffer required for global barriers.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-10-28 08:59:28 +02:00
Kacper Nowak b1731626d0 Correct spelling mistakes
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-10-20 15:53:23 +02:00
Kacper Nowak 22dbae1771 feat(zebin): Add support for .kernel_arg_metadata section.
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>
2022-10-20 14:20:32 +02:00
Kacper Nowak f06df021b5 feat(zebin): Add support for indirect stateless count
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>
2022-10-19 07:58:02 +02:00
Krystian Chmielewski a8c9458936 Unpack 32bit zebin correctly
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-10-13 21:10:03 +02:00
Krystian Chmielewski 4f0d19628e Ocloc asm/disasm support for zebin
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>
2022-10-10 14:48:55 +02:00
Krystian Chmielewski 73a58aaf9e feat(zebin): inline sampler
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>
2022-10-10 12:47:19 +02:00
Kacper Nowak d4cddc7ecd Zebin: fix segfault in zebin decoder
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>
2022-10-07 17:32:09 +02:00
Krystian Chmielewski 596e9f815c 32bit zebin support
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>
2022-09-27 11:12:05 +02:00
Krystian Chmielewski 311b0b0020 Create input for linker during zebin decoding
Remove code duplication. Parsing zebin elf for relocations and symbols
is moved to decodeSingleDeviceBinary.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-09-22 11:12:39 +02:00
Jim Snow 40fb0c2542 Clean up RTDispatchGlobals patch token parsing
Related-To: LOCI-3349

Signed-off-by: Jim Snow <jim.m.snow@intel.com>
2022-09-14 07:38:37 +02:00
Krystian Chmielewski 1f6c09ba1d zebin: sanitize scratch space size
Sanitize scratch space size to value programmable on GPU.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-09-09 11:50:09 +02:00
Krystian Chmielewski 5af2bc8a60 zebin: add support for kernels source attributes
This commit adds parsing of "user_attributes" section of zeInfo
containing kernel's language attributes.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-09-08 12:07:19 +02:00
Zbigniew Zdanowicz c3f7e40a8d Rename special pipeline select mode to systolic
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-08-31 22:16:26 +02:00
Patryk Wrobel c0342a0ab5 Optimize binaries' size by adjusting linkage of constants in headers
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>
2022-08-26 22:52:04 +02:00
Compute-Runtime-Validation 7319d05469 Revert "feat(zebin): set missing pointer size for arg type buffer address"
This reverts commit cc17c53a77.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-08-19 06:54:59 +02:00
Kacper Nowak cc17c53a77 feat(zebin): set missing pointer size for arg type buffer address
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>
2022-08-18 20:37:24 +02:00
Krystian Chmielewski 18adbed233 feat(zebin): add thread scheduling mode support
Resolves: NEO-7197

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-08-18 16:10:18 +02:00
Krystian Chmielewski 70ef88c0bb feat(zebin): add sampler metadata support
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>
2022-08-16 10:11:01 +02:00
Patryk Wrobel 44e1f1ba4b Remove redundant copying of std::vectors
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>
2022-08-16 09:27:16 +02:00
Krystian Chmielewski 9bd2c7da2b refactor(zebin decoder): parsing enums
This commit simplifies parsing of enums in zebin decoder and removes
unnecessary tests.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-08-10 23:36:25 +02:00
Kacper Nowak f219617823 Zebin: Do not fail on parsing unrecognized intelGT note types
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>
2022-08-10 17:04:22 +02:00
Krystian Chmielewski eecde9114a feat(zebin): add image metadata support
This commit adds support of image metadata in zebin format.

Resolves: NEO-7251

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-08-10 00:06:51 +02:00
Kacper Nowak f774deffa7 Zebin: ZEBinary ELF versioning in intelNoteGT section
This commit adds support for new ZEBinary ELF versioning mechanism.
- Add new IntelGTSecionType: ZebinVersion
- Add mechanism for retrieving zeInfo/elf version in intel.notegt
section
Related-To: NEO-7190
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-08-09 17:58:12 +02:00
Kamil Kopryk d4d54f5093 Cleanup includes
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-07-25 09:58:38 +02:00
Kacper Nowak 843227962a Update ZEInfo version to 1.9
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-07-22 13:24:33 +02:00
Jim Snow f4879f064f Allocate per-tile RTDispatchGlobals, handle ray tracing patch tokens.
Related-to: NEO-6711

Signed-off-by: Raiyan Latif <raiyan.latif@intel.com>
2022-07-22 06:29:29 +02:00
Compute-Runtime-Validation 0eb2001d8f Revert "Check indirect access from igc"
This reverts commit e5d63cd303.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-07-22 04:39:16 +02:00
Dominik Dabek e5d63cd303 Check indirect access from igc
Also add workaround for app passing svm pointers by value

Related-To: NEO-7182

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-07-21 12:25:24 +02:00
Kacper Nowak 0a4ab48e0b Zebin: Remove actual_kernel_start_offset from execEnv
This change is needed to bump zeInfo version beyond 1.6
- Version 1.6: Remove actual_kernel_start_offset from execution environment.

Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-07-20 11:24:28 +02:00
Kacper Nowak 3a446e75cf Yaml parser: reserve additional space for nesting + simplify reserving logic
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-07-19 16:34:39 +02:00
Compute-Runtime-Validation f9888db0fb Revert "Check indirect access from igc"
This reverts commit e14c91fa6c.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-07-16 07:36:49 +02:00
Dominik Dabek e14c91fa6c Check indirect access from igc
Related-To: NEO-7182

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-07-15 15:01:48 +02:00
Warchulski, Jaroslaw 4147f40970 DisableKernelRecompilation flag and binary kernel recompilation warning
Resolves: NEO-6513
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-07-14 18:22:49 +02:00
Kacper Nowak 8a6d6dd449 Yaml parser: remove unnecessary container size manipulation
This commit removes unnecessary container size manipulation in yaml
parser. Space reservation is done by dedicated function
reserveBasedOnEstimates, so there is no need to manually resize the
container's size afterwards.
- Ensure that no invalidated iterators/references are used.
- Use push_back() instead of resize(...size()+1).
- Use reserveBasedOnEstimates() instead of reserve(...size()+1)
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-07-12 17:38:06 +02:00
Katarzyna Cencelewska 25ce4d0c04 Clean unused code
remove parts with device queue

Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-07-07 14:52:26 +02:00
Daria Hinz 5745c3d99d Change AOT enums type & use forward declaration
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2022-06-20 13:40:29 +02:00
Nowak, Kacper b3d94add4b Set missing field for buffer_address kernel arg type
Set missing pointerSize (basing on source size field) for buffer_address arg
type.
Signed-off-by: Nowak, Kacper <kacper.nowak@intel.com>
Related-To: NEO-7048
2022-06-15 16:49:11 +02:00
Daria Hinz 6d365cbfc3 Ocloc: New AOT design implementation
Ocloc will handle any new values that may be
passed to the -device argument.

Supported acronyms are available under cmd:
ocloc compile --help

Supported patterns:
- device acronym
- release acronym
- family acronym
- version (major.minor.revision)

Fatbinary will no longer handle major.minor.revision variances,
only acronyms allowed.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2022-06-14 13:20:45 +02:00
Krystian Chmielewski adfc3a1e7a feat(dbg zebin): set sym value to absolute address
GDB requires debug zebin to be an absolute ELF. This change adds setting
symbols values to absolute addresses allowing GDB to work correctly.

Resolves: NEO-7097

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-06-13 12:40:44 +02:00
Compute-Runtime-Validation cca1dbecbc Revert "Ocloc: New AOT approach implementation"
This reverts commit a44f1b43aa.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-06-12 21:27:08 +02:00
Daria Hinz a44f1b43aa Ocloc: New AOT approach implementation
Ocloc will handle any new values that may be
passed to the -device argument.

Supported acronyms are available under cmd:
ocloc compile --help

Supported patterns:
- device acronym
- release acronym
- family acronym
- version (major.minor.revision)

Fatbinary will no longer handle major.minor.revision variances,
only acronyms allowed.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2022-06-10 09:24:13 +02:00