Dedicated pools for different allocations size ranges.
Additional reused allocations will create their own pools.
Do not reuse allocations >256MB.
Related-To: NEO-6893, NEO-12299, NEO-12349
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Related-To: NEO-10258
Currently each module has it's own GA
for kernel ISA's. This change allows new modules to
reuse existing allocation.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
Query system total memory size and limit usm host allocation recycle to
use at most x%.
x is read from ExperimentalEnableDeviceAllocationCache for device and
ExperimentalEnableHostAllocationCache for host.
Related-To: GSD-7497
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
increase pool size to 2MB and threshold to 1MB
add limit to the number of pools, set to 2
Related-To: NEO-9690
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Fix querying allocation info from pooled svm ptr.
Handle requested allocation alignment.
Refactor sorted vector usage.
Do not associate device with host pool allocation.
Related-To: NEO-9700
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
EnableDeviceUsmAllocationPool and EnableHostUsmAllocationPool for device
and host allocations respectively.
Pool size will be set to flag value * MB.
Allocation size threshold to be pooled is 1MB.
Pools are created per context.
Related-To: NEO-9700
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Increase pool allocator threshold to 1MB
Remove stack allocations based on threshold in tests.
Related-To: NEO-9690
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Instances returned by `getAllocationsVector()` in some cases cannot be
freed (in the `malloc/new` sense) until the `drain()` function invokes
`allocInUse()` on them. Plus, the `chunksToFree` container operates on
pairs `{offset, size}`, not pointers, so such pair cannot be used to
release allocations either.
Provide an optional callback, which can be implemented by the custom
pool derived from `AbstractBuffersPool`. This callback can be used, for
example, to perform actual release of an allocation related to the
currently processed chunk.
Additionally, provide the `drain()` and `tryFreeFromPoolBuffer()`
functions with pool-independent versions and keep the previous versions
as defaults (for allocators with a single pool). The new versions allow
reusing the code for cases when allocator has multiple pools.
In both cases, there was no such needs so far but it arose when working
on `IsaBuffersAllocator`. The latter is coming with future commits, but
the shared code modifications are extracted as an independent step.
Related-To: NEO-7788
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
Instances returned by `getAllocationsVector()` in some cases cannot be
freed (in the `malloc/new` sense) until the `drain()` function invokes
`allocInUse()` on them. Plus, the `chunksToFree` container operates on
pairs `{offset, size}`, not pointers, so such pair cannot be used to
release allocations either.
Provide an optional callback, which can be implemented by the custom
pool derived from `AbstractBuffersPool`. This callback can be used, for
example, to perform actual release of an allocation related to the
currently processed chunk.
Additionally, provide the `drain()` and `tryFreeFromPoolBuffer()`
functions with pool-independent versions and keep the previous versions
as defaults (for allocators with a single pool). The new versions allow
reusing the code for cases when allocator has multiple pools.
In both cases, there was no such needs so far but it arose when working
on `IsaBuffersAllocator`. The latter is coming with future commits, but
the shared code modifications are extracted as an independent step.
Related-To: NEO-7788
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
Currently the whole code resides within the opencl/ tree, but the
mechanism is meant to be reused in L0 for kernel-ISA allocations
optimization (further work).
This commit is a preparation step, which extracts the generic mechanism
and moves the extracted part under the shared/ tree.
Related-To: NEO-7788
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
remove method to removing duplicates from StackVec as the method
implicitly sorted the vector
Related-To: GSD-4692
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
- Check allocation root device index during eviction
- Wait for and marked allocation only from the current root device index
Related-To: NEO-7920
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
- Do not wait for GPU completion on pool exhaust if allocs are in use,
allocate new pool instead
- Free small buffer address range if allocs are not in use and
buffer pool is exhausted
Resolves: NEO-7769, NEO-7836
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
- Do not wait for GPU completion on pool exhaust if allocs are in use,
allocate new pool instead
- Reuse existing pool if allocs are not in use
Related-To: NEO-7769
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
When a dummy kernel "kernel void_(){}" is passed in sources - specific
for workloads with ngen backend - enforce fallback to CTNI for the whole
application context (mark the context as non-zebinary).
Related-To: NEO-7772
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>