Commit Graph

150 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
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
Daria Hinz 4d359b5eef fix: Support multiple option settings in ocloc
If ocloc is given -options several times, the variable is overwritten.
This change allows the user to add additional options multiple times.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2023-01-20 12:10:21 +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
Kamil Kopryk 232b886056 Rename HwInfoConfig to ProductHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-14 14:39:52 +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
Kamil Kopryk 785b9eeece Rename CompilerHwInfoConfig -> CompilerProductHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-05 11:25:49 +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
Krystian Chmielewski b435c061c7 fix ocloc test
Add handling for 32bit elfs in ocloc tests.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-11-08 13:29:46 +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
Kamil Kopryk bf64769807 Remove not needed std::vector copies
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-11-07 23:25:14 +01:00
Compute-Runtime-Validation 83f63e0008 Revert "Ocloc - fix binary output filename with "-output_no_suffix""
This reverts commit 3ca628c388.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-11-03 21:28:39 +01:00
Mateusz Hoppe 3ca628c388 Ocloc - fix binary output filename with "-output_no_suffix"
Resolves: NEO-7474

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-11-03 18:27:02 +01:00
Mateusz Hoppe 8980b2b817 Ocloc: Remove unneeded code from generated cpp file
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-10-25 11:21:09 +02:00
Mateusz Hoppe 9c237d99ec Ocloc - Do not add "kernel-debug-enable" when "-g" is passed
Resolves: NEO-7436

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-10-25 08:55:55 +02:00
Kacper Nowak 553e194379 Ocloc: Enhance ocloc ULTs - ensure compatibility with zebin
This commit fixes ocloc ULT failure with zebin enabled by default.
Remove depencendy on precompiled binaries, instead use mock CTNI binary.

Related-To: NEO-7383
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-10-20 07:50:18 +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 3f61888912 Prepare ocloc tests for switch to zebin
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-09-16 12:44:59 +02:00
Mateusz Borzyszkowski c824bedc53 Add unit tests for gen file generation
gen file is not generated by default. We can get this file
by ocloc option -gen_file. This change add unit tests
for this option.

Related-To: NEO-5672

Signed-off-by: Mateusz Borzyszkowski mateusz.borzyszkowski@intel.com
2022-09-15 10:46:51 +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
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
Kacper Nowak 497e5a4765 Zebin: Create mock zebin module for L0 common test module
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-08-17 15:12:49 +02:00
Warchulski, Jaroslaw a6c1d9578e Move files between shared/test/common/helpers and shared/test/unit_test/helpersi
unit_test/helpers/cmd_buffer_validator.h -> common/helpers
unit_test/helpers/gtest_helpers.h -> common/helpers
common/helpers/blit_commands_helper_tests.inl -> unit_test/helpers
common/helpers/simd_helper_tests.inl -> unit_test/helpers
common/helpers/simd_helper_tests_pvc_and_later.inl -> unit_test/helpers
common/helpers/state_base_address_tests.h -> unit_test/helpers

Related-To: NEO-6524
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-08-10 15:23:12 +02:00
Warchulski, Jaroslaw e7cca25894 CMake: don't include shared/test/unit_test when shared tests are skipped 1/n
Related-To: NEO-6524
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-08-09 11:41:09 +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
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
Artur Harasimiuk 4bdd8860a1 test.h refactor
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-07-04 18:20:07 +02:00
Artur Harasimiuk a8e2bd3f98 hw_cmds.h usage cleanup
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-06-29 11:15:45 +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
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
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