Commit Graph

102 Commits

Author SHA1 Message Date
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
Kacper Nowak c5ff07237b Patchtokens: Add support for querying device globals by host name
This commit enables parsing symbol infos
passed in the PATCH_TOKEN_PROGRAM_SYMBOL_TABLE patchtoken.
Related-To: NEO-6734
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-03-04 14:38:19 +01:00
Krystian Chmielewski 0ccce5a6d7 Zebin: set kernel barriers based on ext funcs
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>
2022-03-04 14:21:50 +01:00
Kacper Nowak 38086029ed Zebin: Add support for querying device globals by host name
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>
2022-03-03 13:13:22 +01:00
Konstanty Misiak cf1bc3a2ba Disable EU fusion based on kernel properties from compiler
Related-To: NEO-6633

Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
2022-02-28 18:50:38 +01:00
Mateusz Jablonski 82e3b10c5a Fix typo
Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-25 18:10:41 +01:00
Katarzyna Cencelewska 93efb2c63f Move DATA_PARAMETER_CHILD_BLOCK_SIMD_SIZE to ignore
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-02-25 10:29:58 +01:00
Mateusz Jablonski 3b7fbef826 Handle implicit args buffer info in zebin
Related-To: NEO-5081, IGC-4710
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-24 19:43:21 +01:00
Mateusz Jablonski 292f16d423 Remove handling of DATA_PARAMETER_LOCAL_ID_BUFFER
Related-To: NEO-5081, IGC-4710
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-24 15:14:06 +01:00
Kacper Nowak 447c40cec0 Fix generating localIDs in zebin
This commit fixes generating localIDs in zebin.
With thix fix, Emit Local in compute walker will be set accordingly with
the size of local_id argtype (currently, Emit Local is set to Emit None,
which prevents generating local IDs).

Related-To: NEO-6089
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-02-23 16:51:55 +01:00
Katarzyna Cencelewska 7d2d5e5792 Add to decodeToken debugPrintf when ignored token
set as ignored token PATCH_TOKEN_INTERFACE_DESCRIPTOR_DATA

Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-02-23 13:37:05 +01:00
Mateusz Jablonski 8860fcc868 Handle patch token for implicit args buffer
Related-To: NEO-5081, IGC-4710
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-23 12:04:54 +01:00
Compute-Runtime-Validation faba32daf0 Revert "Fix generating localIDs in zebin"
This reverts commit 441fe1f589.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-02-23 06:33:33 +01:00
Katarzyna Cencelewska 4994eb18c2 Remove device side enqueue info from kernel descriptor
Related-To: NEO-6559
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-02-22 14:18:44 +01:00
Kacper Nowak 441fe1f589 Fix generating localIDs in zebin
This commit fixes generating localIDs in zebin.
With thix fix, Emit Local in compute walker will be set accordingly with
the size of local_id argtype (currently, Emit Local is set to Emit None,
which prevents generating local IDs).

Related-To: NEO-6089
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-02-21 18:20:05 +01:00
Kacper Nowak cd9cc53159 Correct setting usesStringMap flag in printf
This commit fixes setting usesStringMap flag for printf, taking into
account using indirect functions in legacy (non-zebinary) path. It also
adds new field to kernelDescriptor, specifying the binary type
(legacy/zebin).

Related-To: NEO-6604
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-02-15 15:39:10 +01:00
Patryk Wrobel 6ac6db7b04 Store single generic IR in fatbinary when built from SPIR-V input
This change prevents embedding identical SPIR-V section for each
target requested in fatbinary build. Instead of duplicating SPIR-V,
a new file called 'generic_ir' is added to AR archive. It contains
SPIR-V, which was used to build fatbinary. Build fallback in runtime
has been also adjusted - if 'generic_ir' file is defined in fatbinary
and there is no matching binary, then this generic SPIR-V is used to
rebuild for the requested target.

Additionally, MockOclocArgumentHelper::loadDataFromFile() was adjusted
to ensure null-termination of returned strings.
This change also removes possible undefined behavior, which was
related to reading names of files from AR archive. Previously,
if filename was shorter than requested target name, we tried to
read more memory than allowed.

Related-To: NEO-6490
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-02-14 15:30:46 +01:00
Krystian Chmielewski d49c5d6185 OCL: Set target device product family
In OCL product family of target device is not set
which leads to a fail on validating target device in
ZEBin path.
This change adds function that sets all
necessary fields based on provided hardware info.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-02-08 16:49:28 +01:00
Compute-Runtime-Validation 6f62a784e1 Revert "Check IndirectStatelessCount from igc"
This reverts commit 5e62df4f8e.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-02-04 12:15:37 +01:00
Dominik Dabek 5e62df4f8e Check IndirectStatelessCount from igc
If kernel has no stateless indirect accesses don't set the
kernelHasIndirectAccess flag.
Don't make resident or migrate if kernel has no indirect accesses.
Changed initial values in KernelAttributes.

Related-To: NEO-6597

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-02-02 12:28:30 +01:00
Dominik Dabek 07c75c2de3 Revert "Check IndirectStatelessCount from igc"
This reverts commit 01f368ac147d99fd0dcb4d71a9a2543cd215adfd.

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-01-27 16:06:13 +01:00
Igor Venevtsev af7a475cb0 Fix debug zebin creation
- ELF type is EXEC
- Absolute GPU addresses in program headers as load addresses
- All relocations are applied (not only for debug info as before)
- Default section alignment for debug zebin is set to 4,
this fix the problem with .notes section parsing

Related-To: NEO-5571
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2022-01-26 13:55:32 +01:00
Dominik Dabek 63f406a58c Check IndirectStatelessCount from igc
If kernel has no stateless indirect accesses don't set the
kernelHasIndirectAccess flag.
Don't make resident or migrate if kernel has no indirect accesses.
Changed initial values in KernelAttributes.

Related-To: NEO-6597

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-01-26 11:10:04 +01:00
Katarzyna Cencelewska 20f17f775e Remove device enqueue part 8
- remove hasDeviceEnqueue

Related-To: NEO-6559
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-01-19 11:16:35 +01:00
Kacper Nowak fc224202d6 Create debug zebin in OCL
This commit adds debug zebin creation in OCL.
- Added returning debug zebin in build/linking paths in OCL if
corresponding device binary format was detected.
- Refactored getZebinSegments() method - added common ctor for both
L0/OCL paths

Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-01-17 14:27:23 +01:00
Krystian Chmielewski 79c8605ed2 Fix checking required DSH Size
This change simplifies calculating required DSH Size
and replaces wrong debug break conditiong causing
debug assertion fails in many tests with simple
check "calculatedDSHSize > allocatedDSHSize".

Related-To: NEO-6077

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-01-15 00:24:46 +01:00
Krystian Chmielewski 325ae63d05 Sort program headers by virt addr
When encoding ELF binary sort program headers by
virtual addresses incrementally.
This change is needed for compatibility with GDB.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-01-11 13:23:59 +01:00
Krystian Chmielewski 9d5907c8d0 Debug zebin copy section header's flags
When creating debug ZEBinary copy section header's flags
from ZEBinary to debug binary.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-12-17 21:01:18 +01:00
Kacper Nowak 1c74eca1ae Add source offset entry for arg by value in zebin
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2021-12-17 16:45:49 +01:00
Jim Snow 2dfb7df63b Add RTDispatchGlobals allocation for ray tracing
If a kernel has ray tracing calls, we allocate and initialize
per-device RTDispatchGlobals if needed, and hand off pointer to
the same into a running kernel via an implicit parameter.

Related-To: NEO-5384
Signed-off-by: Jim Snow <jim.m.snow@intel.com>
2021-12-08 09:44:13 +01:00
Krystian Chmielewski 10acf9488b Zebin: accept .visaasm sections
Related-To:NEO-6456

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-12-03 14:03:48 +01:00
Kacper Nowak 2c3a1bf460 Make calcualting explicitArgs number independent of payloadArgs size
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2021-11-26 14:05:40 +01:00
Krystian Chmielewski 6519aa1822 ZEbin: add inline_data_payload_size field
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-11-23 11:22:04 +01:00
Krystian Chmielewski 8e57e48695 L0: Pass debug zebin to SLD
Added passing debug zebin to SLD.
Added support for .const.data.strings section in debug zebin creation.
Refactored debug zebin creation code.

Resolves: NEO-6246
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-11-18 11:38:23 +01:00
Mateusz Jablonski ec89b4eae7 Consume HasStackCalls info from IGC
Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-11-15 20:30:51 +01:00
Krystian Chmielewski 620484010d Zebin: Add test for default execEnv values
Added test checking population of Kernel Descriptor with default
execution environment values.
Sorting.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-11-10 17:36:25 +01:00
Krystian Chmielewski 06eaef0352 Zebin: Use strings section for printf
Resolves: NEO-6143

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-11-07 19:10:47 +01:00
Compute-Runtime-Validation 870b324d72 Revert "ZEBin: fix CTD passing when inline data is supported"
This reverts commit 125946e374.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-11-05 13:31:50 +01:00
Krystian Chmielewski 125946e374 ZEBin: fix CTD passing when inline data is supported
In zebin always pass inline data when it's supported.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-11-05 10:04:19 +01:00
Krystian Chmielewski bb77165f70 remove regex from yaml parser
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-10-29 15:11:48 +02:00
Krystian Chmielewski f20cdac7d3 Zebin: add support for has_dpas
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-10-28 09:59:21 +02:00
Krystian Chmielewski f164acad0b Allow whitespace before ] in inline collection
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-10-27 15:32:32 +02:00