Commit Graph

144 Commits

Author SHA1 Message Date
Dunajski, Bartosz 5266a95c03 Debug flag to control auto grf mode
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-11-10 19:25:58 +01:00
Warchulski, Jaroslaw ef95bfb45e Cleanup includes
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-11-04 18:04:13 +01:00
Luzynski, Sebastian Jozef 91c69e0fe7 Patch global variables and constants once
This change replaces mechanism of patching global constants and
variables in kernel per relocation to patching them only once. This
would improve linking time performance for kernels with multiple global
symbols.

Signed-off-by: Luzynski, Sebastian Jozef <sebastian.jozef.luzynski@intel.com>
2022-11-03 17:45:09 +01:00
Dunajski, Bartosz 7ff37cd5fd Ftr/WA flags cleanup
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-10-26 12:11:31 +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
Dunajski, Bartosz ad2d3d0289 Remove not used method
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-10-05 17:10:51 +02:00
Kacper Nowak 65f7ff2027 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.
- Due to conflict, do not automatically append source path when
CMC compiler is used.
- Minor code refactor: use defined compiler options instead of local
strings; wrap filename in quotes (in case of space-separated filename
string).

Related-To: NEO-7285
Signed-off-by: Kacper Nowak kacper.nowak@intel.com
2022-10-04 14:49:53 +02:00
Compute-Runtime-Validation ab8579a6c2 Revert "Ocloc: Add -s to options string for non-spirv input with -g option pa...
This reverts commit 963930925a.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-09-30 13:11:46 +02:00
Kacper Nowak 963930925a 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.
- Due to conflict, do not automatically append source path when
CMC compiler is used.

Related-To: NEO-7285
Signed-off-by: Kacper Nowak kacper.nowak@intel.com
2022-09-29 18:48: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
Dunajski, Bartosz b2001bf265 L0: GRF mode debug flags support
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-09-22 15:27:31 +02:00
Krystian Chmielewski 09bf464327 Add option to disable zebin in ocloc
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-09-13 14:36:54 +02:00
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