Commit Graph

226 Commits

Author SHA1 Message Date
Fabian Zwoliński d2ce3badfc fix: bindlessHeapsHelper handle unavailable external heap
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>
2024-12-05 14:18:01 +01:00
Lukasz Jobczyk d40a804bca performance: Allocate by KMD on BMG
Related-To: NEO-10526

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-12-04 14:41:25 +01:00
Mateusz Jablonski db6fe7892c fix: remove destroyed allocations from eviction lists
mark explicitly made resident allocations

Related-To: NEO-13246, GSD-10319
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-11-25 22:19:54 +01:00
Wenbin Lu 2ba80ce114 feature: support physical host memory
Related-To: NEO-11981

Signed-off-by: Wenbin Lu <wenbin.lu@intel.com>
2024-11-20 08:19:52 +01:00
Lukasz Jobczyk 7f3896d05f performance: Ensure hostptrs removed before creating new one
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-11-12 13:55:15 +01:00
Maciej Bielski 45e78fea76 fix: use productHelper in getPatIndexInfoString() on Windows
Fix the PAT-index reporting in logger as currently on Windows reported
values are simply wrong.

The changed logic dependends on `RootDeviceEnvironment` and in order to
avoid introducing such dependencies into logger.[ch] the
`logAllocation()` is no longer a member of `FileLogger` but
a free-function instead (and a separate .cpp file). This is important
because the source files `logger.[ch]` are also used by ocloc library
and there is no point to contaminate ocloc code structure with
unnecessary dependencies.

Related-To: NEO-9421
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-10-22 19:27:13 +02:00
Wenbin Lu a8a40d2afd feature: support SVM heap in reserveVirtualMem
Related-To: NEO-11981

Signed-off-by: Wenbin Lu <wenbin.lu@intel.com>
2024-10-22 16:47:14 +02:00
Lukasz Jobczyk 8a647f6a39 Revert "performance: Ensure hostptrs removed before creating new one"
This reverts commit 5b2f2f3d83.

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-10-21 10:36:06 +02:00
Lukasz Jobczyk 5b2f2f3d83 performance: Ensure hostptrs removed before creating new one
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-10-08 13:04:56 +02:00
Compute-Runtime-Validation 60afb83b3b Revert "performance: Ensure hostptrs removed before creating new one"
This reverts commit a890ed5648.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-10-08 07:45:55 +02:00
Compute-Runtime-Validation 41df1a6f47 Revert "feature: support SVM heap in reserveVirtualMem"
This reverts commit bfaeeb01d6.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-10-03 14:53:50 +02:00
Lukasz Jobczyk a890ed5648 performance: Ensure hostptrs removed before creating new one
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-09-19 14:34:19 +02:00
Compute-Runtime-Validation e4d2f16632 Revert "performance: Ensure hostptrs removed before creating new one"
This reverts commit ac1d203555.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-09-18 19:31:34 +02:00
Lukasz Jobczyk ac1d203555 performance: Ensure hostptrs removed before creating new one
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-09-18 14:23:16 +02:00
Lukasz Jobczyk 64c935a594 fix: Do not defer external hostptr destroy
Resolves: NEO-12567

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-09-17 14:54:01 +02:00
Michal Mrozek dd631610b3 refactor: move memory tracking to memory manager
- remove wddm specific code
- improve total size reported to be in decimal

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2024-09-12 17:32:38 +02:00
Michal Mrozek da59b88122 refactor: improve logging of allocations
add capability to measure total amount of allocated memory
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2024-09-12 11:00:27 +02:00
Wenbin Lu bfaeeb01d6 feature: support SVM heap in reserveVirtualMem
Related-To: NEO-11981

Signed-off-by: Wenbin Lu <wenbin.lu@intel.com>
2024-09-09 23:22:04 +02:00
Compute-Runtime-Validation 99f62ac866 Revert "feature: support SVM heap in reserveVirtualMem"
This reverts commit 93cde3ee12.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-09-03 20:20:25 +02:00
Wenbin Lu 93cde3ee12 feature: support SVM heap in reserveVirtualMem
Related-To: NEO-11981

Signed-off-by: Wenbin Lu <wenbin.lu@intel.com>
2024-09-03 11:38:51 +02:00
Szymon Morek a0b789bf9c fix: make removal from container thread safe
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2024-08-30 09:24:20 +02:00
Compute-Runtime-Validation 78d9af04e7 Revert "fix: change mutex when destroying allocation"
This reverts commit 7628966f80.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-08-29 18:14:01 +02:00
Szymon Morek 7628966f80 fix: change mutex when destroying allocation
Current mutex is not preventing destroying resources
when trim callback is currently evicting same allocation.
New mutex does.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2024-08-28 15:31:45 +02:00
Szymon Morek b8f181d50e performance: remove trim candidate list
Related-To: NEO-11755

Removing trim candidate list reduces overhead
caused by residency handling. Allocations required
for eviction are placed in eviction container managed
by CSR.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2024-08-23 12:21:50 +02:00
Dominik Dabek e9e6cc05e3 fix: mem alloc size tracking safety
Make sure local mem alloc size atomic array is initialized with 0.
Add debug breaks to catch possible overflow on unregistering
allocations.

Related-To: NEO-11356

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-08-05 11:51:17 +02:00
Dominik Dabek 26428d5af3 feature: track used memory by allocations
Track memory used by memory allocations. System and local per device.
Will be used for heuristics in memory pooling.

Related-To: NEO-11356

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-08-02 17:54:34 +02:00
Grzegorz Choinski 46f2568902 build: fixes for windows clang with -m32
Related-To: NEO-10748
Signed-off-by: Grzegorz Choinski <grzegorz.choinski@intel.com>
2024-07-18 14:49:56 +02:00
Filip Hazubski 6992cb8aeb fix: Add experimental debug toggle to force 2M local memory size alignment
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2024-06-27 15:21:35 +02:00
Michal Mrozek c817d15b59 fix: residency leak
- properly add needsMakeResidentBeforeLock in Wddm Allocation so while
destroying the allocation it is properly removed from wddm residency controller
- add cannot trim further flag after eviction
- fix debug variable

Related-To: NEO-11731
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2024-06-25 15:17:11 +02:00
Jaroslaw Warchulski 63da79798d refactor: reduce the number of GraphicsAllocation constructors and derivatives
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
2024-06-18 21:31:37 +02:00
Jaroslaw Warchulski daec249430 refactor: remove not needed createGraphicsAllocationFromNTHandle method
Related-To: NEO-11498
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
2024-06-18 14:25:00 +02:00
Compute-Runtime-Validation 196f0a6eee Revert "fix: pass custom alignments for WSL2 device and shared memory allocat...
This reverts commit 1c98420518.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-06-18 07:58:28 +02:00
Jaroslaw Warchulski 76a05c1cab refactor: pass arrayIndex to Wddm::openNTHandle function
Related-To: NEO-11498
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
2024-06-12 12:11:35 +02:00
Jaroslaw Warchulski 0ac1be7669 refactor: pass arrayIndex to Wddm::openSharedHandle function
Related-To: NEO-11498
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
2024-06-07 09:51:26 +02:00
Lukasz Jobczyk 9a2fa1dcb1 fix: Override prefer no cpu access for dc flush mitigation
Related-To: NEO-10556

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-06-05 10:26:45 +02:00
Lukasz Jobczyk a9269939f6 fix: Defer MOCS to PAT
Related-To: NEO-10556

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-05-27 10:26:26 +02:00
Compute-Runtime-Validation ce0ccacef6 Revert "fix: Defer MOCS to PAT"
This reverts commit 6c75ec3116.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-05-25 06:22:22 +02:00
Wenbin Lu 1c98420518 fix: pass custom alignments for WSL2 device and shared memory allocation
Related-To: NEO-8431

Signed-off-by: Wenbin Lu <wenbin.lu@intel.com>
2024-05-24 15:52:40 +02:00
Lukasz Jobczyk 6c75ec3116 fix: Defer MOCS to PAT
Related-To: NEO-10556

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-05-24 15:30:49 +02:00
Maciej Bielski dc32da2507 feature: prepare StorageInfo for Drm-specific customization
Get the local memory regions count from the primary source (MemoryInfo)
and store for further use when using DrmMemoryManager.
Add a point of dispatch (virtual `createStorageInfoFromProperties`) for
further Drm-specific customizations related to StorageInfo. As the
function became virtual, move one of its callers
(`isLocalMemoryUsedForIsa()`) from the constructor of `MemoryManager` to
respective constructors of all derivative classes. This prevents
bypassing the virtual call dispatch.

Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-05-16 12:24:48 +02:00
Maciej Plewka 8a7444e798 fix: Undo accidental changes in wddm memory manager
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2024-05-15 16:11:30 +02:00
Lukasz Jobczyk 8a0c425495 feature: Mark selected resources as UC when mitigating dc flush
Related-To: NEO-10556

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-04-12 12:52:13 +02:00
Mateusz Jablonski 78a4a92b44 refactor: reorder members to reduce internal padding in structs
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-03-25 15:50:00 +01:00
Kozlowski, Marek 6751d19c19 fix: decanonize pointer to match GPU heap address space
* `zeVirtualMemReserve` `pStart` address may be passed in a canonizated form.

Resolves: NEO-10086

Signed-off-by: Kozlowski, Marek <marek.kozlowski@intel.com>
2024-03-01 12:18:11 +01:00
Lukasz Jobczyk cc1732c930 performance: make resident before lock
Resolves: NEO-10369

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-02-16 12:00:38 +01:00
Compute-Runtime-Validation 4d159bd06c Revert "performance: make resident before lock"
This reverts commit 7e7fac01e3.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-02-16 09:23:49 +01:00
Lukasz Jobczyk 7e7fac01e3 performance: make resident before lock
Resolves: NEO-10369

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-02-15 11:56:36 +01:00
Lukasz Jobczyk 5717a726ff fix: Allow free of zero sized allocation
Related-To: NEO-9236

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-02-07 17:04:11 +01:00
Katarzyna Cencelewska eec01e500a fix: non-coherency issue on arl
Resolves: HSD-15015200338
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2024-01-26 10:26:33 +01:00
Maciej Plewka 09dcc618c1 fix: prefer compression when allocationg by kmd
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2024-01-22 16:38:17 +01:00