Commit Graph

44 Commits

Author SHA1 Message Date
Mateusz Jablonski cb2b572e94 feature: add support for null aub mode
In this mode AUB csr will be created, however, no aub file will be created

Related-To: NEO-11097
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-04-09 16:59:42 +02:00
Mateusz Jablonski dd1b9d6abc refactor: correct naming of enum class constants 8/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-19 08:18:18 +01:00
Mateusz Jablonski c9664e6bad refactor: rename global debug manager to debugManager
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-11-30 13:00:59 +01:00
Mateusz Jablonski 80e59ff344 fix: don't call virtual method in ctor
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-10-30 12:26:57 +01:00
Jablonski, Mateusz ac5f64f5c6 fix: fix compilation error in clang on Windows (2/n)
Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
2023-10-24 15:59:06 +02:00
Young Jin Yoon 91deddb69b feature: register handler when we migrate to GPU
Created registerFaultHandler() and checkFaultHandlerFromPageFaultManager()
and removed registering sigaction() from the contructor of the
PageFaultManagerLinux class.

Added if statment to check the current pagefault handler is from the
pagefault manager. If not, register the pagefault handler of the current
pagefault manager on linux.

Refactored windows exception vector adding logic to
registerFaultHandler() and call upon the constructor of the
PageFaultManagerWindows, and make
checkFaultHandlerFromPageFaultManager() always return true for windows.

Related-To: NEO-8190
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2023-08-14 11:14:03 +02:00
Milczarek, Slawomir 027c51d396 feature: Add CPU side USM allocation to trim candidate list on page fault
Enable eviction of CPU side USM allocation for UMD migrations on Windows.
Reverts incorrect auto-revert commit 218de586a4f28b1de3e983b9006e7a99d3a4d10e.

Related-To: NEO-8015

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-07-25 15:21:12 +02:00
Compute-Runtime-Validation 918b41d26d Revert "feature: Add CPU side USM allocation to trim candidate list on page f...
This reverts commit 60a4448a07.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-07-24 08:44:22 +02:00
Milczarek, Slawomir 60a4448a07 feature: Add CPU side USM allocation to trim candidate list on page fage fault
Enable eviction of CPU side USM allocation for UMD migrations on Windows.

Related-To: NEO-8015
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-07-23 10:24:28 +02:00
Compute-Runtime-Validation 4a562e352b Revert "feature: Add CPU side USM allocation to trim candidate list on page f...
This reverts commit cce2cc920d.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-07-21 16:40:59 +02:00
Milczarek, Slawomir cce2cc920d feature: Add CPU side USM allocation to trim candidate list on page fault
Enable eviction of CPU side USM allocation for UMD migrations on Windows.

Related-To: NEO-8015

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-07-21 14:18:38 +02:00
Milczarek, Slawomir a6a0b95344 fix: Cpu page fault manager with control of host ptr eviction
Related-To: NEO-8015

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-07-12 14:13:17 +02:00
Michal Mrozek 593b3cf4fd Revert "[performance] do not perform migrations if not needed."
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2023-03-14 19:08:19 +01:00
Michal Mrozek 15f08a92c0 [performance] do not perform migrations if not needed.
Skip migrations if nothing is migrated to the CPU side.

Related-To: NEO-5170
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2023-02-17 18:38:52 +01:00
Warchulski, Jaroslaw 5eef40fedd Cleanup includes 22
Cleaned up files:
opencl/source/built_ins/builtins_dispatch_builder.h
opencl/source/context/context.h
opencl/source/gtpin/gtpin_notify.h
opencl/source/kernel/kernel.h
opencl/source/kernel/multi_device_kernel.h
opencl/source/mem_obj/buffer.h
opencl/source/mem_obj/mem_obj.h
shared/source/built_ins/registry/built_ins_registry.h
shared/source/page_fault_manager/cpu_page_fault_manager.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-05 16:59:01 +01:00
Mateusz Jablonski 43b790957d style: format code using clang-format 15.0.6
Related-To: NEO-7500
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-01-05 10:33:47 +01:00
Jaime Arteaga 1e9e877394 Style: Add 0x prefix to PrintUmdSharedMigration logs
This to align with format used on another tools, like onetrace.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2023-01-03 03:37:10 +01:00
Warchulski, Jaroslaw f275eea6ec Cleanup includes 14
Cleaned up files:
shared/source/device/device.h

Related-To: NEO-5548

Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-23 10:46:34 +01:00
Lukasz Jobczyk 8927399cce Set proper gpu domain transfer handler for CAL
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-11-17 11:53:02 +01:00
Jaime Arteaga db58e50564 Improve PrintUmdSharedMigration
Add size and timing data.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-07-18 19:47:13 +02:00
Daniel Chabrowski 7463e1970b Cleanup headers
Make TUs and headers self-contained, remove unused headers

Signed-off-by: Daniel Chabrowski <daniel.chabrowski@intel.com>
2022-05-18 11:42:06 +02:00
Milczarek, Slawomir 7cd4ca5ce7 Fixed AUB capture in HW mode for umd-migrated shared allocations
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-03-30 12:04:58 +02:00
Maciej Bielski a71b88fefb PageFaultHandler: speedup UM allocations lookup
Add a per-instance SVMAllocsManager::nonGpuDomainAllocs container for
all allocations to be removed in
moveAllocationsWithinUMAllocsManagerToGpuDomain. This approach replaces
the current iterative search and performs the task faster.

Add 7 new unit-tests to verify the functionality related to
nonGpuDomainAllocs container, both in expected and unexpected/synthetic
scenarios.

For UTs replace a dummy unifiedMemoryManager pointer with a pointer to
an instace of SVMAllocsManager, otherwise a SegFault error is thrown at
the end of tests.

Perform overall cleanup in related tests implementation, includes but
not limited to removal of:

- givenInitialPlacementGpu\
WhenMovingToGpuDomainThenFirstAccessDoesNotInvokeTransfer

As it is fully covered by:

givenAllocationMovedToGpuDomain\
WhenVerifyingPagefaultThenAllocationIsMovedToCpuDomain

- givenInitialPlacementGpu\
WhenVerifyingPagefaultThenFirstAccessDoesNotInvokeTransfer

As it is fully covered by:

givenTbxAndnitialPlacementGpu\
WhenVerifyingPagefaultThenMemoryIsUnprotectedOnly

Finally, reduce code duplication where possible.

Related-To: NEO-6658
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2022-03-16 11:18:24 +01:00
Milczarek, Slawomir 2be98a1e62 Create kmd migrated allocation with initial placement
Implements ZE_HOST_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT
for zeMemAllocShared with KMD migrated allocation.

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-02-01 15:42:10 +01:00
Michal Mrozek a12f9cb377 [2/n] Optimize indirect calls.
Migrate shared allocation when command list sets indirect flags.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2022-01-25 13:10:53 +01:00
Kamil Diedrich 770c87bf73 Specify lambda capture for current object
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-11-25 09:33:52 +01:00
Bartosz Dunajski e8cbcd2ab9 Dont make allocations non-AubWritable during migration
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-10-04 15:36:48 +02:00
Jaime Arteaga 803d7cdd8a Add debug key to print UMD shared migrations
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-07-22 08:37:09 +02:00
Spruit, Neil R 771722f3d7 L0 Support for hints to disable CPU Migration of USM memory
- Added support for disabling CPU migration of USM memory given
ZE_MEMORY_ADVICE_SET_READ_MOSTLY && ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2021-07-20 04:34:16 +02:00
Maciej Dziuban 7334920ed3 Add UsmInitialPlacement debug flag
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2021-07-12 15:57:59 +02:00
Milczarek, Slawomir 997604c2dd AUB CSR to use a common AUB and TBX gpu domain handler
Related-To: NEO-5667

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-04-02 15:53:10 +02:00
Mateusz Hoppe c994bf6f00 Fix pagefault Cpu transfers in TBX mode
Related-To: NEO-5286

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-03-08 19:22:02 +01:00
Jaime Arteaga d46bb59508 Migrate shared-allocations made resident with makeMemoryResident
Shared-allocations are currently migrated to GPU by the page-fault
manager when calling executeCommandLists. Allocations to migrate are
taken from the lists container. However, if a shared-allocation
has been made resident with zeContextMakeMemoryResident(), it is not
added to the list container, and hence it is not migrated to device.

So, add a container of resident allocations to the driver and migrate
them along with the other allocations.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-12-11 03:27:42 +01:00
Maciej Dziuban 94be510c18 Add initial placement hints for USM in OpenCL
Related-To: NEO-5059
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2020-12-01 18:30:26 +01:00
Bartosz Dunajski 40d5cc71c9 Windows includes cleanup
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2020-11-09 14:35:38 +01:00
Lukasz Jobczyk f825364770 Unprotect memory after migration to CPU
Change-Id: I280296422ec30583752a0b62c7c1c8777aa84c32
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-10-14 11:14:32 +02:00
Lukasz Jobczyk b81a78d0e9 Evict USM cpu allocation after migration
Related-To: NEO-5007

Change-Id: I3c91af3ca22cb6233d530b252cc0c75d8fc2f8b5
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-09-18 13:01:45 +02:00
Maciej Dziuban 97ec64d22c Optimize first access to shared allocations
Change-Id: Ia3ce5f1e448128e7c9dfffb9ad49aaee15bdf948
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
Related-To: NEO-5059
2020-09-15 12:59:07 +02:00
Maciej Dziuban 7c7cfb1099 Delete unneeded memory transfer for USM
Change-Id: I7b11a132b621069febd5b851f9e29e7177d8d395
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
Related-To: NEO-5059
2020-09-14 16:13:58 +02:00
Pawel Cieslak fb821f21f5 Cmake format script
Related-To: NEO-1157

Change-Id: Ie1b907e838cfb9ad0d75cc8971d415f7c77103c9
Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
2020-08-19 16:36:30 +02:00
Lukasz Jobczyk 5739d526c4 Broadcast signal to all threads while handling USM pagefault
Related-To: NEO-4721

Change-Id: I77185f8db2576f626c1b6b5615ab5d8f9b22076f
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-07-08 12:54:01 +02:00
Mateusz Jablonski 93c1e1b976 Add MultiGraphicsAllocation to USM
Related-To: NEO-4672
Change-Id: I53ea4bea73ae6d52840146f63bc561bb90f9fe62
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-07-02 09:39:21 +02:00
Mateusz Jablonski 7df9945ebe Add absolute include paths
Change-Id: I67a6919bbbff1d30c7d6cdb257b41c87bad51e7f
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-23 23:49:12 +01:00
kamdiedrich e072275ae6 Reorganization directory structure [3/n]
Change-Id: If3dfa3f6007f8810a6a1ae1a4f0c7da38544648d
2020-02-23 23:48:28 +01:00