Commit Graph

220 Commits

Author SHA1 Message Date
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
Baj, Tomasz 0eab93501c Add cl_cache mechanism to ocloc
Related-To: NEO-6476

Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
2022-09-30 12:03:02 +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 af57d2bd38 refactor ocloc interface
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-09-29 13:25:58 +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
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
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
Wrobel, Patryk 334802c9ba Use correct format string in ocloc_validator
Signed-off-by: Wrobel, Patryk <patryk.wrobel@intel.com>
2022-09-06 12:25:19 +02:00
Warchulski, Jaroslaw 57da7ad307 Don't generate gen file by default
Related-To: NEO-6613
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-09-05 15:00:48 +02:00
Dominik Dabek 8cc0177f1c Change DG2 l1 cache policy to WB
With compiler LSC WAs this gives better performance.

If debugger is active, policy will not be changed ie.
will be WBP.

Related-To: NEO-7003

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-08-31 14:31:23 +02:00
Compute-Runtime-Validation 2621460e80 Revert "Change DG2 l1 cache policy to WB"
This reverts commit a820e73dd7.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-08-27 08:04:19 +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
Dominik Dabek a820e73dd7 Change DG2 l1 cache policy to WB
With compiler LSC WAs this gives better performance.

If debugger is active, policy will not be changed ie.
will be WBP.

Related-To: NEO-7003

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-08-26 12:58:45 +02:00
Dunajski, Bartosz 9763d42379 Fix type redefinition
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-08-24 09:45:13 +02:00
Daria Hinz ccb855de32 Add ids command info to ocloc
New ocloc ids <acronym> cmd has been added in NEO-7159,
but the addition of info has been omitted.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2022-08-22 16:31:24 +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
Kacper Nowak d213a8e8cd Ocloc: Enhance platforms support for disasm option
- Extend support for existing platforms [disasm option].
- Do not use deprecated core acronyms.
Related-To: NEO-7235
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-08-12 14:38:33 +02:00
Andrey Alekseenko cb18657cb8 Slightly improve "ocloc ids" output
- Add trailing newline, so the output looks nice in the terminal.
- "Uknown" -> "Unknown".

Signed-off-by: Andrey Alekseenko <al42and@gmail.com>
2022-07-28 11:48:58 +02:00
Daria Hinz 91a97dfaea Restore old device id design in ocloc
This change removes some of the logic related to
passing device id as an argument in ocloc introduced in
"Setting default device id for acronym".

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2022-07-19 15:55:13 +02:00
Kamil Kopryk aed26ec51d Add DisableForceToStateless debug flag
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-07-19 14:08:28 +02:00
Daria Hinz 01af53b63c Setting default device id for acronym
This PR includes:
- Move product config implementation from
ocloc arg helper to product config helper.
- Add default device id setting for each platform configuration.
- Add & move hw info config tests from opencl to shared

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-7112
2022-07-15 12:28:58 +02:00
Kamil Kopryk 7c538b956a Correct typo
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-07-14 10:13:12 +02:00
Daria Hinz ea2edbef3d Add ids command to ocloc
New command usage: ocloc ids <acronym>.
It will allow the user to query all matched
<major>.<minor>.<revision> for the specified acronym.
E.g.
ocloc ids dg1
Matched ids:
12.10.0

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-7159
2022-07-07 11:18:36 +02:00
Daria Hinz 789dd1900e Add -config flag to ocloc
Addition of a -config parameter that will allow
the user to set the number of EUs, slices etc.
Knowing these values during AOT can translate into performance.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2022-07-05 11:36:01 +02:00
Daria Hinz c9246d085d Support for AOT version in fat binary
AOT version (major.minor.revision) is one of
the supported variants for -device arg in ocloc.
In this change, version support has been added
when passing specific targets to -device using ",".

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2022-07-04 14:21:07 +02:00
Szymon Morek 76e023b941 Link build option with L1 cache policy helper
Related-To: NEO-7003

Add L1CachePolicyHelper struct.
This struct is resposible for L1 cache policy
in build option, Surface State and stateless
caching. Currently default option for all
platforms is WBP (write by-pass)


Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-07-04 11:49:55 +02:00
Artur Harasimiuk 4dff4e165c includes simplification
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-06-27 15:08:46 +02:00
Daria Hinz 74bca7f12e Support the uppercase device deprecated acronyms
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2022-06-27 13:15:38 +02:00
Krystian Chmielewski 0c523b412f feat(ocloc): concatenate multiple fat binaries
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-06-27 13:08:51 +02:00
Szymon Morek 9a26e505a8 Pass LSC policy to IGC in build options
Related-To: NEO-7003


Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-06-21 11:51:56 +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
Daria Hinz 2637ae5816 Ocloc: Support for various variants of acronyms
In addition to supporting the official -device acronyms
(e.g. xe-hpg), support for shorter and deprecated acronyms
has also been added.
An example of supported variances:
- xehpg
- xe_hpg
- xe_hpg_core

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-6910
2022-06-14 22:49:01 +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
Bartosz Dunajski 5510dc7daa Add adjustHwInfoForIgc support
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-06-13 14:31:53 +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
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
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
Artur Harasimiuk 819e0f5515 style: configure readability-identifier-naming.LocalVariableCase
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-05-16 12:39:44 +02:00
Daria Hinz de74becdb8 Base hwInfo values setup for AOT
In most cases, there was code redundancy, which was minimized in this change.
The setupHardwareInfoBase extraction will also be used for ocloc.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-6910
2022-05-13 09:40:37 +02:00
Krystian Chmielewski b4b1fb97bd Add default initializers for DeviceMapping members
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-05-12 15:04:33 +02:00
Daria Hinz 5ba56690f5 Revert "Set only base values in GT_SYSTEM_INFO for AOT"
This reverts commit b1f622d700.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2022-05-09 12:42:09 +02:00
Daria Hinz b1f622d700 Set only base values in GT_SYSTEM_INFO for AOT
In most cases, there was code redundancy, which was minimized in this change.
The setupHardwareInfoBase extraction will also be used in ocloc.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-6910
2022-05-04 10:36:26 +02:00
Kacper Nowak dd393d11a2 Ocloc: allow enforcing binary format specified by user
This commit adds ocloc option for specifying binary format.
When a --format flag is passed, the internal options will be changed
accordingly to the format specified (zebin/patchtokens) or a warning
will be printed if an unknown format will be passed.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-04-29 15:30:19 +02:00
Patryk Wrobel e3b1d8b43c Improve code coverage of BinaryDecoder
This change contains ULTs for BinaryDecoder.
It is intended to improve code coverage.

Related-To: NEO-6834
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-04-27 11:35:12 +02:00