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>
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>
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>
Related-To: NEO-13715
Implements basic functionality for zeCommandListAppendMemoryAdvise for
system allocator
Signed-off-by: Chandio, Bibrak Qamar <bibrak.qamar.chandio@intel.com>
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>
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>
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>
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>
Cleaner thread will run every 15ms instead of 2s.
Allocations will be held for at least 10s.
If deferred deleter has elements to release, will skip cleaning cache.
Will clean only 1 allocation per cache, per cleaning run.
Related-To: NEO-6893
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
mechanism for freeing allocations saved for reuse that have not been
used in a given time
Related-To: NEO-13425
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This PR handles the situation in which a component
has reserved a front window space for itself in the external heap,
so that the Compute Runtime cannot access this area.
In such a situation, we perform the following steps:
1. reserve 4GB chunk in heapStandard
2. split our chunk into 2 parts: heapFrontWindow, heapRegular
3. from this point on, map all linearStream allocations in reserved 4GB
chunk
Patch applies to Windows and WSL.
Patch only applies when the bindless global allocator is enabled.
Related-To: HSD-16025889919
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
Calculate available memory for usm device reuse based as (total device
memory - used memory) * fraction for reuse.
Use sys mem allocs for devices without local memory.
Related-To: NEO-12902
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Add tracking of memory used for usm reuse mechanism when multiple cl
contexts are used.
Tracking for device added to NEO::Device, for host added to
NEO::MemoryManager.
This fixes usm reuse using x% of memory per each context instead of
globally.
Related-To: NEO-13308
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
if limiting, disable device usm reuse (set max size to 0)
do not reserve vector for allocation infos if reuse is disabled
Related-To: NEO-12924
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>