Commit Graph

40 Commits

Author SHA1 Message Date
Warchulski, Jaroslaw 7e7f8b5bc2 Move files from shared/test/unit_test to shared/test/common
unit_test/helpers/debug_helpers.cpp -> common/helpers
unit_test/page_fault_manager/default_asan_options.cpp -> common/page_fault_manag
unit_test/utilities/cpuintrinsics.cpp -> common/utilities
unit_test/memory_manager/deferred_deleter_mt_tests.cpp -> opencl/test/unit_test/
delete: unit_test/mocks/debugger_l0_create.cpp
delete: unit_test/page_fault_manager/default_asan_options.cpp

Related-To: NEO-6524
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-08-30 12:24:28 +02:00
Warchulski, Jaroslaw 260a324a6f Move files between shared/test/common and /unit_test (xe_*_core, page_fault...)
common/xe_hpc_core/test_preemption_xe_hpc_core -> unit_test/xe_hpc_core
common/xe_hpg_core/excludes_xe_hpg_core -> unit_test/xe_hpg_core
common/xe_hpg_core/dg2/excludes_dg2 -> unit_test/xe_hpg_core/dg2
common/xe_hpg_core/test_preemption_xe_hpg_core -> unit_test/xe_hpg_core
unit_test/base_ult_config_listener.cpp -> common
unit_test/base_ult_config_listener.h -> common
unit_test/test_stats.h -> common
unit_test/test_configuration.h -> common
unit_test/page_fault_manager/cpu_page_fault_manager_tests.h -> common/fixtures
unit_test/page_fault_manager/mock_cpu_page_fault_manager.h -> common/mocks

Related-To: NEO-6524

Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-08-17 16:17:00 +02: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
Artur Harasimiuk 2cc2d05c37 remove unused include
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-06-28 10:59:30 +02:00
Maciej Plewka 6ab6e1abff Fix mutex order for event task and move args to gpu
This commit fixes problem with untransfered shared usm memory to gpu
when there is submit to gpu trigerred by user event. Also there is a fix
for dead lock problem caused by mixed orders of locking mutexes in csr
and in direct submission controller.

Related-To: NEO-6762

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2022-06-21 11:28:25 +02:00
Artur Harasimiuk 3f04769f07 style: configure readability-identifier-naming.FunctionCase
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-05-17 20:55:56 +02:00
Dominik Dabek 8d1ad5a4f3 Refactor: use stack vector for root device indices
Stack vector will not cause dynamic allocations in most circumstances
ie. number of root device indices not more than 16

Related-To: NEO-6837

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-04-14 14:05:42 +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
Artur Harasimiuk 9bea74a780 move mock_memory_manager to shared
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2021-10-05 16:22:38 +02: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
Maciej Dziuban dd0ab31d49 Add missing override
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2021-07-14 13:28:08 +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
Mateusz Hoppe 79ff54489b Move file to shared
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-05-18 18:49:26 +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
Zbigniew Zdanowicz 779253c49c Add new flag to USM memory manager
Related-To: NEO-5498

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-03-10 11:47:34 +01: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
Pawel Cieslak 8a700c5187 Move non-ult shared files to single directory
Add SKIP_SHARED_UNIT_TESTS flag

Related-To: NEO-5201
Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
2021-02-10 21:03:13 +01:00
Mateusz Jablonski 1b7d7afc07 Refactor USM properties
store reference to std of root device indices and device bitfields
store NEO::Device in USM properties

Related-To: NEO-3691
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-12-30 11:36:56 +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
Mateusz Hoppe 4d2750161d Move OsAgnosticMemoryManager to shared
Resolves: NEO-5188
-move MockGraphicsAllocation to shared

Change-Id: I17e90af48183f003151fab075a46e40d7df3f160
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-11-02 21:02:53 +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
Andrzej Swierczynski bdf8c5fc90 Extend UnifiedMemoryProperties constructor to take device bitfield
Related-To: NEO-4722

Change-Id: Ice185f1792635922e9bb89cd7329e6501bc585e0
Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
2020-10-06 16:35:08 +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
Andrzej Swierczynski 52622eab67 Correct tests: pass valid device bitfield [2/n]
Related-To: NEO-4645

Change-Id: I5fe52cd9ffefea4f131a5b79b292175106a082c0
Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
2020-06-05 10:05:10 +02:00
Bartosz Dunajski 9453c5dc65 Rename duplicated filenames
Change-Id: Ifb30be582c0884d151b57c57a5b5fa77d2c64b57
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2020-04-23 09:48:58 +02:00
Filip Hazubski 214585eb1b Add REQUIRE_SVM_OR_SKIP helper macro for tests
Change-Id: I07fbde14a0d3be801087561b8460b15b857c3f2e
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-04-01 15:59:18 +02:00
Bartosz Dunajski e2b7f599b9 Add missing override
Change-Id: Ife3cd59e43d315ecf3604e57b4cb1d4bea0c45d7
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2020-03-27 14:53:05 +01:00
Lukasz Jobczyk 3bbc07dda7 Add option to skip USM tests
Resolves: NEO-4481

Change-Id: I44cc192b95fa3db0cbe359902572235512e8fccd
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-03-19 10:28:34 +01:00
Lukasz Jobczyk a1c6b0f4a7 Use hwInfo from root device environment [4/N]
Related-To: NEO-3857

Change-Id: I50003aa1cf2c866827e98fa69212e11d190fda36
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-03-03 19:31:19 +01:00
Mateusz Jablonski 9dbeeea18f Clang-format: restore sorting includes
Change-Id: I34eb993b562c77f56d8fbd51a02ee266c1f76678
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-24 10:22:30 +01:00
Mateusz Jablonski ee5ebde417 Add absolute include paths
Change-Id: I5b8631603b0f0b2ed8eb1a61f7e7770b27867423
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-24 01:21:00 +01:00
kamdiedrich 9e97b42ee6 Reorganization directory structure [4/n]
Change-Id: Ib868ed62d12ea8f9f123644219ba299e86a658ac
2020-02-24 01:04:42 +01:00