Commit Graph

799 Commits

Author SHA1 Message Date
Dominik Dabek
5c7fd72d5f performance: enable l0 usm reuse
Do not reuse internal or imported allocations.
Mark as aub writable on getting from reuse.

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-06-25 15:49:15 +02:00
Chandio, Bibrak Qamar
c1867ed981 feature: atomic attributes for shared system alloc
Related-To: NEO-13715, NEO-14862

Signed-off-by: Chandio, Bibrak Qamar <bibrak.qamar.chandio@intel.com>
2025-06-23 20:14:47 +02:00
Dominik Dabek
77e25f90d7 fix: prepare for l0 usm reuse enable
adjust ULTs
disable usm reuse in multi device l0
don't initialize usm caches if max reuse size is 0
check requested alignment when returning from cache
guard against double free

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-06-23 17:17:18 +02:00
Michal Mrozek
f6cb013896 refactor: remove redundant member
- it is true on all platforms.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2025-06-18 16:15:30 +02:00
Szymon Morek
6a7f6f1ad6 fix: add noexcept to move operators
Without it, copy operator is selected, even if move is explicitly defined.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-06-09 10:32:23 +02:00
Fabian Zwoliński
e2228201ce fix: Avoid redundant padding in ISA allocations
- Add isaPaddingIncluded flag to AllocationProperties to control ISA
padding
- Modify MemoryManager to skip automatic padding when flag is set
- Update ISAPoolAllocator to manage padding explicitly and set the
flag
- Use actual buffer size for HeapAllocator instead of requested size
- Add test covering different padding scenarios

This prevents double padding addition which was wasting memory when
ISAPoolAllocator managed its own padding on top of MemoryManager's
automatic padding.

Related-To: NEO-12287, HSD-18042276431
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
2025-05-30 15:40:38 +02:00
Dominik Dabek
ad4d7a2ce8 fix: l0 usm pooling, ipc handling
Move getting usm pool for ptr to its own method.
Move trying to free via pooling to its own method.

Use base ptr of pool for tracking in IPCHandleMap.
Track ipc handle refcount in freeMem.
Return error when trying to use a not allocated ptr within pool.

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-05-29 16:07:19 +02:00
Aleksandra Nizio
1dfc9227c4 fix: Removind address_mapper.h
Related-To: NEO-14718
Signed-off-by: Aleksandra Nizio <aleksandra.nizio@intel.com>
2025-05-27 20:37:56 +02:00
Bartosz Dunajski
9c19e9eb96 fix: enable single temporary allocations list mode 2
Related-To: NEO-14641

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2025-05-27 17:35:17 +02:00
Compute-Runtime-Validation
42a8b63725 Revert "fix: enable single temporary allocations list mode"
This reverts commit b496274d1a.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-05-26 13:22:15 +02:00
Bartosz Dunajski
b496274d1a fix: enable single temporary allocations list mode
Related-To: NEO-14641

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2025-05-22 08:45:46 +02:00
Bartosz Dunajski
91940d2a79 fix: initial support for single temporary allocations list
Related-To: NEO-14641

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2025-05-21 13:16:15 +02:00
Maciej Bielski
0f8ee57f98 feature: add NEO_LOCAL_MEMORY_ALLOCATION_MODE
Allow the application to force storageInfo.localOnly and get the
out-of-memory returned if not possible.

This is a windows-only feature supported on discrete platforms.

Related-To: NEO-13428
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2025-05-20 14:15:17 +02:00
Dominik Dabek
7a091919a4 fix: usm reuse trim, non locked vector read
Remove checking allocations.empty before lock.

Related-To: NEO-14529

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-05-19 21:17:17 +02:00
Oskar Hubert Weber
c3d5ee8332 fix: unblock main thread after mutex unlock in DeferredDeleter
DeferredDeleter instance could get deleted before worker thread called
unlock() on queue mutex leading to an error

Related-To: NEO-14896

Signed-off-by: Oskar Hubert Weber <oskar.hubert.weber@intel.com>
2025-05-09 14:17:47 +02:00
Michal Mrozek
6f4a397cfc refactor: remove not required parameter
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2025-05-08 23:13:06 +02:00
Szymon Morek
6ae43123f6 fix: correct usages of ULLS-related resources
Related-To: NEO-14360

Current gmm usage type of these resources is causing
them to be cached, which is incorrect.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-05-08 12:12:45 +02:00
Michal Mrozek
c3eec70a97 refactor: remove not needed hw info member
- it is false on all platforms.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2025-05-07 14:17:49 +02:00
Dominik Dabek
6afefa1e31 performance: usm device pool, compression handling
Use device compression defaults when allocating pool.
Ignore compression hints when allocating from pool.

Also remove unused late initialization methods.

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-05-06 16:30:58 +02:00
Dominik Dabek
75e313ce28 feature: prepare for l0 usm device pooling
Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-04-28 14:55:03 +02:00
Oskar Hubert Weber
1816c8eac4 fix: avoid joining thread in deferred deleter
Join thread in DllMain (which we are not aware of)
can result in hang occurring in DeferredDeleter, if the library is
freed before FreeLibraryAndExitThread call from within the worker thread,
the thread gets stuck, thus the main thread is stuck on worker->join().

Related-To: NEO-14121

Signed-off-by: Oskar Hubert Weber <oskar.hubert.weber@intel.com>
2025-04-17 16:17:42 +02:00
Compute-Runtime-Validation
331b515478 Revert "fix: avoid joining thread in deferred deleter"
This reverts commit 38a3667304.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-04-16 15:18:27 +02:00
Oskar Hubert Weber
38a3667304 fix: avoid joining thread in deferred deleter
Join thread in DllMain (which we are not aware of)
can result in hang occurring in DeferredDeleter, if the library is
freed before FreeLibraryAndExitThread call from within the worker thread,
the thread gets stuck, thus the main thread is stuck on worker->join().

Related-To: NEO-14121

Signed-off-by: Oskar Hubert Weber <oskar.hubert.weber@intel.com>
2025-04-16 10:02:10 +02:00
Chandio, Bibrak Qamar
bed2ad1ac0 feature: memAdise for System Allocator
Related-To: NEO-13715

Implements basic functionality for zeCommandListAppendMemoryAdvise for
system allocator

Signed-off-by: Chandio, Bibrak Qamar <bibrak.qamar.chandio@intel.com>
2025-04-16 07:11:14 +02:00
Lukasz Jobczyk
f7939735da refactor: Adjust USM cleaner to ULLS light
Related-To: NEO-13922

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-04-15 14:05:02 +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
Tomasz Biernacik
194c3058b8 performance: change usage for ringBuffer on integrated devices
Related-To: NEO-9421

Signed-off-by: Tomasz Biernacik <tomasz.biernacik@intel.com>
2025-04-14 12:25:38 +02:00
Lukasz Jobczyk
1b5519a880 fix: Adjust standard heaps when on 57 bit address space
Resolves: GSD-10871

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-04-09 12:51:03 +02:00
Fabian Zwoliński
363aa8cdbd performance: align local memory Tag allocations to 2MB
Align local memory allocations of tag types to 2MB when
2MB alignment is enabled via the product helper
(is2MBLocalMemAlignmentEnabled flag).

Refactored the allocateGraphicsMemoryInDevicePool function to improve
readability and maintainability. Simplified the logic for
determining base size and final alignment by reducing redundant code.

Related-To: NEO-12287
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
2025-04-09 09:59:44 +02:00
Dominik Dabek
bd516b3552 fix: usm reuse, clean from largest
When trimming old allocations in usm reuse start from largest
allocations.
This will reduce memory usage more quickly once max hold time is hit.

Related-To: NEO-6893, NEO-14429

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-04-04 14:57:15 +02:00
Dominik Dabek
3703ff550c fix: use real size when putting into usm reuse
Real allocation size should be used to properly apply limits and allow
more usm reuse hits.

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-04-04 09:44:32 +02:00
Dominik Dabek
be27367020 performance: usm reuse, avoid looking up svmData
Save svmData on putting into reuse, instead of searching each time.
Change UNRECOVERABLE_IF to DEBUG_BREAK_IF.

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-04-03 15:50:49 +02:00
Lukasz Jobczyk
0a11a96a53 refactor: Add dedicated method to check if any ULLS light enabled
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-03-31 16:36:20 +02:00
Dominik Dabek
c76edaba4e fix: enable usm reuse limit based on memory usage
Related-To: NEO-14160, NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-03-27 15:14:08 +01:00
Dominik Dabek
915d657420 fix: flag to limit usm reuse based on memory usage
Host usm and device usm for igfx checks system memory usage.
Device usm for dgfx checks local memory usage.

If used memory is above limit threshold:
- no new allocations will be saved for reuse
- cleaner will use shorter hold time of 2 seconds
- cleaner will free all eligible allocations, regardless of async
deleter thread having work

Motivation: in case of gfx memory being full, making resident new
allocations will require evictions which leads to massive slowdown on
enqueue calls.
This change aims to minimize cases where extra memory usage from usm
reuse mechanism leads to above situation.

Related-To: NEO-6893, NEO-14160

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-03-27 10:25:19 +01:00
Dominik Dabek
6e998fc3c1 fix: move host usm reuse max size to mem manager
Intialize value on memory manager creation.

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-03-24 08:53:30 +01:00
Lukasz Jobczyk
6cb52f71b4 fix: Avoid mutex deadlock when switch ulls light ring buffer
Related-To: NEO-14406

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-03-19 11:47:40 +01:00
John Falkowski
4d281cf51d feature: Implement appendMemoryPrefetch for Shared System USM allocations
Related-To: NEO-12989

Signed-off-by: John Falkowski <john.falkowski@intel.com>
2025-03-13 06:26:38 +01:00
Compute-Runtime-Validation
fa2e3adad3 Revert "feature: Implement appendMemoryPrefetch for Shared System USM Allocat...
This reverts commit 97799b3faf.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-03-12 05:55:32 +01:00
John Falkowski
97799b3faf feature: Implement appendMemoryPrefetch for Shared System USM Allocations
Related-To: NEO-12989

Signed-off-by: John Falkowski <john.falkowski@intel.com>
2025-03-11 09:12:48 +01:00
Dominik Dabek
2170f5ca88 refactor: usm reuse to unique ptr
Change usm allocation cache in usm manager to unique ptr

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2025-03-07 15:14:58 +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
Lukasz Jobczyk
b7cba510a3 fix: Do not increase host USM alignment when CAL enabled
Resolves: GSD-10808

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-02-28 10:10:42 +01:00
Lukasz Jobczyk
20d29207cd refactor: Allow debug key to force USM cleaner with ULLS light
Related-To: NEO-13922

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-02-26 17:52:18 +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
Filip Hazubski
c651209617 fix: Add asserts to ensure NonCopyable and NonMovable 2/n
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2025-02-18 13:08:00 +01:00
Kamil Kopryk
b1ffe640bb refactor: correct typo
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2025-02-17 23:31:27 +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
Lukasz Jobczyk
356d89d608 performance: Disable USM cleaner for ULLS light
Realted-To: NEO-13922

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2025-02-14 12:38:16 +01:00