Commit Graph

36 Commits

Author SHA1 Message Date
Marcel Skierkowski 5d01677454 refactor: Mock file system in ULTs
Functions: fileExists and loadDataToFile
use IO functions from namespace IoFunctions

Now tests that use these functions
are mocked by default,
but some still require access to real files
and have been restored the ability to read files.
They will be mocked in next PRs.

Related-To: NEO-7006
Signed-off-by: Marcel Skierkowski <marcel.skierkowski@intel.com>
2025-04-09 19:51:46 +02:00
Mateusz Jablonski cfd5f0c9b3 fix: use .spv for intermediate representation
Related-To: NEO-7785
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-06-11 12:06:57 +02:00
Compute-Runtime-Validation f4106ca44c Revert "fix: use .spv for intermediate representation"
This reverts commit 6c9bca8cdc.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-06-11 05:57:05 +02:00
Mateusz Jablonski 6c9bca8cdc fix: use .spv for intermediate representation
Related-To: NEO-7785
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-06-10 15:38:50 +02:00
Fabian Zwolinski 52430762ac fix: cl_cache L0 env vars + refactor code structure
Added support for new Compiler Cache
environment variables in Level Zero.

Moved
`opencl/source/compiler_interface/default_cache_config.cpp`
`level_zero/core/source/compiler_interface/default_cache_config.cpp`
to shared directory
`source/compiler_interface/default_cache_config.cpp`

Switched enabling cache by default from per OS to per API.
Changed default state of cl_cache in Level Zero to disabled.

Related-To: NEO-10045
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2024-03-01 17:35:08 +01:00
Compute-Runtime-Validation fb46066abc Revert "fix: enable cache env variables for level-zero"
This reverts commit 743904d2df.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-01-31 08:33:05 +01:00
Fabian Zwolinski 743904d2df fix: enable cache env variables for level-zero
Related-To: NEO-10045
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2024-01-30 14:01:42 +01:00
Mateusz Jablonski a6458433dc refactor: correct naming of enum class constants 9/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-19 10:36:25 +01:00
Jablonski, Mateusz 8b682a6bcb fix: fix compilation error in clang on Windows (3/n)
Related-To: NEO-9248
Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
2023-10-25 17:38:56 +02:00
Fabian Zwolinski d7d577ba48 feature: enable cl_cache by default on Windows
Related-To: NEO-8092
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-10-03 16:57:10 +02:00
Compute-Runtime-Validation 65337482ff Revert "feature: enable cl_cache by default on Windows"
This reverts commit e16220dc9f.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-09-26 15:06:34 +02:00
Fabian Zwolinski e16220dc9f feature: enable cl_cache by default on Windows
Related-To: NEO-8092
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-09-25 14:40:43 +02:00
Fabian Zwolinski e96dd344c3 feature: add new environment variables for compiler cache on Windows
Changes:
- replaced registry keys with environment variables
for cl_cache in OCL
- added compiler cache helpers
- implemented support for new env vars on Windows
- added tests

New env vars mechanism works as follows:
If `PERSISTENT_CACHE` is set,
driver checks if `NEO_CACHE_DIR` is set.
If `NEO_CACHE_DIR` is not set,
driver uses `%LocalAppData%\NEO\neo_compiler_cache`
as `cl_cache` destination folder.
If `NEO_CACHE_DIR` is not set and `%LocalAppData%`
path could not be obtained,
compiler cache is disabled.

In the current Windows implementation,
special characters in the folder path are not supported.

Related-To: NEO-8092
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-09-21 12:40:48 +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
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
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
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
Pawel Cieslak 31d68c42e6 fix mismatched-new-delete when using unique_ptr
Related-To: NEO-6511
Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
2023-02-14 08:07:13 +01:00
Warchulski, Jaroslaw 1ad4b81b28 Cleanup includes 30
Cleaned up files:
opencl/test/unit_test/fixtures/cl_device_fixture.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-13 08:22:14 +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
Baj, Tomasz 625f88d64d Move API specific logic directly to getDefaultCompilerCacheConfig function
Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
2022-10-04 10:25:08 +02:00
Mateusz Jablonski bca852617c Remove usage of TestLegacy from opencl tests
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-08-16 22:16:48 +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
Fabian Zwolinski 3d8effcd69 Clean-Up unused code related to GMock
This commit:
- Removes usings e.g. ::testing::Return
- Removes unnecessary gmock inclues
- Replaces Gmock macros (e.g. EXPECT_THAT) with our custom implementations

Related-To: NEO-4941
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2022-03-22 16:16:34 +01:00
Mateusz Jablonski e4bbed49d0 Use full path to include test.h 1/n
fix files in opencl

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-12-15 12:34:34 +01:00
Mateusz Jablonski c83828be6c Move compiler interface tests to shared tests
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-11-25 12:35:06 +01:00
Mateusz Jablonski 664b33787d Move appending compiler extensions to compiler parser
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-20 16:10:54 +02:00
Mateusz Jablonski aa0cb7a8bf Add ult specific config to neo_shared_tests
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-12 08:55:47 +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
Pawel Cieslak fb821f21f5 Cmake format script
Related-To: NEO-1157

Change-Id: Ie1b907e838cfb9ad0d75cc8971d415f7c77103c9
Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
2020-08-19 16:36:30 +02:00
Konstanty Misiak a3a1f49dc0 Move shared tests to the new target [2/n]
Change-Id: I6d4f955adfecccc8c33ffa7a6c36605ccf5ab7a4
Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
2020-05-28 14:21:35 +02:00
Konstanty Misiak 8d65ab4ce4 Move shared tests to the new target [1/n]
Change-Id: I2101864b190f2672e8c71430bda0d30d345c9d8f
Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
2020-05-26 15:07:05 +02:00
kamdiedrich e8852a68c4 Reorganization directory structure [2/n]
Change-Id: I47962d17d755e80dcd9476e1ed75560f433f6115
2020-02-23 12:01:27 +01:00