Commit Graph

312 Commits

Author SHA1 Message Date
Lukasz Jobczyk 0e3397547c fix: Adjust waitpkg counter for non ulls light
Resolves: NEO-14866, HSD-18042153820

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-05-23 15:58:21 +02:00
Szymon Morek a2c41e4749 fix: add mock for staging buffer size
No need to allocate 2MB in unit tests.
This commit changes this size to 4KB.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-05-22 08:36:01 +02:00
Daniel Bermond e0362a7c39 build: add missing headers for GCC 15
For using fixed width integer types[1], the `<cstdint>`[2]
C++ header needs to be explicitly included with GCC 15 due
to changes[3] in libstdc++.

For details, see the documentation[4] about porting to GCC 15.

[1] https://en.cppreference.com/w/cpp/types/integer
[2] https://en.cppreference.com/w/cpp/header/cstdint
[3] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84
[4] https://gcc.gnu.org/gcc-15/porting_to.html#cxx

Signed-off-by: Daniel Bermond <dbermond@archlinux.org>
2025-05-19 15:31:32 +02:00
Lukasz Jobczyk 5cd5bbafc5 refactor: Split waitpkg params for ulls light and default
Related-To: NEO-14866

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-05-09 12:40:36 +02:00
Andrzej Koska 41c0546c45 fix: reset timestamps when userEvent is terminated
Related-To: NEO-14448

Signed-off-by: Andrzej Koska <andrzej.koska@intel.com>
2025-05-06 10:28:35 +02:00
Compute-Runtime-Validation 3fa9229483 Revert "performance: copy misaligned leftover in staging"
This reverts commit 13610d3473.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-05-06 02:12:48 +02:00
Szymon Morek 13610d3473 performance: copy misaligned leftover in staging
Related-To: NEO-14646

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-05-05 16:56:27 +02:00
Lukasz Jobczyk 97358acabe fix: use mfence instead of sfence on discrete devices
Related-To: NEO-14642

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-04-25 13:32:25 +02:00
Lukasz Jobczyk 5d2b673ef6 fix: Adjust waitpkg threshold to 20 us
Resolves: HSD-13012958900

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-04-23 10:46:22 +02:00
Fabian Zwoliński 204577a91f fix: disable TimestampPoolAllocator
Related-To: NEO-12287, HSD-13012945876
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
2025-04-18 11:30:35 +02:00
Chodor, Jaroslaw a855ce019e refactor: pass underlying allocator by ref
Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
2025-04-17 10:43:21 +02:00
Chodor, Jaroslaw 7744251995 refactor: explicit copy/move operations in OpaqueElementAllocator
Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
2025-04-16 10:10:05 +02:00
Jaroslaw Warchulski 3e1aa33924 refactor: cleanup headers
Related-To: NEO-5548
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
2025-04-14 14:59:40 +02:00
Marcel Skierkowski b75fbe8e2c refactor: mock filesystem in ocloc ult pt.1
Mocked IO operations in ./ocloc_tests application

Mocked gtest stdout capture in ocloc tests

Related-To: NEO-14084
Signed-off-by: Marcel Skierkowski <marcel.skierkowski@intel.com>
2025-04-08 16:08:42 +02:00
Szymon Morek ff1dcc1a8a performance: adust copy from image to host logic
Related-To: NEO-14569

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-04-08 10:02:00 +02:00
Szymon Morek 95e0244f70 fix: properly pass info about 3D image
Related-To: NEO-14538

It's valid for 3D image to copy 2D region.
Current checks for mip map do not consider that.
This change correctly checks for mip mapped 3D image.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-04-03 16:33:57 +02:00
Szymon Morek 6ea83f322d fix: do not override user data beyond slice region
Related-To: NEO-14538

If user passes slice pitch which is larger than region
to copy, do not override memory beyond region but within
that slice pitch.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-04-03 12:37:35 +02:00
Fabian Zwoliński 7ef3880793 feature: implement pool allocator for gpuTimestampDeviceBuffer
The patch applies to Level Zero.
Only allocations < 2MB will be fetched from the pool.
Allocations are shared and reused within a given device.

Additionally, I added a new debug flag to control the allocator:
EnableTimestampPoolAllocator

Related-To: NEO-12287
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
2025-04-02 14:28:56 +02:00
Szymon Morek 8836f6df0b fix: forward mip map level for 3D images
Related-To: NEO-14539

1D and 2D images have already mip map level set correctly.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-04-02 11:46:41 +02:00
Szymon Morek 3010af596e performance: add infrastructure for staging with 3D images
Related-To: NEO-14026

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-04-01 15:30:30 +02:00
Lukasz Jobczyk 60b551758c performance: Adjust waitpkg threshold for discrete devices
Related-To: NEO-14336

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-03-26 14:59:19 +01:00
Bartosz Dunajski 8c21a9634f refactor: add missing file to cmake list
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2025-03-24 15:19:03 +01:00
Lukasz Jobczyk 8fbde30432 fix: Adjust waitpkg threshold to 12 us
Resolves: NEO-14434, NEO-14435
Related-To: NEO-14336

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-03-24 11:43:54 +01:00
Lukasz Jobczyk 8a85a96ed2 feature: Add 3-level wait scheme with tpause intrinsic
Related-To: NEO-14336

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-03-21 12:12:57 +01:00
Chodor, Jaroslaw 0bff9def3b feature: New allocators for opaque arrays
Adds fast allocators for opaque objects of uniform size.

Related-To: NEO-13406

Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
2025-03-20 21:59:44 +01:00
Lukasz Jobczyk 75461d190d performance: Adjust umwait counter value
Related-To: NEO-13922, NEO-14336

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-03-20 13:57:25 +01:00
Mateusz Hoppe a86105814d fix: default initialize allocated memory when memory is overwritten
Related-To: NEO-5093

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2025-03-11 15:32:33 +01:00
Lukasz Jobczyk be8545f7df refactor: reset all waitpkg variables on test start
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-03-11 08:44:36 +01:00
Szymon Morek dacbce7f01 performance: introduce staging read for cl_buffer
Related-To: NEO-14026

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-03-11 08:19:28 +01:00
Fabian Zwoliński f5e37e725c Revert "fix: configure ISA Pool params based on productHelper"
This reverts commit bf20ae7ae8.

Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
2025-03-10 22:41:13 +01:00
Lukasz Jobczyk 53062056ec performance: Enable wait pkg for ULLS light
Related-To: NEO-13922

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-03-07 12:18:38 +01:00
Dominik Dabek 9eb8e1812c feature: flag to log usm reuse operations
If flag "LogUsmReuse" is set, usm reuse will log operations to csv file.
Each line will contain: timestamp, host/device, operation type,
allocation size, true/false whether operation succeeded.

This data can then be used to produce graphs and help in analyzing
usm reuse in a particular workload.

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-03-06 11:06:27 +01:00
Szymon Morek 01a66a9347 fix: download staging buffer before reading from it
Related-To: NEO-14154

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-02-21 09:30:23 +01:00
Bartosz Dunajski 85b0d1f84d fix: clear all TS packets for combined CB event
Related-To: NEO-13971

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2025-02-20 19:24:15 +01:00
Fabian Zwoliński bf20ae7ae8 fix: configure ISA Pool params based on productHelper
When is2MBLocalMemAlignmentEnabled returns true,
increase pool size for builtins from 64k to 2MB.

Additionally, set appropriate alignment for kernel ISA heap allocations.
Additionally, configure isaAllocationPageSize based on productHelper

Related-To: NEO-12287
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
2025-02-20 08:42:35 +01:00
Filip Hazubski b60c02d597 fix: Add asserts to ensure NonCopyable and NonMovable n/n
Related-To: NEO-14068

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2025-02-19 11:36:24 +01:00
Filip Hazubski 6b6202446b fix: Add asserts to ensure NonCopyable and NonMovable 3/n
Related-To: NEO-14068

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2025-02-18 17:16:03 +01:00
Jack Myers c26d24e555 fix: tbx page fault manager hang issue
- Updated `isAllocTbxFaultable` to exclude `gpuTimestampDeviceBuffer` from being
faultable.
- Replaced `SpinLock` with `RecursiveSpinLock` in `CpuPageFaultManager` and
`TbxPageFaultManager` to allow recursive locking.
- Added unit tests to verify the correct handling of `gpuTimestampDeviceBuffer`
in `TbxCommandStreamTests`.

Related-To: NEO-13748
Signed-off-by: Jack Myers <jack.myers@intel.com>
2025-02-18 05:05:38 +01:00
Filip Hazubski 4c7900008f refactor: Change wording from NonCopyableOrMovable to NonCopyableAndNonMovable
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2025-02-17 14:19:10 +01:00
Fabian Zwoliński 1d8c8ac843 refactor: use designated initializers for SmallBuffersParams initialization
Related-To: NEO-12287
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
2025-02-13 12:32:52 +01:00
Szymon Morek 8152241693 fix: don't override user data during staging read
Related-To: NEO-13574

User can read image with row pitch larger than region width.
In such cases, don't override memory which is out of region
but within row pitch.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-02-12 16:22:48 +01:00
Compute-Runtime-Validation 116f7270be Revert "fix: tbx page fault manager hang issue"
This reverts commit 7d4e70a25b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-02-12 10:38:05 +01:00
Jack Myers 7d4e70a25b fix: tbx page fault manager hang issue
- Updated `isAllocTbxFaultable` to exclude `gpuTimestampDeviceBuffer` from being
faultable.
- Replaced `SpinLock` with `RecursiveSpinLock` in `CpuPageFaultManager` and
`TbxPageFaultManager` to allow recursive locking.
- Added unit tests to verify the correct handling of `gpuTimestampDeviceBuffer`
in `TbxCommandStreamTests`.

Related-To: NEO-13748
Signed-off-by: Jack Myers <jack.myers@intel.com>
2025-02-12 02:19:37 +01:00
Kamil Kopryk 03b56dc919 fix: untrusted input
Do not read an unlimited size of environment variables.

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2025-02-10 14:54:03 +01:00
Fabian Zwoliński 1eb8e0efd9 fix: configure small buffers params based on productHelper
Refactor buffer pool allocator to support configurable
SmallBuffersParams based on product helper capabilities.

This patch enables setting custom pool
parameters instead of using fixed static values.

For devices with 2MB local memory alignment enabled
(is2MBLocalMemAlignmentEnabled),
use larger pool configuration:
- Pool size: 16MB (up from 2MB)
- Threshold: 2MB (up from 1MB)
- Alignment: 64KB (unchanged)
- Starting offset: 64KB (unchanged)

This improves memory utilization for devices supporting larger memory
alignments
while maintaining original parameters for other devices.

Key changes:
- Moved params from static template to instance member
- Added SmallBuffersParams struct with default/large configs
- Added constructor and setter methods for params configuration

Related-To: NEO-12287
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
2025-02-07 12:01:23 +01:00
Szymon Morek b11322332c performance: enable staging write for cl buffers
Related-To: NEO-13529

Also, add size threshold on iGPU on Linux,
and disable staging if imported host ptr could
be reused

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-02-05 09:41:17 +01:00
Francois Dugast f91cde2a5b fix: invalid includes and missing rdtsc() on ARM
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
2025-01-31 13:05:06 +01:00
Chodor, Jaroslaw beedf709bc feature: LookupArray findGreaterEqual
Adding helpers for find first greater equal
value in lookup array. Useful when finding
minimum SLM encoding that satisfies requirements.

Related-To: NEO-12747

Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
2025-01-27 13:02:02 +01:00
Kamil Kopryk 962836a07b refactor: use defaults for BaseTag attributes
Related-To: NEO-10767
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2025-01-16 18:24:39 +01:00
Szymon Morek 0b4fe9a0df performance: add staging transfers for cl buffers
Related-To: NEO-13529

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-01-15 12:24:43 +01:00