Commit Graph

41 Commits

Author SHA1 Message Date
Daria Hinz 59109a08bb Switch device ID support to product config helper
This commit switches the device ID logic from the deprecated
to the new one, so that if the user passes a hex value to the -device
parameter, ocloc will use the new implementation in the product config
helper. The change also introduces a fix for setting the values in the
correct order to configure the hwIfno correctly.

Signed-off-by: Daria Hinz daria.hinz@intel.com
Related-To: NEO-7487
2023-02-03 16:55:41 +01:00
Kamil Kopryk cab4b956eb refactor: rename compiler product helper files
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-02-03 09:03:24 +01:00
Kamil Kopryk 2484c7ceb2 refactor: rename hw_helper files to gfx_core_helper files
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-02-01 19:37:51 +01:00
Daria Hinz 14f5a61993 Fatbinary optimization for -device release target
This commit is to introduce optimizations in ocloc when building
targets for release and family.
Instead of building fatbinary after all available targets in
the RTL ID table, we introduce optimizations when there is an
acronym available for the platform in the DEVICE table,
we limit to them only.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-7582
2023-02-01 16:19:13 +01:00
Kamil Kopryk 7487d1450e Move CompilerProductHelper ownership to RootDeviceEnvironment and Ocloc
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-02-01 13:09:12 +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
Warchulski, Jaroslaw bf6dfa6b94 Fix for '-q' option in ocloc
Related-To: NEO-6425
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-02 11:37:00 +01:00
Compute-Runtime-Validation ef9a4fffcd Revert "Fix for '-q' option in ocloc"
This reverts commit e9f0cb30e7.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-11-16 06:27:31 +01:00
Warchulski, Jaroslaw e9f0cb30e7 Fix for '-q' option in ocloc
Related-To: NEO-6425
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-11-14 15:04:08 +01: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 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
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
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
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
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
Artur Harasimiuk dc78375d46 use test_files from source location in ults
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-05-20 14:20:13 +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
Patryk Wrobel 1d7b99140c Test buildFatBinary()
This change introduces ULTs for buildFatBinary() function.
It is intended to improve code coverage.

Related-To: NEO-6834
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-04-26 14:55:24 +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
Patryk Wrobel 14c9c57e0c Test buildFatBinaryForTarget()
This change contains ULTs for buildFatBinaryForTarget().
They are intented to cover untested code. Moreover,
the function signature has been changed to avoid copying
of std::vector of arguments.

Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-03-26 08:15:35 +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
Baj, Tomasz 2eb7ae7a8d ocloc accept underline and shorter gen names
Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
Related-To: NEO-6122
2022-02-14 14:55:30 +01:00
Daria Hinz c1eae01ce9 Remove duplicate product configs
In some cases, when a user passes -device in the form of
<major>.<minor>.<revision> (e.g. 12.0.0) ocloc requests fatBinary.
There is no need to duplicate compatible binaries.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2022-02-10 11:44:06 +01:00
Patryk Wrobel 53482e6821 Allow ocloc to link files
Added 'link' option to ocloc CLI, which allows linking of
several IR files to single output file. Supported formats
of output file are ELF and LLVM BC.

Related-To: NEO-6163
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-01-14 16:18:36 +01:00
Daria Hinz 9bc04dcd9f Add support for LKF in Product Config
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2021-12-16 15:31:34 +01:00
Daria Hinz 0aeca8df22 New numerical approach to platforms in ocloc
For AOT feature, a new approach to passing
the -device arg to ocloc is implemented.
New character: <Major>.<Minor>.<Revision>

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-5954
2021-12-15 13:02:12 +01:00
lgotszal 3bd4bca911 Copyright header update
Dates corrected in copyright headers to reflect original publication date
(2018 for OpenCL, 2020 for Level Zero).

Signed-off-by: lgotszal <lukasz.gotszald@intel.com>
2021-05-17 20:38:19 +02:00
Kacper Nowak e5a1d33a2b Fix ocloc fatbinary for better gen/sku detection
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2021-04-26 12:10:03 +02:00
Artur Harasimiuk cee785f8a1 ocloc refactor
Related-To: NEO-5538
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2021-03-29 14:48:29 +02:00
Adam Cetnerowski 7bfa71636a ULT renaming: Ocloc tests
Related-To: NEO-2236

Signed-off-by: Adam Cetnerowski <adam.cetnerowski@intel.com>
2020-12-15 08:48:17 +01:00
Filip Hazubski c3b8727e97 Remove opencl includes from HwHelper
Resolves: NEO-3964

Change-Id: Ie891ba6a205a89b41ca2cce0fa386dc4c93a0aaa
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-10-23 11:10:52 +02:00
Jaroslaw Chodor d65cdab453 Zebin - yaml parser
Change-Id: If8b5bcd68b7d39bfd3fb53b619f5de973b059bff
2020-07-30 07:26:44 +02:00
Konstanty Misiak 0ca7e5b5ae Fix ocloc -device option
Related-To: NEO-4782

Change-Id: I2e7752a4f9f1bdf4cc1c45549e39139d8e77b89f
Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
2020-07-03 11:51:58 +02:00
chmielew 3976614bd5 ocloc - log output
Change-Id: I2a61b392e05033f963e502a90fe608b742c179a9
2020-03-24 15:01:58 +01:00
chmielew e28419fc91 moving ocloc to shared folder
Change-Id: Ic739cf747f7e6fae2c0cd57f0bc1aa0899d3aa53
2020-02-27 18:46:00 +01:00
Mateusz Jablonski 9dbeeea18f Clang-format: restore sorting includes
Change-Id: I34eb993b562c77f56d8fbd51a02ee266c1f76678
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-24 10:22:30 +01:00
Mateusz Jablonski 7df9945ebe Add absolute include paths
Change-Id: I67a6919bbbff1d30c7d6cdb257b41c87bad51e7f
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-23 23:49:12 +01:00
Mateusz Jablonski 370424a1e0 Change core inlcudes
Change-Id: Iaec903af420f0a92f7d86e484c83300fb9c531ad
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-23 18:46:50 +01:00
kamdiedrich e8852a68c4 Reorganization directory structure [2/n]
Change-Id: I47962d17d755e80dcd9476e1ed75560f433f6115
2020-02-23 12:01:27 +01:00