Commit Graph

200 Commits

Author SHA1 Message Date
Fabian Zwolinski 0dd40b8616 refactor: Split compiler interface between OSs
Create new file:
`os_handle.h` which contains OS specific Handle type.
Add `shared/source/os_interface/<windows/linux>`
include directory to level_zero.

Related-To: NEO-8092
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-09-12 15:56:53 +02:00
Fabian Zwolinski 10675134e1 feature: Add process safety to Windows compiler cache
Related-To: NEO-8092

Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
Co-authored-by: Diedrich, Kamil <kamil.diedrich@intel.com>
2023-09-06 15:34:15 +02:00
Naklicki, Mateusz ff57bec1f0 fix: ignore subDeviceId token instead of skipping builtins resolve
Previous implementation skipped resolving the subDeviceId token, which
caused in returning the LinkedPartially status if token was present.
It could result in ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED when kernel
was created and crashing an app.

Related-To: NEO-6875, HSD-14015133115
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2023-09-05 16:26:44 +02:00
Kacper Kasper 269cba1659 feature: enable cl_cache by default on Linux
Resolves: NEO-4262

Signed-off-by: Kacper Kasper <kacper.k.kasper@intel.com>
2023-09-01 15:13:13 +02:00
Kacper Kasper abfed5a762 fix: add specialization constants to cache hash in spirv path
Related-To: NEO-4262

Signed-off-by: Kacper Kasper <kacper.k.kasper@intel.com>
2023-09-01 14:04:59 +02:00
Compute-Runtime-Validation 377d886c77 Revert "feature: enable cl_cache by default on Linux"
This reverts commit eeb8a5e1fb.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-09-01 04:58:52 +02:00
Kacper Kasper eeb8a5e1fb feature: enable cl_cache by default on Linux
Resolves: NEO-4262

Signed-off-by: Kacper Kasper <kacper.k.kasper@intel.com>
2023-08-31 15:52:11 +02:00
Kacper Kasper ba4867c3d0 fix: compiler cache file extension and path creation
* When env variables did not have trailing slash, directory creation
could fail.
* If .cache in $HOME did not exist cache would have been disabled.

Signed-off-by: Kacper Kasper <kacper.k.kasper@intel.com>
2023-08-31 13:44:19 +02:00
Kacper Kasper 996c261430 fix: OclocIgcFacade->getIgcRevision() could return nullptr
* Make sure igcRevision is always initialized.
* Improve coverage.

Signed-off-by: Kacper Kasper <kacper.k.kasper@intel.com>
2023-08-31 12:57:27 +02:00
Naklicki, Mateusz 20862ad8fd fix: resolve builtins depending on the product
Related-To: NEO-6875
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2023-08-29 15:25:08 +02:00
Kacper Kasper 991febcdf4 fix: extend cache hash with compiler commit sha, lib size and mtime
Related-To: NEO-4262

Signed-off-by: Kacper Kasper <kacper.k.kasper@intel.com>
2023-08-22 15:28:57 +02:00
Compute-Runtime-Validation f4d05a8e6b Revert "fix: Add missing fp64 extensions in caps initialization"
This reverts commit 22a719d62f.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-07-31 13:43:23 +02:00
Fabian Zwolinski 22a719d62f fix: Add missing fp64 extensions in caps initialization
In a scenario where fp64 emulation is both supported and enabled,
we want to include 2 additional extensions:
- cl_khr_fp64 to deviceExtensions
- __opencl_c_fp64 to openclCFeatures (OpenCL ver. 3.0)

Related-To: NEO-7611
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-07-28 21:29:30 +02:00
Katarzyna Cencelewska 6e93dd8068 fix: add check for igc compatibility without checking icbe
Related-To: NEO-7904
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2023-05-29 10:52:21 +02:00
Diedrich, Kamil 5a4a2ab8ab feature: Add new environment variables for compiler cache
This patch add new environment variables to control compiler cache.
Works as follow: If persistent cache is set driver check if NEO_CACHE_DIR
is set. If not then driver checks XDG_CACHE_HOME - If exists
then driver create neo_compiler_cache folder, if
not then driver checks HOME directory. If each NEO_CACHE_DIR,
XDG_CACHE_HOME and HOME are not set then compiler cache is disabled.
Current support is for Linux only.

Signed-off-by: Diedrich, Kamil <kamil.diedrich@intel.com>

Related-To: NEO-4262
2023-05-12 10:21:27 +02:00
Diedrich, Kamil 5149d74141 refactor: Remove globaly enabled cl_cache
Current behaviour will be detecd path existence

Related-To: NEO-4262

Signed-off-by: Diedrich, Kamil <kamil.diedrich@intel.com>
2023-04-28 23:28:49 +02:00
Fabian Zwolinski cbce863dc2 refactor: Rename member variables to camelCase 3/n
Additionally enable clang-tidy check for member variables

Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-04-28 16:01:14 +02:00
Cencelewska, Katarzyna 861ec524c6 fix: check icbe version only once when patchtoken
- set by default flag ZebinIgnoreIcbeVersion to true
- for zebin icbe version check is only inside flag
- only when use patchtoken then check icbe version is mandatory

Resolves: NEO-7904
Signed-off-by: Cencelewska, Katarzyna <katarzyna.cencelewska@intel.com>
2023-04-28 09:26:02 +02:00
Diedrich, Kamil 26ca64bb28 Add process safety to cl_cache on Linux
Current flow will be to have one synchronization point
config.file. Read remains unblocking, only write(caching)
operation will be blocking (lock on config.file)

Related-To: NEO-4262

Signed-off-by: Diedrich, Kamil <kamil.diedrich@intel.com>
2023-04-25 17:35:40 +02:00
Maciej Plewka 730578112f Report cl_khr_integer_dot_product extension
Related-To: NEO-6206

With this commit OpenCL will report cl_khr_integer_dot_product extension
in version 2. With all properties enabled.

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2023-04-14 14:46:18 +02:00
Compute-Runtime-Validation 6357ab73ea Revert "Report cl_khr_integer_dot_product extension"
This reverts commit 31983ec043.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-04-06 14:38:45 +02:00
Maciej Plewka 31983ec043 Report cl_khr_integer_dot_product extension
Related-To: NEO-6206

With this commir OpenCL will report cl_khr_integer_dot_product extension
in version 2. With all properties enabled.

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2023-04-05 20:28:00 +02:00
Young Jin Yoon 3f6443edfb Change allowZebin to enableZebin for apiOptions
Changed -cl-intel-allow-zebin to -cl-intel-enable-zebin only for
API options.

Related-To: NEO-7801

Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2023-03-30 12:46:10 +02:00
Mateusz Jablonski dd39b822d3 feature implicit args: patch rt dispatch global array in implicit args buffer
handle has_rtcalls in kernels and functions in zebin

Related-To: NEO-7818
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-03-28 12:31:38 +02:00
Mateusz Jablonski 028e1bb1b6 fix ocloc: define extensions in one place
unify exposed device extensions between OCL and ocloc

Related-To: NEO-7800
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-03-15 11:14:46 +01:00
Fabian Zwolinski 6c59953072 Add FP64 emulation support for ATS-M
This patch adds FP64 emulation support for ATS-M.
Introducing new environment variable - NEO_FP64_EMULATION - which provides
an option to allow the opt-in emulation of FP64.
When emulation is enabled, we pass -cl-fp64-gen-emu (ocl) /
-ze-fp64-gen-emu (L0) as an internal option to IGC.

Related-To: NEO-7611
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-03-07 14:21:01 +01:00
Jaroslaw Chodor f7cf09d195 fix(ocl) fixing race condition in createFclTranslationCtx
In rare case of multiple threads trying to set fclBaseTranslationCtx,
there was a potential for use after free (double delete) on
std::unique_ptr::reset.

Resolves: NEO-7767

Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2023-03-06 16:47:18 +01:00
Krystian Chmielewski 58d3f892a9 refactor(zebin): move files to seperate directory
* Moved zebin related files to zebin directory.
* Moved zebin related code to Zebin namespace.
* Separated zeInfo from zebin elf.
* Seperated zeInfo decoding from zebin decoder.
* Refactored populateKernelPayloadArgument function.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2023-03-03 21:48:19 +01:00
Compute-Runtime-Validation 84a7438ff2 Revert "refactor(zeInfo): move zeinfo to seperate file"
This reverts commit e3ce887662.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-03-03 11:56:52 +01:00
Krystian Chmielewski e3ce887662 refactor(zeInfo): move zeinfo to seperate file
* Moved zebin related files to zebin directory.
* Separated zeInfo from zebin elf.
* Seperated zeInfo decoding from zebin decoder.
* Refactored populateKernelPayloadArgument function.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2023-03-02 12:46:56 +01:00
Krystian Chmielewski 5caf7f7290 feat(linker): allow use of local symbols
This commit adds support for handling local symbols.
* Added 2 fields to SymbolInfo - binding, and associated
instructions segment id.
* Simplified code for decoding elf symbols and relocations.
* Simplified code for patching instruction segments.
* Changed logic of decodeElfSymbolTableAndRelocations:
* Add every global symbol to symbol map.
* Add any local symbol used by relocation to symbol map.
* Changed logic of link:
* After performing relocations remove local symbols from map.
* Replaced UNRECOVERABLE_IF with returning error.
* Removed LocalSymbolInfo structure used before for local kernel jumps.
* Removed old tests.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2023-03-02 12:39:21 +01:00
Kacper Kasper aece8195eb Add support for cl_ext_float_atomics
Resolves: NEO-6596

Signed-off-by: Kacper Kasper <kacper.k.kasper@intel.com>
2023-02-28 10:26:48 +01:00
Compute-Runtime-Validation a7075f9ffb Revert "Add support for cl_ext_float_atomics"
This reverts commit da22e0aac9.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-02-23 22:27:49 +01:00
Kacper Kasper da22e0aac9 Add support for cl_ext_float_atomics
Resolves: NEO-6596

Signed-off-by: Kacper Kasper <kacper.k.kasper@intel.com>
2023-02-22 18:08:58 +01:00
František Zatloukal beaff2b735 Include cstdint to fix GCC 13 build
Signed-off-by: František Zatloukal <fzatlouk@redhat.com>
2023-02-22 08:02:49 +01:00
Warchulski, Jaroslaw 8c17313c8b Cleanup includes 53
Cleaned up files:
opencl/source/mem_obj/image.inl
shared/offline_compiler/source/decoder/zebin_manipulator.h
shared/source/aub_mem_dump/aub_alloc_dump.h
shared/source/compiler_interface/intermediate_representations.h
shared/source/helpers/blit_commands_helper_base.inl
shared/source/utilities/debug_file_reader.h
shared/source/utilities/software_tags.h
shared/source/xe_hpc_core/hw_cmds_pvc.h

Related-To: NEO-5548

Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-02-15 13:21:14 +01:00
Kacper Nowak 7790e208fd feat(zebin): Add support for ELF section type SHT_NOBITS
This commit adds support for parsing SHT_NOBITS zebin's ELF sections
(containing global/constant zero-initialized data).
- Correction: in CTNI path, do not add related symbol if surface has not
been allocated.

Related-To: NEO-7196
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-02-10 16:17:16 +01:00
Mateusz Jablonski 1c976f5110 test: move execution environment tests to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-02-03 11:03:18 +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
Compute-Runtime-Validation d0c0c60205 Revert "feat(zebin): Add support for ELF section type SHT_NOBITS"
This reverts commit fa03aa9a40.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-02-03 03:44:02 +01:00
Kacper Nowak fa03aa9a40 feat(zebin): Add support for ELF section type SHT_NOBITS
This commit adds support for parsing SHT_NOBITS zebin's ELF sections
(containing global/constant zero-initialized data).

Related-To: NEO-7196
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-02-02 14:54:51 +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
Kamil Kopryk 445706361d refactor: don't use global ProductHelper 14/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-27 14:51:12 +01:00
Warchulski, Jaroslaw fe8a6d98ad Cleanup includes 45
Cleaned up files:
opencl/source/api/api.h
shared/source/command_stream/csr_deps.h
shared/source/helpers/engine_node_helper.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-26 11:12:15 +01:00
Kamil Kopryk 235385abc9 refactor: Remove global CompilerProductHelper gettter 1/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-20 17:17:50 +01:00
Warchulski, Jaroslaw 0eac749fcc Cleanup includes 19
Cleaned up files:
opencl/source/api/cl_types.h
shared/source/compiler_interface/external_functions.h
shared/source/compiler_interface/linker.h
shared/source/device_binary_format/elf/elf.h
shared/source/helpers/preamble.h
shared/source/memory_manager/definitions/storage_info.h
shared/source/memory_manager/memory_manager.h
shared/source/memory_manager/os_agnostic_memory_manager.h
shared/source/program/program_info.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-03 11:02:05 +01:00
Warchulski, Jaroslaw a2fe929f0c Cleanup includes 18
Cleaned up files:
shared/source/command_stream/command_stream_receiver_hw.h
shared/source/compiler_interface/compiler_interface.h
shared/source/direct_submission/direct_submission_hw.h
shared/source/helpers/dirty_state_helpers.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-02 13:28:29 +01:00
Warchulski, Jaroslaw 7ae44268cb Cleanup includes 17
Cleaned up files:
shared/source/built_ins/sip.h
shared/source/compiler_interface/compiler_cache.h
shared/source/compiler_interface/compiler_interface.h
shared/source/device_binary_format/device_binary_formats.h
shared/source/helpers/timestamp_packet.h
shared/source/kernel/debug_data.h
shared/source/utilities/tag_allocator.h
shared/test/common/mocks/mock_device.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-02 10:59:08 +01:00
Kamil Kopryk 3c5b3d4bac Refactor: don't use global ProductHelper getter in shared files 2/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-29 09:50:06 +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