Commit Graph

243 Commits

Author SHA1 Message Date
Warchulski, Jaroslaw 0eac749fcc Cleanup includes 19
Cleaned up files:
opencl/source/api/cl_types.h
shared/source/compiler_interface/external_functions.h
shared/source/compiler_interface/linker.h
shared/source/device_binary_format/elf/elf.h
shared/source/helpers/preamble.h
shared/source/memory_manager/definitions/storage_info.h
shared/source/memory_manager/memory_manager.h
shared/source/memory_manager/os_agnostic_memory_manager.h
shared/source/program/program_info.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-03 11:02:05 +01:00
Warchulski, Jaroslaw 7ae44268cb Cleanup includes 17
Cleaned up files:
shared/source/built_ins/sip.h
shared/source/compiler_interface/compiler_cache.h
shared/source/compiler_interface/compiler_interface.h
shared/source/device_binary_format/device_binary_formats.h
shared/source/helpers/timestamp_packet.h
shared/source/kernel/debug_data.h
shared/source/utilities/tag_allocator.h
shared/test/common/mocks/mock_device.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-02 10:59:08 +01:00
Kamil Kopryk 234573399d Refactor: pass gfxCoreHelper to decodeSingleDeviceBinary
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-02 08:17:46 +01:00
Kacper Nowak a262bffeb4 feat(ocl): Generate minimal set of args info
Provide minimalistic arg info metada when provided native binary is missing
kernels_misc_info section.
- For args passed by value and by pointer (-images/samplers), do not
specify type name - instead, return an opaque* type name with size.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-12-29 20:11:39 +01:00
Compute-Runtime-Validation 8d18a0cd12 Revert "feat(ocl): Generate minimal set of args info"
This reverts commit ea6c91eccc.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-29 07:07:32 +01:00
Kacper Nowak ea6c91eccc feat(ocl): Generate minimal set of args info
- Provide minimalistic arg info metada when provided native binary is missing
kernels_misc_info section.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-12-28 20:24:44 +01:00
Kacper Nowak 5dbcb4b4d5 fix(zebin): set max BT indexes for globals/const buffers
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-12-20 18:30:45 +01:00
Mateusz Jablonski 8f1bdb220f Pass root device environment to get TargetDevice for IGC
Related-To: NEO-6853
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-12-19 19:29:50 +01:00
Kacper Nowak 7b8d1925a9 feat(zebin): Use AOT config for validating target device
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-12-15 22:25:56 +01:00
Krystian Chmielewski b2a51146a5 feat(zebin): support data const/global buffer arg
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>
2022-12-14 16:52:35 +01:00
Kamil Kopryk 232b886056 Rename HwInfoConfig to ProductHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-14 14:39:52 +01:00
Dunajski, Bartosz 4c325d2706 Add new entry to zebin decoder
Related-To: NEO-7085

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-12-13 13:32:51 +01:00
Kamil Kopryk 03b687881f Rename HwHelper -> GfxCoreHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-09 10:29:06 +01:00
Kamil Kopryk 6993ed5c52 Reduce binaries sizes 2/n
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>
2022-12-08 16:14:38 +01:00
Mateusz Jablonski 23fd280334 Unify definition of hardware ip version
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-12-06 17:22:24 +01:00
Krystian Chmielewski 2ceada6bef fix(zebin): ray tracing
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>
2022-12-05 16:50:45 +01:00
Krystian Chmielewski d25a5c73f2 fix(ocl zebin): do not expose functions as kernels
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-12-05 12:39:18 +01:00
Krystian Chmielewski d4fe9298bf fix(debug zebin): handle misaligned access
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>
2022-12-01 10:45:17 +01:00
Kacper Nowak e268b46df1 Update ZEInfo version to 1.26
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-11-29 17:26:33 +01:00
Mateusz Jablonski f7c11e8a94 Fix typos
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-11-29 17:12:10 +01:00
Krystian Chmielewski b2051003f9 feat(zebin): support rt global buffers
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-11-28 17:25:32 +01:00
Krystian Chmielewski ad6237478f feat(zebin): support isPtr for struct elems
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>
2022-11-28 16:00:03 +01:00
Krystian Chmielewski 0e5b0b1173 feat(zebin): add eu_thread_count exec env attrib
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-11-22 16:43:37 +01:00
Kacper Nowak fd691cd33c feat(zebin): Do not report attributes values with spaces
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-11-22 13:44:12 +01:00
Krystian Chmielewski eee6a2439f fix(zebin): intel_reqd_sub_group_size
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>
2022-11-22 10:13:21 +01:00
Kacper Nowak 50df7f430e feat(zebin): Support for is_pipe ptr argument attribute
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>
2022-11-21 16:19:36 +01:00
Warchulski, Jaroslaw 1c03361273 Cleanup includes 6
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-11-21 12:02:14 +01:00
Warchulski, Jaroslaw f35f59b573 Cleanup includes 5
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-11-18 22:46:38 +01:00
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
Kacper Nowak de75e51228 Zebin: Add support for new buffer_address arg type
This change adds support for new "buffer_address" arg type, which adds
buffer address information for stateful-only argument. This will prevent
from generating stateless version of a kernel argument if all its
accesses are to be promoted to the stateful ones.
- Change default value of accessedUsingStatelessAddressingMode flag.

Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
Related-To: NEO-7048
2022-06-08 17:33:31 +02:00
Daniel Chabrowski 6fd7ae7142 Cleanup headers
Signed-off-by: Daniel Chabrowski <daniel.chabrowski@intel.com>
2022-05-26 17:55:44 +02:00
Neil R Spruit 8c894fad5e Change Packed binary Returned in L0 GetNative to be the Target Device binary
- Packed Binary Returned to a customer in L0 GetNative is now
the target device's native binary.

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2022-05-25 21:27:45 +02:00
Krystian Chmielewski 359dfc301f Improve elf encoder
This change:
* adds functions for setting members of ElfSymbol, and ElfRela.
* simplifies string section creation in ElfEncoder.
* adds function to query index of section in ElfEncoder.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-05-18 12:20:26 +02:00
Daniel Chabrowski 7463e1970b Cleanup headers
Make TUs and headers self-contained, remove unused headers

Signed-off-by: Daniel Chabrowski <daniel.chabrowski@intel.com>
2022-05-18 11:42:06 +02:00
Kacper Nowak e32738ee4a Set flag indicating corresponding addressing mode in zebin
Set missing flag indicating corresponding addresing mode.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
Related-To: NEO-6646
2022-05-16 15:16:25 +02:00
Artur Harasimiuk a6490062a9 fix code issues reported by clang 14
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-04-29 10:43:34 +02:00
Mateusz Jablonski ac01f74924 style: fix gcc12 compilation errors
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-04-28 18:07:15 +02:00
Krystian Chmielewski e007ba499f feat(zebin): add support for build options section
This change:
* Adds support for build options section in zebinary - using
build options in binary when rebuilding.
* Appends "-cl-intel-allow-zebin" flag to build options when zebin is
used.

Resolves: NEO-6916

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-04-27 11:26:42 +02:00
Krystian Chmielewski 5c120f5f2d fix: Ignore unsupported relocs in debug zebin
Do not apply relocations with types different than {1, 2, 3}, when creating
debug zebin.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-04-21 13:47:13 +02:00
Kacper Nowak 1a33fc0dc7 Zebin: return error on parsing empty vector entries in zeInfo
This commit prevents a yaml parsing error in case a data type is passed
after empty vetor type data entry with the same indendation. In this
case, a parsing error will be returned.
- Corrected .ze_info section in valid empty program (zebin mock)
- Minor ults refactor in order to use mock zebin program with valid
.ze_info

Related-To: NEO-6735
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-04-19 13:12:47 +02:00
Krystian Chmielewski 7a64982822 Debug Zebin pass kernel's address
feat: Set text sections' addresses with valid GPU VA. Offset debug symbols
with text segment names by corresponding segment's GPU VA.

Resolves: NEO-6873

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-04-13 08:38:49 +02:00
Krystian Chmielewski ee0d183cf9 Handle legacy hasBarriers properly
Previous change regarding NEO-6785 added encoding of number of barriers
to specific value representation depending on hardware that we program for.

In patch token format encoding of number of barriers is sent via
hasBarriers field in a token.
In zebin true number of barriers is sent via barrier_count field in
zeInfo.

To remove this discrepancy, translate encoded number of barriers into
true number of barriers in legacy format.

Resolves: NEO-6785

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-04-12 09:44:10 +02:00
Krystian Chmielewski 01a719cf33 Allow for zebin rebuild when IR is present
This commits adds rebuilding zebin binary.
If zebin is built for different device and has SPIRV, then new ze binary
will be built using SPIRV.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-04-12 08:05:25 +02:00
Daria Hinz ce645f13b7 Encode PRODUCT_CONFIG value into fatbinary
Change modifies the encoding entry in fatbinary for platforms.
If numbering in -device is used, the value PRODUCT_CONFIG will be encoded.
The functionality that returns the correct product config values has
also been added.

Related-To: NEO-6744
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2022-04-11 15:09:17 +02:00
Compute-Runtime-Validation 64d3f95410 Revert "Allow for zebin rebuild when IR is present"
This reverts commit 2ae3f3e521.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-04-06 23:17:22 +02:00
Krystian Chmielewski 2ae3f3e521 Allow for zebin rebuild when IR is present
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-04-05 10:25:06 +02:00
Kacper Nowak afd71beee9 Add slm_alignment entry to .zeInfo payload_arguments section
This commit adds suport for parsing "slm_alignment" entry in .ze_info
section.
- Set requiredSlmAlignment for addresing mode slm
- Enable optional passed slm alignment parsing (with default value=16
left).

Related-To: NEO-6817
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-03-31 12:00:16 +02:00
Kacper Nowak 1b6a907b13 Code refactor
This commit:
- Optimizes usage of std::unordered map
- Corrects variables naming and output messages
- Minor changes in using std::string methods
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-03-23 23:12:21 +01:00
Kacper Nowak 50aeae41bf Remove custom _PATCH_TOKEN_GLOBAL_HOST_ACCESS_TABLE definition
This commit removes custom definition of
_PATCH_TOKEN_GLOBAL_HOST_ACCESS_TABLE and
instead uses one provided by IGC.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-03-21 10:44:27 +01:00
Kacper Nowak 86434e485d Move PATCH_TOKEN_GLOBAL_HOST_ACCESS_TABLE to kernel scope tokens
This commit moves patch token with global host access table to the
kernel scope from the program scope.

Related-To: NEO-6734
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-03-16 12:58:25 +01:00
Krystian Chmielewski 1b4319fdab Update zebin note target metadata
This commit removes ZebinTargetMetadata struct, and uses
ZebinTargetFlags for both target validations: via machine type, and
via intel gt notes.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-03-10 16:47:01 +01:00