Commit Graph

132 Commits

Author SHA1 Message Date
Compute-Runtime-Validation 417746182c Revert "Ocloc: Add -s to options string for non-spirv input with -g option pa...
This reverts commit 301be3c21b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-09-09 05:42:13 +02:00
Kacper Nowak 301be3c21b Ocloc: Add -s to options string for non-spirv input with -g option passed
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>
2022-09-08 15:19:05 +02:00
Kacper Nowak 710c8cf5ef Linker: add support for symbols with local binding
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>
2022-09-08 14:50:29 +02:00
Dunajski, Bartosz 16d9000429 Add option to change GRF mode
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-09-06 13:00:17 +02:00
Patryk Wrobel 90ba50bf52 Warn when RAII lock returned from function is discarded
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>
2022-09-01 16:53:03 +02:00
Patryk Wrobel de3e5d4d69 Improve files of SipKernel class
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>
2022-08-29 15:18:11 +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
Patryk Wrobel 063bdc3fa6 Do not redundantly call std::to_string() multiple times
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>
2022-08-23 11:57:22 +02:00
Kacper Nowak 44d218e52e Linker: Add support for relocation type PerThreadPayloadOffset
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-08-16 19:14:27 +02:00
Kacper Nowak c046824c18 Linker: do not process relocations for symbols with unknown segment type
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>
2022-07-25 20:11:31 +02:00
Baj, Tomasz b450d3c20b Add cl_khr_device_uuid to extension list
Related-To: NEO-5681

Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
2022-07-18 12:28:04 +02:00
Mateusz Jablonski 7e144d73f6 Dont patch implicit args relocation to zero
IGC should set the value to zero by default

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-06-30 20:26:04 +02:00
Bartosz Dunajski 5510dc7daa Add adjustHwInfoForIgc support
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-06-13 14:31:53 +02:00
Daniel Chabrowski c303c218be Add missing pragma once in header files
Signed-off-by: Daniel Chabrowski <daniel.chabrowski@intel.com>
2022-06-07 16:19:11 +02:00
Filip Hazubski bd5dc1524c Enable cl_intel_split_work_group_barrier extension for all platforms
Related-To: NEO-6991, NEO-6993

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-05-24 14:28:02 +02:00
Compute-Runtime-Validation b48d4a87d2 Revert "Enable cl_intel_split_work_group_barrier extension for all platforms"
This reverts commit 4bb5a49eda.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-05-24 09:48:09 +02:00
Filip Hazubski 4bb5a49eda Enable cl_intel_split_work_group_barrier extension for all platforms
Related-To: NEO-6991, NEO-6993

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-05-23 17:26:36 +02:00
Fabian Zwolinski d69bf76282 Rename r_pod_cast function to safePodCast
Rename is necessary, because NEO uses camelCase convention for
function names.

Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2022-05-19 10:43:20 +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
Katarzyna Cencelewska 96e1eb7467 Move variables baseDieRev and baseDieA0Masked from xe_hpc to pvc
Pvc specific variables should be located in pvc struct

Related-To: NEO-6738
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-05-17 12:19:16 +02:00
Mateusz Jablonski 943ad0e1eb style: skip redundant unique_ptr::get function
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-05-10 13:22:40 +02:00
Mateusz Jablonski 188bf3c6fa Remove not needed relocation name for implicit args
Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-04-26 17:29:54 +02:00
Kamil Kopryk 7f08a9d993 Remove adjustHwInfoForIgc helper
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6738
2022-04-20 10:04:36 +02:00
Krystian Chmielewski 34ebcc9520 Zebin: Use addend in relocations
feat(zebin): Use addend from RELA sections when performing relocations.

Resolves: NEO-6898

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-04-19 09:19:26 +02:00
Krystian Chmielewski 6023a5b58e Zebin: don't fail when extfunc caller cannot be found
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>
2022-03-30 13:53:25 +02:00
Mateusz Jablonski c7e76ce109 Add support for a new relocation name for implicit args
Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-03-15 12:03:51 +01:00
Mateusz Jablonski 3e8a6680e2 Allow undefined symbols in symbol table for OCL
Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-03-09 10:32:15 +01:00
Kamil Kopryk 038d1d54fa Correct xe_hpc tests
Related-To: NEO-6631


Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-03-09 09:21:30 +01:00
Krystian Chmielewski 439389ae19 Do not resolve external functions when none passed
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>
2022-03-07 19:05:17 +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
Neil R Spruit fc11701422 LLVM IR removed from Compiler Link
Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2022-03-02 17:25:36 +01:00
Compute-Runtime-Validation c5c3e865f0 Revert "Fail build program on PVC with stateful accesses"
This reverts commit 9466113cef.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-02-14 18:55:14 +01:00
Kamil Kopryk 9466113cef Fail build program on PVC with stateful accesses
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>
2022-02-14 13:44:22 +01:00
Katarzyna Cencelewska 58055aecdf Remove device enqueue part 12
remove:
- debug flag ForceDeviceEnqueueSupport
- functions isDeviceEnqueueSupported, supportsDeviceEnqueue

Related-To: NEO-6559
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-01-28 13:38:34 +01:00
Bartosz Dunajski 90d85bee55 Remove ftrGT flags support
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-01-27 17:39:48 +01:00
Igor Venevtsev 71746a2fff Register zebin binary in L0 debugger
Related-To: NEO-5571

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2022-01-12 23:17:59 +01:00
Mateusz Jablonski 61e5e0687d Patch all implicit args relocations within every kernel
Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-01-11 14:34:28 +01:00
Kamil Diedrich 34856747b4 Add implementation for reading logical subDevice from builtin
Related-To: NEO-6258
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-01-11 13:06:15 +01:00
Dominik Dabek 24621e8d16 Add test for getMaxParameterSizeFromIGC
Test is using MockCompilerInterface

Related-To: NEO-4851

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2021-12-30 18:17:40 +01:00
Dominik Dabek 67fff7fc51 Rename igcFeWa to igcFtrWa
It references features and workarounds

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2021-12-29 11:52:43 +01:00
Dominik Dabek 300a971af3 Use igc interface to get max param size
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>
2021-12-28 16:10:05 +01:00
Kamil Diedrich 2bbe7438ce Revert "Add implementation for reading logical subDevice from builtin"
This reverts commit 901e1e71f95a8cd90611ed7cbd25705a14f38170.

Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-12-27 15:58:51 +01:00
Patryk Wrobel 3599e7aeda Add warning when device binary had to be recompiled
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>
2021-12-23 16:13:59 +01:00
Patryk Wrobel 09eefb4968 Unify used flags in case of IR exclusion
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>
2021-12-17 14:30:58 +01:00
Krystian Chmielewski 7e08e56d50 Zebin: allow undef symbols
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>
2021-12-13 15:31:56 +01:00
Kamil Diedrich 24c19509b3 Add implementation for reading logical subDevice from builtin
- 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>
2021-12-09 13:20:49 +01:00
Compute-Runtime-Validation b7cee61bde Revert "Fail build program in shared system USM + stateful access case"
This reverts commit 0ad8afc0b3.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-12-07 01:00:59 +01:00
Kamil Kopryk 0ad8afc0b3 Fail build program in shared system USM + stateful access case
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.
2021-12-06 15:10:16 +01:00
Mateusz Hoppe 8b233f7f45 Support for bindless mode in L0 - improvements
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>
2021-12-02 16:30:58 +01:00