Commit Graph

54 Commits

Author SHA1 Message Date
Mateusz Jablonski 2e872c1871 fix ocloc: don't fail when help parameter is passed to ocloc compile
https://github.com/intel/compute-runtime/issues/621

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-03-06 10:08:00 +01:00
Warchulski, Jaroslaw 0556d543a3 Cleanup includes 56
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-02-16 14:42:44 +01:00
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 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 4647180c76 refactor: remove platform type string
this property is no longer needed as we compile kernels per product family

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-01-04 13:48:16 +01:00
Compute-Runtime-Validation 5a6d358166 Revert "refactor: remove platform type string"
This reverts commit 58b443ecf1.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-01-04 11:08:51 +01:00
Mateusz Jablonski 58b443ecf1 refactor: remove platform type string
this property is no longer needed as we compile kernels per product family

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-01-04 09:26:29 +01:00
Compute-Runtime-Validation 4d2948d312 Revert "Use device ID from ProductConfigHelper"
This reverts commit 60a8bcb3d7.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-11-11 10:56:33 +01:00
Daria Hinz 60a8bcb3d7 Use device ID from ProductConfigHelper
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.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-7487
2022-11-08 12:40:54 +01: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
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
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 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
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 35a04e5915 Refactor and test initialization of FCL in ocloc
This change:
- extracts FCL to a separate class called OclocFclFacade
- tests the new class
- tests its usage in offline compiler

Related-To: NEO-6834
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-04-22 10:25:16 +02:00
Patryk Wrobel 303c12bc5b Refactor and test initialization of IGC in ocloc
This change:
- encapsulates initialization of IGC in a separate class
- removes code duplication from OfflineLinker and OfflineCompiler
- tests the new encapsulated class

Related-To: NEO-6834
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-04-19 12:15:34 +02:00
Patryk Wrobel 76349b8030 Improve code coverage of OfflineCompiler class
This change introduces unit tests related to
member functions of OfflineCompiler class.
OfflineCompiler::initialize() is not covered
and it will be added in a separate commit.

Related-To: NEO-6834
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-04-07 13:58:52 +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
Mateusz Borzyszkowski 64b8de3c1d Prepare offline compiler to add -gen_file option
Add dummy option to ocloc cmd. This is a preparation to add
a new option that will control dumping gen file.

Signed-off-by: Mateusz Borzyszkowski <mateusz.borzyszkowski@intel.com>
2022-02-16 13:10:33 +01:00
Compute-Runtime-Validation 1634ac9ec3 Revert "Dont generate gen file by default"
This reverts commit 95943dee0f.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-01-24 14:46:29 +01:00
Mateusz Borzyszkowski 95943dee0f Dont generate gen file by default
Ocloc can dump gen file when we add -gen_file flag to cmd.
Otherwise gen is not generated

Signed-off-by: Mateusz Borzyszkowski <mateusz.borzyszkowski@intel.com>
2022-01-17 18:14:50 +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
Kopryk, Kamil 7d18b845fa Remove not needed argument from appendExtraInternalOptions function
Signed-off-by: Kopryk, Kamil <kamil.kopryk@intel.com>
2022-01-03 10:35:47 +01:00
Dominik Dabek df2e31dbb0 Print ocloc options from file on fail if quiet
Currently if ocloc fails and options are read from file, no information
about them will be printed or logged if -q is passed.

With this change, ocloc will print options read from file on compilation
or initialization error.

Related-To: NEO-6002


Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2021-12-28 16:50:05 +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
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
Patryk Wrobel c324279bf5 Add support for exclusion of IR from binary generated by ocloc
Itroduces new parameter "-exclude_ir" to ocloc CLI.
This parameter can be used to reduce output binary size
when IR is not needed.

Related-To: NEO-6477

Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2021-12-08 16:11:54 +01:00
Kamil Kopryk 03540d5301 Refactor per platform extra settings in ocloc
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6382
2021-10-28 16:24:12 +02:00
Kamil Kopryk cfc673b77c Add compilerHwInfoConfig
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6237
2021-10-06 21:27:34 +02:00
Kamil Kopryk 9293c9b676 Use isMidThreadPreemptionSupported helper in compiler interface
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2021-09-09 18:17:09 +02:00
Krystian Chmielewski 73264c65d4 Ocloc return success when returning help
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-08-19 07:43:16 +02:00
Fabian Zwolinski b5d222f6cb Add query option description to help
Related-To: NEO-6031
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2021-08-10 13:33:26 +02:00
Krystian Chmielewski 75f8fbf82e Refactor ocloc query
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-08-06 14:12:45 +02:00
DmitryBushev 9e18416098 Add interface to extract versioning info
Appened ocloc interface with new 'query' feature.
Using this feature now one can extract HEAD hash and version of neo.

Signed-off-by: Bushev, Dmitry <dmitry.bushev@intel.com>
2021-06-29 13:17:15 +02: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
Bartosz Dunajski 646b551da0 Helper to override platform name
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-01-13 11:22:44 +01:00
Jaroslaw Chodor 78dc305291 Ocloc - emit warning on input type mismatch
Change-Id: I57edcbd3025616698dbe7710f04d975db93ffdb9
2020-11-02 20:00:15 +01:00
Kamil Kopryk 145fd87f5d Revert "Add adjustPlatformCoreFamilyForIgc helper"
This reverts commit 8fffdcc111.

Change-Id: I0415b004ef0a1465bc2658cadc66f21a99302eca
2020-09-08 07:36:26 +02:00
Kamil Kopryk 8fffdcc111 Add adjustPlatformCoreFamilyForIgc helper
Change-Id: Ic372e76c1024ca9e585bef15fab29827d33122f3
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-4865
2020-08-13 17:31:13 +02:00
Andrzej Swierczynski c2534697e8 Pass revision ID to ocloc
Related-To: NEO-4004

Change-Id: I4a76d14ba445ac8aaaa81279a0726071a6361eae
Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
2020-07-31 14:26:35 +02:00
Plewka, Maciej 48d990dfc9 Revert "Pass revision ID to ocloc"
This reverts commit 05990b628b.

Change-Id: I7213d5cb75d6e5657410773da8c7ff386c6bbf8a
2020-07-24 18:00:48 +02:00
Andrzej Swierczynski 05990b628b Pass revision ID to ocloc
Related-To: NEO-4004

Change-Id: I3586782f4996e518fe69a9b6e2a2ed22ad19258b
Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
2020-07-23 16:19:14 +02:00
Daria Hinz b79672e3f1 Cmd line option to generate only spirV file
Related-to: NEO-4678
Change-Id: I502aede9f6e0796c1319d9c242a8b9095253cb88
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2020-07-08 11:16:10 +02:00
Daria Hinz d00a663e63 Extract SpirV generation to separate build method
Related-to: NEO-4678
Change-Id: I8371172f786c6d4042755532b77603224264d61b
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2020-07-02 12:38:32 +02:00
Pawel Wilma 2e6fc92372 Initialize hwInfo in ocloc before passing it to IGC
Related-To: NEO-3735

Change-Id: Ice69f6b21b960bda8fe4aa9667bc03cc3dbbc086
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2020-07-01 09:34:01 +02:00