Commit Graph

732 Commits

Author SHA1 Message Date
Mateusz Jablonski 895a586083 refactor: use reference in for-range loops
Related-To: NEO-9038
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-10-03 18:56:53 +02:00
John Falkowski 56f05303c9 feature: add support for zeMemGet/SetAtomicAccessAttributeExp
Resolves: NEO-8219

Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-10-02 15:59:17 +02:00
Dunajski, Bartosz c5f5f60f8d feature: cross CmdList and Event in-order data sharing [1/n]
Related-To: NEO-7966

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2023-09-29 11:14:18 +02:00
Mateusz Jablonski 7d356795f0 fix: ensure memory placement key does not apply to unknown alloc type
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-09-28 08:43:30 +02:00
Katarzyna Cencelewska e71db368db fix: use proper pointer inside appendWriteGlobalTimestamp
Resolves: NEO-8105
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2023-09-27 14:00:37 +02:00
Dunajski, Bartosz 202a33ffac feature: track InOrder allocation ownership
CmdList can be released before Event. In this case, GfxAllocation
destruction must be deferred.

Related-To: NEO-7966

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2023-09-25 15:03:25 +02:00
Mateusz Hoppe 371412a826 refactor: remove useLocalMem from allocate32BitGraphicsMemoryImpl
- this method allocates System Memory
- argument is not needed - ExternalHeap is selected inside this function
- remove unneeded ults
- allocate memory in Device Pool for external heap allocation in
OsAgnosticMemoryManager

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-09-18 10:08:09 +02:00
Baj, Tomasz e10f39017d fix: Add ImageInfo to createGraphicsAllocation on Linux
Related-To: NEO-6757

Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
2023-09-14 12:58:59 +02:00
Slawomir Milczarek 5833d65bc0 feature: Add support for memadvise with system preferred location
Related-To: NEO-7851

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2023-08-31 13:09:55 +02:00
Mateusz Jablonski a4addad510 refactor: prework for defining preferred allocation method per allocation type
Related-To: HSD-18032442707, HSD-18032440987
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-08-30 12:17:33 +02:00
Mateusz Hoppe 00de13939d feature: bindless addressing allocator - reuse of bindless slots
- introduce 2 reuse pools to bindlessHeapHelper
- one pool stores slots for reuse, second pool stores released slots
- stateCacheDirty flags keep track of state cache - when pools are
switched - flags are set indicating flushing caches is needed after
old slots have been reused for new allocations

Related-To: NEO-7063

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-08-29 09:51:36 +02:00
Mateusz Hoppe 8435160db4 feature: bindless addressing for images
- program surface states for redescribed images correctly. Image copy
to/from memory are using redescribed surface states,
- refactor state base address programming - program address and size
together, set max size at the beginning due to lack of Enable flag
- set GpuBase in WddmAllocation when external heap is used
- return max ssh required size from kernelInfo or based on stateful args

Related-To: NEO-7063

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-08-18 15:59:20 +02:00
John Falkowski 2403212dcd fix: chunking prefetch add USER_FENCE
Add USER_FENCE before PREFETCH call and after the BIND

Related-To: NEO-8098

Signed-off by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-08-17 21:32:47 +02:00
Compute-Runtime-Validation ce7b25d445 Revert "fix: use proper pointer inside appendWriteGlobalTimestamp"
This reverts commit 5a235af209.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-08-14 10:54:20 +02:00
Lukasz Jobczyk 3ab72e7d79 fix: Align svm cpu to alignment passed to properties
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-08-11 14:57:49 +02:00
Katarzyna Cencelewska 5a235af209 fix: use proper pointer inside appendWriteGlobalTimestamp
Related-To: NEO-8105
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2023-08-11 08:18:45 +02:00
Compute-Runtime-Validation 820e94e89c Revert "fix: Align svm cpu to alignment passed to properties"
This reverts commit d66da494d4.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-08-11 07:14:30 +02:00
Lukasz Jobczyk d66da494d4 fix: Align svm cpu to alignment passed to properties
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-08-09 11:52:21 +02:00
Milczarek, Slawomir f3f623900a fix: memory prefetch for kmd migrated shared alloc to check for invalid usm ptr
Fix for SIGSEGV in SYCL_CTSO0Debug-usm_api_prefetch_handler_no_events_l0
./run_l0.sh usm_api_prefetch_handler_no_events test_usm

Related-To: LOCI-4742

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-08-08 11:29:14 +02:00
Mateusz Jablonski 98fd9f5687 performance: change preferred allocation method on MTL devices
prefer allocating resources by KMD

Related-To: NEO-7194
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-07-31 10:45:43 +02:00
Mateusz Jablonski c68c41c8c4 refactor: prework for setting preferred allocation method per platform
Related-To: NEO-7194
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-07-28 19:54:35 +02:00
Milczarek, Slawomir 1195578d96 fix: KW issue with dereference in function call that may return null
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-07-27 07:39:15 +02:00
Mateusz Jablonski f84f22d23c refactor: remove unused isSharedContext variable
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-07-26 12:14:23 +02:00
Mateusz Hoppe 67d39f88e6 feature: bindless addressing - store bindlessInfo in allocation
- store surface state info for bindless addressing in graphics
allocation
- remove map in BindlessHeapsHelper - bindlessInfo is constant for
the lifetime of an allocation
- program bindless offsets and surface states for images when used in
bindless kernel
- handle ouf of memory on surface state heap - return error

Related-To: NEO-7063

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-07-24 14:48:35 +02:00
Luzynski, Sebastian Jozef c141fbaf74 fix: Adjust zeVirtualMem functions to store size provided by user
Related-To: LOCI-3397

Signed-off-by: Luzynski, Sebastian Jozef <sebastian.jozef.luzynski@intel.com>
2023-07-13 14:17:21 +02:00
Lu, Wenbin 4de792cee0 fix: support alignments in host and shared UnifiedMemoryAllocation
Related-To: LOCI-4334

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-07-13 08:48:41 +02:00
Young Jin Yoon 81822e3716 refactor: rename pageSize2Mb to pageSize2M
The previous name "pageSize2Mb" defined in
shared/source/helpers/constant.h is inconsistent to other variable,
i.e. pageSize64k.

Furthermore, it's a bit misleading because the page size is defined in
Megabytes (MB), not in Megabits (Mb).

Related-to: NEO-7695
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2023-07-10 20:12:09 +02:00
Compute-Runtime-Validation 02436b8877 Revert "fix: support alignments in host and shared UnifiedMemoryAllocation"
This reverts commit c11809e002.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-06-14 06:32:40 +02:00
Jitendra Sharma 38415162c5 fix: While creating shared memory use given device
When creating shared USM, currently default root device index
is used when accessing memoryManager.
This change fixes this issue, by using device provided by caller.
In case device is not provided, then default root device index
could be used.

Related-To: LOCI-4474

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2023-06-13 15:44:14 +02:00
Lu, Wenbin c11809e002 fix: support alignments in host and shared UnifiedMemoryAllocation
Related-To: LOCI-4334

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-06-13 10:01:11 +02:00
Dunajski, Bartosz 5fe9d70066 feature: new multitile post sync layout for immediate write [1/n]
No functional changes in this commit. This is prework.

Related-To: NEO-7966

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2023-06-07 13:11:10 +02:00
Neil R Spruit ba6d447b4d feature: Support for using Reserved address with multiple mappings
Related-To: LOCI-4381

- Enabled support for customers to use full Virtual reservation range
with multiple physical mappings with additional allocations implicitly
included in residency.
- Buffer Surface state size extended for first allocation to stretch to
the bufferSize requested.

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2023-06-07 03:12:29 +02:00
Mateusz Hoppe 0844ca0ac8 refactor: cleanup getBindlessMode() usage
- getGlobalBindlessHeapConfiguration() should be used to choose global
alloctor for SSH
- remove not needed and incorrect unit tests
- remove not needed branches
- bindless mode controls bindless compilation only

Related-To: NEO-7063

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-06-06 17:23:13 +02:00
Jaime Arteaga 2efd6e547a feature: Add support for chunking in the UMD (1/N)
Read if support for chunking is available in the KMD.
If available, KMD will create a BO with 1 or more chunks,
depending on the chunk size selected.

Related-To: NEO-7695

Sync to
https://github.com/intel-gpu/drm-uapi-helper/releases/tag/v2.0-rc18

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-06-02 23:27:40 +02:00
Mateusz Hoppe 1c196b9f3d refactor: change ApiSpecificConfig functions names
- better description of the meaning of functions

Related-To: NEO-7063

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-05-30 09:20:01 +02:00
Neil R Spruit ded9d7bff2 feature: Get Peer Allocation with specified base Pointer
Related-To: LOCI-4176

- Given a Base Pointer passed into Get Peer Allocation, then the base
pointer is used in the map of the new allocation to the virtual memory.
- Enables users to use the same pointer for all devices in Peer To Peer.
- Currently unsupported on reserved memory due to mapped and exec
resiedency of Virtual addresses.

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2023-05-24 20:41:20 +02:00
Lukasz Jobczyk 8e51d9ae90 fix: add missing host ptr assignment increment
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-05-22 11:54:24 +02:00
Lukasz Jobczyk bb86dba152 fix: add missing host ptr assignment increment
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-05-19 14:53:27 +02:00
Compute-Runtime-Validation b2b41e613b Revert "fix: add alignment support to host and shared UnifiedMemoryAllocation"
This reverts commit c3df92ac41.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-05-12 13:04:08 +02:00
Mateusz Jablonski f3a89bfe07 fix: add missing settings of isLockable flag in WddmMemoryManager class
- allocateGraphicsMemoryUsingKmdAndMapItToCpuVA in case of no compression
- allocate32BitGraphicsMemoryImpl in case of allocate by KMD

remove redundant ctor of StorageInfo class

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-05-11 12:14:18 +02:00
Lu, Wenbin c3df92ac41 fix: add alignment support to host and shared UnifiedMemoryAllocation
Related-To: LOCI-4334

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-05-11 11:45:12 +02:00
Mateusz Jablonski 1948781b67 fix: set isLockable flag in storage info even if no memory banks are used
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-05-11 07:26:28 +02:00
Lu, Wenbin 5d653c8536 fix: Add alignment support to createUnifiedMemoryAllocation
Allows the user to use alignments > 64KB in `createUnifiedMemoryAllocation`

So that the restriction in `piextUSMDeviceAlloc` of the DPC++ runtime
could be lifted

Related-To: LOCI-4168

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-05-02 09:19:23 +02:00
Fabian Zwolinski cbce863dc2 refactor: Rename member variables to camelCase 3/n
Additionally enable clang-tidy check for member variables

Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-04-28 16:01:14 +02:00
Mateusz Jablonski fd1ad7c1f0 feature: setup heap extended host size based on system memory size
Related-To: NEO-7665
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-04-28 15:23:01 +02:00
Mateusz Jablonski 5a5c20f99c fix: create separate heap for host and shared usm in 48-56b VA
Related-To: NEO-7665
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-04-28 10:09:38 +02:00
Fabian Zwolinski e351a90f81 refactor: Rename member variables to camelCase 2/n
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-04-27 20:39:22 +02:00
Mateusz Jablonski 2f9135a4e6 fix: change type of container with registered engines per root device
use StackVec instead of unordered map
resize container at MemoryManager's creation time

Related-To: NEO-7925
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-04-27 17:06:42 +02:00
Mateusz Jablonski 32d8a3bc6d fix: store registered engines per root device
in most cases we need to iterate over engines associated to single root device

Related-To: NEO-7925
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-04-27 10:54:07 +02:00
Spruit, Neil R 364c2da9fb feature: Add Support for zeMemPutIpcHandle & zeMemGet IPC Handle converters
Related-To: LOCI-4172, LOCI-4305, LOCI-4306

- Create a new IPC Memory handle upon call to getIpcMemHandle if the
previous handle has been freed.
- Release the Ipc Memory Handle when zeMemPutIpcHandle is called.
- Create a new IPC Handle for tracking thru zeMemGetAllocProperties
when ze_external_memory_export_fd_t is used.
- Convert FD to opaque IPC handle and IPC Handle to FD.

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2023-04-27 03:53:52 +02:00
Krzysztof Gibala 16db7cc890 fix: Add missing checks in multi gpu scenario
- 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>
2023-04-24 23:26:28 +02:00
Maciej Bielski d4de925711 refactor: add isKernelIsaAllocationType helper
Preparatory step, the helper will be also used by following changes.

Related-To: NEO-7788
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2023-04-24 17:16:11 +02:00
rcombs fc53bbe183 unified_memory_manager: mark comparison operators as const
This fixes the build on some compilers.

Signed-off-by: rcombs <rcombs@rcombs.me>
2023-04-24 10:47:30 +02:00
Compute-Runtime-Validation 858ed05466 Revert "[fix] zeCommandListAppendMemAdvise to clear preferred location correc...
This reverts commit 63470ed698.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-04-20 11:04:34 +02:00
Milczarek, Slawomir 63470ed698 [fix] zeCommandListAppendMemAdvise to clear preferred location correctly
The memadvise with preferred location for kmd-migrated shared allocation
is set to device associated with cmd list by default to migrate data
to lmem on non-atomic gpu page fault too (for performance reasons).

Related-To: NEO-7252

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-04-19 09:55:32 +02:00
Milczarek, Slawomir 01d03aa5b6 Extended regkey to force prefetch of shared memory in enqueue commands
Extended the regkey ForceMemoryPrefetchForKmdMigratedSharedAllocations
to force meory prefetch of kmd-migrated shared allocation
in clEnqueueNDRangeKernel(), clEnqueueMemFillINTEL, ...

Related-To: NEO-7841

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-04-11 11:23:48 +02:00
John Falkowski e056082710 refactor graphics allocation structure elements for sub-allocation properties
Resolves:  LOCI-3772

Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-04-07 16:53:23 +02:00
Dominik Dabek 1c52017ceb fix: use correct allocation type in program init
Globals surface allocation via USM manager will have correct allocation
type set (instead of just BUFFER) and will use cpu copy when possible.

Related-To: NEO-7796

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2023-04-04 11:31:11 +02:00
Compute-Runtime-Validation 2b93126795 Revert "Add alignment support to createUnifiedMemoryAllocation"
This reverts commit ca02bbba4b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-03-30 15:43:47 +02:00
Mateusz Jablonski 8119905325 fix usm shared: propagate resource48Bit when allocating with kmd migrations
Related-To: NEO-7665
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-03-30 13:00:40 +02:00
Mateusz Jablonski 5d482ffe87 refactor: add constexpr for tera byte
Related-To: NEO-7665
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-03-28 12:55:52 +02:00
Mateusz Jablonski 7e5e27f0b9 feature usm: reserve heap extended in 57 bit address space
use mocked mmap function in unit tests

Related-To: NEO-7665
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-03-28 11:06:03 +02:00
Lu, Wenbin ca02bbba4b Add alignment support to createUnifiedMemoryAllocation
Allows the user to use alignments > 64KB in `createUnifiedMemoryAllocation`

So that the restriction in `piextUSMDeviceAlloc` of the DPC++ runtime
could be lifted

Related-To: LOCI-4168

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-03-28 10:57:04 +02:00
Igor Venevtsev 062abef8ef Revert "Deferred deletion of allocations in main thread"
This reverts commit 2ea734491a.

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2023-03-20 18:17:15 +01:00
John Falkowski a1e2eca9e8 Add zeMemGetAllocProperties extension for sub-allocations
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-03-17 21:21:44 +01:00
Kamil Kopryk fa8579602f refactor: rename product helper files n/n
Related-To: NEO-7703
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-03-10 13:24:38 +01:00
Mateusz Hoppe 37dbec305d feature: add AssertHandler
- initial implementation to support assert() on GPU

Related-To: NEO-5753

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-03-08 17:55:23 +01:00
Spruit, Neil R 86e739e9dc feature: Relaxed Virtual Memory reservation with pStart
Related-To: LOCI-3871

- Relaxed the Virtual Memory Reservation to allow pStart and not fail if
the pStart value is not obtained.
- Moves checks on pStart to the user to check and determine if they want
to re-reserve or use the address allocated.
- Changed reserveGpuAddress to use unit64_t type to allow internal
address range structure assignment without cast.

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2023-03-08 08:06:50 +01:00
Mateusz Jablonski 8194543ae5 refactor raytracing: unify RT programming logic
reuse EncodeEnableRayTracing in CommandStreamReceiver
add method to determine need for 48b resource flag for RT allocations
Related-To: NEO-7606

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-03-07 11:51:58 +01:00
Cencelewska, Katarzyna 50da32ffb1 wa: add dummy blits before command MI_ARB_CHECK
to guarantee that all subblt got complete for previous copy
affect xe hpg

Related-To: NEO-7450

Signed-off-by: Cencelewska, Katarzyna <katarzyna.cencelewska@intel.com>
2023-03-07 10:21:05 +01:00
Milczarek, Slawomir 674691d170 Fix check for page faults enabled in get memory access properties
Related-To: NEO-6465

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-02-28 10:13:25 +01:00
Lukasz Jobczyk 2f5be7a48d Copy command buffer into ring buffer
Resolves: NEO-7422

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-02-22 16:37:34 +01:00
Wrobel, Patryk d8a65c6958 Try to use provided pointer when dual storage shared memory is not supported
If user provided not-null hostptr field, then the driver
should try to use it. This change adds omitted functionality,
which handles the described case also in createUnifiedMemoryAllocation().

Related-To: NEO-7600
Signed-off-by: Wrobel, Patryk <patryk.wrobel@intel.com>
2023-02-21 09:08:11 +01:00
Zbigniew Zdanowicz b4544f6f78 Fix dependency resolve in level zero black box tests
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-02-21 08:25:07 +01:00
Warchulski, Jaroslaw b485c025d0 Cleanup includes 57
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-02-17 11:19:59 +01:00
Neil Spruit 2aaebddb37 Revert "Heap allocation allow base address and growable addresses"
This reverts commit 44ec497b1a.

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2023-02-15 18:34:40 +01:00
Warchulski, Jaroslaw 8c17313c8b Cleanup includes 53
Cleaned up files:
opencl/source/mem_obj/image.inl
shared/offline_compiler/source/decoder/zebin_manipulator.h
shared/source/aub_mem_dump/aub_alloc_dump.h
shared/source/compiler_interface/intermediate_representations.h
shared/source/helpers/blit_commands_helper_base.inl
shared/source/utilities/debug_file_reader.h
shared/source/utilities/software_tags.h
shared/source/xe_hpc_core/hw_cmds_pvc.h

Related-To: NEO-5548

Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-02-15 13:21:14 +01:00
Mateusz Jablonski 51887af219 refactor OCL: cleanup after moving multi root device buffers to local mem
remove debug flag AllocateBuffersInLocalMemoryForMultiRootDeviceContexts

Related-To: NEO-5735
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-02-15 09:41:20 +01:00
Spruit, Neil R 44ec497b1a feature: Allow for Allocating a base address in the heap and grow an allocation
Related-To: LOCI-3871

- Enabled allocation of specified base address in the targeted heap.
- Enabled virtual memory reservations to grow by allocating at the start
of the heap vs the end of the heap.

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2023-02-15 08:13:38 +01:00
Wrobel, Patryk 4c58eda90d Ensure that BO handle is closed only once
When one process had exported and then opened IPC handle
of memory, then close function was called twice for the
same BO handle. It caused debugBreak() and aborted
an application.

This change allows multiple separate BOs to share one
handle. The last shared handle owner calls close() function.

Related-To: NEO-7200
Signed-off-by: Wrobel, Patryk <patryk.wrobel@intel.com>
2023-02-13 14:42:49 +01:00
Warchulski, Jaroslaw a2e6a8284b Cleanup includes 47
Cleaned up files:
level_zero/tools/source/debug/windows/debug_session.h
level_zero/tools/source/sysman/memory/windows/os_memory_imp.h
level_zero/tools/source/sysman/windows/kmd_sys_manager.h
opencl/test/unit_test/aub_tests/command_stream/copy_engine_aub_tests_xehp_and
shared/source/command_container/command_encoder.inl
shared/source/command_stream/command_stream_receiver_hw_xehp_and_later.inl
shared/source/helpers/blit_commands_helper_base.inl
shared/test/unit_test/image/image_surface_state_fixture.h
shared/test/unit_test/os_interface/windows/os_interface_win_tests.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-02-10 17:07:30 +01:00
Kacper Nowak 7790e208fd feat(zebin): Add support for ELF section type SHT_NOBITS
This commit adds support for parsing SHT_NOBITS zebin's ELF sections
(containing global/constant zero-initialized data).
- Correction: in CTNI path, do not add related symbol if surface has not
been allocated.

Related-To: NEO-7196
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-02-10 16:17:16 +01:00
Compute-Runtime-Validation d0c0c60205 Revert "feat(zebin): Add support for ELF section type SHT_NOBITS"
This reverts commit fa03aa9a40.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-02-03 03:44:02 +01:00
Kacper Nowak fa03aa9a40 feat(zebin): Add support for ELF section type SHT_NOBITS
This commit adds support for parsing SHT_NOBITS zebin's ELF sections
(containing global/constant zero-initialized data).

Related-To: NEO-7196
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-02-02 14:54:51 +01:00
Mateusz Jablonski b931f31f3d debug: Reduce debug logs when changing allocation type
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-02-02 11:05:46 +01:00
Kamil Kopryk 2484c7ceb2 refactor: rename hw_helper files to gfx_core_helper files
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-02-01 19:37:51 +01:00
Michal Mrozek 2f847aa7bb Optimize zeMemGetAllocProperties.
- No functional changes only performance optimizations.
- add const modifiers
- add early returns
- remove not needed code
- do fast lookup for aligned pointers
- fix incorrect tests

+21% improvement in
./api_overhead_benchmark_l0 --test=GetMemoryProperties
--api=l0 --AmountOfUsmAllocations=100 --iterations=1000
+32% improvement in
./api_overhead_benchmark_l0 --test=GetMemoryProperties
--api=l0 --AmountOfUsmAllocations=1000 --iterations=1000

Related-To: NEO-7676

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2023-01-30 18:00:57 +01:00
Spruit, Neil R b5692c04cd Support Mapping Multiple Physical Memory with one VA and Bug Fix
- Added support for mapping any portion of a virtual allocation to a
physical mapping with a lookup function for reserved virtual addresses.
- Added support for multiple mappings linked to the same virtual
reservation.
- Fixed bug with 64 bit addresses on windows with invalid addresses
passed to the user.

Related-To: LOCI-3904, LOCI-3914, LOCI-3931

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2023-01-30 02:36:10 +01:00
Kamil Kopryk a72cae15fe refactor: don't use global ProductHelper getter 9/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-25 11:04:40 +01:00
Warchulski, Jaroslaw c43233dabf Cleanup includes 42
Cleaned up files:
level_zero/core/source/kernel/kernel_hw.h
shared/source/helpers/common_types.h
shared/test/common/libult/linux/drm_mock.h
shared/test/common/libult/ult_command_stream_receiver.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-25 09:16:39 +01:00
Warchulski, Jaroslaw bc13db734d Cleanup includes 41
Cleaned up files:
shared/source/command_stream/aub_command_stream_receiver_hw.h
shared/source/helpers/common_types.h
shared/source/os_interface/linux/drm_neo.h
shared/source/os_interface/windows/hw_device_id.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-24 14:37:36 +01:00
Kamil Kopryk a3212f8362 refactor: don't use global ProductHelper getter 8/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-24 10:43:59 +01:00
Kamil Kopryk e9990dd124 refactor: don't use global ProductHelper getter 6/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-23 14:03:51 +01:00
Warchulski, Jaroslaw 76faad3398 Cleanup includes 36
Cleaned up files:
shared/source/helpers/blit_commands_helper.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-20 10:10:40 +01:00
Spruit, Neil R f928d695e7 Support for Mapping Physical with Virtual Memory
Related-To: LOCI-3422, LOCI-3421

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2023-01-20 05:17:10 +01:00
Warchulski, Jaroslaw 77501d86ba Cleanup includes 35
Cleaned up files:
shared/source/command_stream/command_stream_receiver.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-17 18:51:40 +01:00
Warchulski, Jaroslaw 8de3898abc Cleanup includes 31
Cleaned up files:
shared/source/command_stream/experimental_command_buffer.h
shared/source/helpers/get_info.h
shared/source/helpers/local_id_gen.h
shared/source/memory_manager/gfx_partition.h
shared/source/memory_manager/host_ptr_manager.h
shared/source/memory_manager/prefetch_manager.h
shared/test/common/mocks/mock_memory_manager.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-16 11:45:55 +01:00
HeFan2017 2ea734491a Deferred deletion of allocations in main thread
Add a clearQueueTillFirstFailure interface to DeferredDeleter, which
iterates the queue from the front and delete the allocations in the
queue till a failure. It is called by defer deletion of allocations
occupied by mutliple contexts to unlock the execution in main thread

Related-To: NEO-7532

Signed-off-by: HeFan2017 <fan.f.he@intel.com>
2023-01-13 09:20:35 +01:00
Warchulski, Jaroslaw fecb52ac49 Cleanup includes 29
Cleaned up files:
opencl/source/helpers/cl_memory_properties_helpers.h
shared/source/memory_manager/surface.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-13 07:53:03 +01:00
John Falkowski 01017a5df3 L0: add support for deferred memory free as per ContextImp::freeMemExt
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-01-12 21:05:02 +01:00
Warchulski, Jaroslaw 191d4de033 Cleanup includes 28
Cleaned up files:
opencl/source/command_queue/command_queue.h
opencl/source/command_queue/gpgpu_walker.h
shared/source/helpers/memory_properties_helpers.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-11 17:47:33 +01:00
Warchulski, Jaroslaw 4794648978 Cleanup includes 26
Cleaned up files:
opencl/source/command_queue/csr_selection_args.h
opencl/source/event/event.h
shared/source/helpers/engine_control.h
shared/source/sku_info/definitions/sku_info.h

Related-To: NEO-5548

Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-11 09:10:45 +01:00
Warchulski, Jaroslaw 0dc5fb3e51 Cleanup includes 24
Cleaned up files:
opencl/source/mem_obj/image.h
opencl/source/platform/platform.h
shared/source/command_stream/preemption.h
shared/source/helpers/mt_helpers.h
shared/source/memory_manager/unified_memory_manager.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-10 07:56:16 +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
Compute-Runtime-Validation af81c79076 Revert "Deferred deletion of allocations in main thread"
This reverts commit c268e30189.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-01-04 18:33:39 +01:00
Kamil Kopryk 0dbf92d401 Refactor: reduce global productHelper getter usage
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-04 16:35:20 +01:00
Warchulski, Jaroslaw 6fb68dd84b Separation of MemoryAllocation from os_agnostic_memory_manager.h
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-04 15:09:36 +01:00
HeFan2017 c268e30189 Deferred deletion of allocations in main thread
Add a clearQueueTillFirstFailure interface to DeferredDeleter, which
iterates the queue from the front and delete the allocations in the
queue till a failure. It is called by defer deletion of allocations
occupied by mutliple contexts to unlock the execution in main thread

Related-To: NEO-7532

Signed-off-by: HeFan2017 <fan.f.he@intel.com>
2023-01-03 13:51:15 +01:00
Warchulski, Jaroslaw 0eac749fcc Cleanup includes 19
Cleaned up files:
opencl/source/api/cl_types.h
shared/source/compiler_interface/external_functions.h
shared/source/compiler_interface/linker.h
shared/source/device_binary_format/elf/elf.h
shared/source/helpers/preamble.h
shared/source/memory_manager/definitions/storage_info.h
shared/source/memory_manager/memory_manager.h
shared/source/memory_manager/os_agnostic_memory_manager.h
shared/source/program/program_info.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-03 11:02:05 +01:00
Warchulski, Jaroslaw 9f3fc6858e Cleanup includes 16
Cleaned up files:
shared/source/built_ins/built_ins.h
shared/source/command_container/command_encoder.h
shared/source/helpers/hw_helper.h
shared/source/memory_manager/allocation_properties.h
shared/source/xe_hpc_core/hw_cmds.h
shared/test/common/test_macros/test_excludes.h

Related-To: NEO-5548

Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-29 15:12:37 +01:00
Warchulski, Jaroslaw c3a86232d9 Cleanup includes 15
Cleaned up files:
shared/source/command_stream/command_stream_receiver.h
shared/source/command_stream/submissions_aggregator.h
shared/source/helpers/flat_batch_buffer_helper.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-23 12:36:51 +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 7d0ef38a83 Limit blit height on PVC
Resolves: NEO-7540

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-12-22 14:52:09 +01:00
Compute-Runtime-Validation 429755e0f4 Revert "Check for context in appendMemoryCopy"
This reverts commit 32bab85f7e.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-21 05:38:37 +01:00
Neil R Spruit a829ce8941 Fix ReserveGPUAddress to reserve on specific RootDevice indices
Related-To: LOCI-3790

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2022-12-20 23:08:02 +01:00
Compute-Runtime-Validation cac134028c Revert "Deferred deletion of allocations in main thread"
This reverts commit 418e0f7322.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-20 18:02:27 +01:00
HeFan2017 418e0f7322 Deferred deletion of allocations in main thread
Add a clearQueueTillFirstFailure interface to DeferredDeleter, which
iterates the queue from the front and delete the allocations in the
queue till a failure. It is called by defer deletion of allocations
occupied by mutliple contexts to unlock the execution in main thread.

Related-To: NEO-7532

Signed-off-by: HeFan2017 <fan.f.he@intel.com>
2022-12-20 10:11:56 +01:00
Jaime Arteaga 32bab85f7e Check for context in appendMemoryCopy
Confirm the allocations used in an appendMemoryCopy operation
belong to the same context as the list.

Related-To: LOCI-1996
Resolves: NEO-6162

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-12-20 00:13:36 +01:00
Kamil Diedrich b36aa626bc Add support for USM shared in WSL for dGPU
This patch force KMD allocation path for USM shared
Additionally we force 64kb page from lock which is
required to properly program GPU VA

Related-To: NEO-6913
Signed-off-by: Kamil Diedrich kamil.diedrich@intel.com
2022-12-19 11:09:55 +01:00
Warchulski, Jaroslaw 803bbb89d2 Cleanup includes 13
Cleaned up files:
shared/source/helpers/blit_commands_helper.h
shared/source/helpers/heap_assigner.h
shared/source/memory_manager/alignment_selector.h
shared/source/memory_manager/gfx_partition.h
shared/source/memory_manager/memory_manager.h
shared/source/os_interface/os_memory.h
shared/source/utilities/heap_allocator.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-16 12:36:27 +01:00
Compute-Runtime-Validation 5a29cf8508 Revert "Check for context in appendMemoryCopy"
This reverts commit afd0784c16.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-16 03:28:06 +01:00
Jaime Arteaga afd0784c16 Check for context in appendMemoryCopy
Confirm the allocations used in an appendMemoryCopy operation
belong to the same context as the list.

Related-To: LOCI-1996
Resolves: NEO-6162

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-12-15 23:42:10 +01:00
Kamil Kopryk 232b886056 Rename HwInfoConfig to ProductHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-14 14:39:52 +01:00
Mateusz Jablonski ecea487cf0 Reduce usage of global gfx core helper getter [2/n]
Related-To: NEO-6853
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-12-12 13:43:21 +01:00
Compute-Runtime-Validation c54c3d796c Revert "Set isLockable if size small enough for cpu memcpy"
This reverts commit 41a80072b9.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-12 09:24:14 +01:00
Szymon Morek 41a80072b9 Set isLockable if size small enough for cpu memcpy
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-12-09 16:33:32 +01:00
Kamil Kopryk 03b687881f Rename HwHelper -> GfxCoreHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-09 10:29:06 +01:00
Jaime Arteaga 675272a32c Return a unique pointer for multiple calls to openIpcHandles
This to make zexMemOpenIpcHandles and zeMemOpenIpcHandle
behave similarly.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-12-08 21:56:21 +01:00
Slawomir Milczarek 5c1b50bccf Add memory prefetch modes for single and multiple subdevices
Single-subdevice prefetch for cmd list copy-only (with bcs) and acc mode.
Multi-subdevice prefetch (default) for shared allocation with multiple BOs.

Related-To: NEO-6740

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2022-12-07 15:25:32 +01:00
Mateusz Jablonski e3ede4bb92 Correct naming in memadvise flags
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-12-07 14:49:43 +01:00
Warchulski, Jaroslaw be647d42d9 Cleanup includes 12
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-07 13:14:15 +01:00
Warchulski, Jaroslaw c10aa90815 Cleanup includes 11
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-06 12:25:30 +01:00
Warchulski, Jaroslaw 1fa5710dff Cleanup includes 10
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-05 12:39:33 +01:00
Lukasz Jobczyk 7c572b4090 Do not free SVM alloc under SVM manager lock
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-12-02 12:36:10 +01:00
Lukasz Jobczyk dbc6ac2743 Set alignment for SVM_CPU properties on xe_hpc and later
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-12-02 12:35:54 +01:00
Compute-Runtime-Validation 083471a158 Revert "Set alignment for SVM_CPU properties"
This reverts commit db89d2ce6b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-02 08:17:13 +01:00
Jaime Arteaga 99655d34f9 Return a unique pointer for multiple calls to openIpcHandle
This to follow specification, which says:

zeMemOpenIpcHandle:

- Multiple calls to this function with the same IPC handle will return
unique pointers.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-12-01 18:42:54 +01:00
Lukasz Jobczyk db89d2ce6b Set alignment for SVM_CPU properties
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-12-01 10:45:47 +01:00
Spruit, Neil R d81b0b14a1 L0 Virtual Memory Reservation support
- Enable support for L0 Virtual Memory reservation on Linux and Windows.
- Excludes support for Linux to allow pStart option

Related-To: LOCI-3397, LOCI-1543

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2022-12-01 00:55:19 +01:00
Jaime Arteaga 4dfdbd612d Fail when handle cannot be obtain for an allocation
If a handle cannot be obtained, like PRIME_HANDLE_TO_FD, then
properly check for the error and propagate it upwards.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-11-30 20:59:02 +01:00
Lukasz Jobczyk 7ea11f9e44 Remove 2MB alignment from host part of shared allocation
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-11-30 17:04:24 +01:00
Warchulski, Jaroslaw dfa65bd358 Cleanup includes 9
Related-to: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-11-30 14:48:50 +01:00
Warchulski, Jaroslaw 4100e1aa72 Cleanup includes 7
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-11-28 17:01:48 +01:00
Maciej Plewka 4b42b066f8 Use dedicated using type for TaskCount
Related-To: NEO-7155

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2022-11-28 16:44:44 +01:00
Compute-Runtime-Validation 7b195d6b8e Revert "Add support for USM shared in WSL for dGPU"
This reverts commit 44d8a6ae2b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-11-25 08:42:15 +01:00
Milczarek, Slawomir 4476e7ad76 Fixed conditions to remove memory prefetch allocations in L0 backend
Ensure memory prefetch be applied in every execution of command list.

Related-To: NEO-6740

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-11-23 16:19:34 +01:00
Kamil Diedrich 44d8a6ae2b Add support for USM shared in WSL for dGPU
This patch force KMD allocation path for USM shared
Additionally we force 64kb page from lock which is
required to properly program GPU VA

Related-To: NEO-6913
Signed-off-by: Kamil Diedrich kamil.diedrich@intel.com
2022-11-23 12:41:25 +01:00
Compute-Runtime-Validation 565d44e59c Revert "Fail when handle cannot be obtain for an allocation"
This reverts commit 4391ad21bb.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-11-23 05:45:01 +01:00
Jaime Arteaga 4391ad21bb Fail when handle cannot be obtain for an allocation
If a handle cannot be obtained, like PRIME_HANDLE_TO_FD, then
properly check for the error and propagate it upwards.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-11-22 19:29:19 +01:00
Dominik Dabek 67bfebb25e Add additional create buffer arguments
Allow to: disable performance hints, make allocation lockable

Used in BufferPoolAllocator

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-11-21 16:19:53 +01:00
Warchulski, Jaroslaw 1c03361273 Cleanup includes 6
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-11-21 12:02:14 +01:00
Compute-Runtime-Validation 074a1e8583 Revert "Make small buffer allocations lockable"
This reverts commit 9b9b0f10ef.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-11-19 18:04:32 +01:00
Warchulski, Jaroslaw f35f59b573 Cleanup includes 5
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-11-18 22:46:38 +01:00
Dominik Dabek 9b9b0f10ef Make small buffer allocations lockable
Allocations of buffers <= 64KB will be lockable, to
allow copying through locked pointer.

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-11-18 16:07:50 +01:00
Lukasz Jobczyk e197736b6f Ensure base ptr is passed to PageFaultManager::removeAllocation
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-11-17 16:12:31 +01:00
Slawomir Milczarek ba003dd7dc Prefetch kmd-migrated shared allocation to multiple subdevices
Related-To: NEO-6740

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2022-11-17 15:24:54 +01:00
Dunajski, Bartosz 89b96e5e8f Introduce initial implementation of DirectSubmission relaxed ordering mode.
Initial implementation of task store section

Related-To: NEO-7458

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-11-17 12:23:29 +01:00
Mateusz Hoppe f19abda0e2 Set root device index in OsContext
- correclty choose default engine context accounting for root device
index and  subdevices bitfield

Related-To: NEO-7516

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-11-16 23:02:19 +01:00
Compute-Runtime-Validation 083168dafb Revert "Add support for USM shared in WSL for dGPU"
This reverts commit b0c97e49ea.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-11-16 10:09:42 +01:00
Mateusz Jablonski 6648adef15 Handle error in register memory allocation methods
Related-To: NEO-7412
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-11-15 17:23:55 +01:00
Kamil Kopryk 211cc8552a Move hwHelper ownership to RootDeviceEnvironment 4/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>

UseRootDeviceEnvironment getHelper<CoreHelper> for:
- isLocalMemoryEnabled
- getSipKernelType
- is1MbAlignmentSupported
2022-11-15 08:23:53 +01:00
Szymon Morek 3281dea1fe Allow debug allocs to use copyMemoryToAllocation
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-11-14 17:50:32 +01:00
Milczarek, Slawomir 25a5ed0dca Allocate buffers in local memory for PVC multi root device platforms (1/n)
PVC platform with no support for atomic operations on system memory
must always allocate buffers in local memory to avoid atomic access violation.
Note: the feature is being implemented under the new registry key
AllocateBuffersInLocalMemoryForMultiRootDeviceContexts (disabled by default)

Related-To: NEO-7092

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-11-14 13:56:50 +01:00
Kamil Diedrich b0c97e49ea Add support for USM shared in WSL for dGPU
This patch force KMD allocation path for USM shared

Related-To: NEO-6913
Signed-off-by: Kamil Diedrich kamil.diedrich@intel.com
2022-11-14 13:56:22 +01:00
Kamil Kopryk 002a90c717 Move hwHelper ownership to RootDeviceEnvironment 2/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>

UseRootDeviceEnvironment getHelper<CoreHelper> for:
- getMaxBarrierRegisterPerSlice
- getPaddingForISAAllocation
2022-11-10 16:39:39 +01:00
Lukasz Jobczyk ff500e0de6 Add support for external hostptr in shared allocations
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-11-09 14:48:01 +01:00
Szymon Morek c9fad505d7 Replicate CONSTANT_SURFACE across tiles
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-11-08 20:35:43 +01:00
Warchulski, Jaroslaw fb25f96081 Cleanup includes 2
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-11-07 10:36:50 +01:00
Compute-Runtime-Validation d91d22d1fe Revert "Replicate CONSTANT_SURFACE across tiles"
This reverts commit 9a4467f368.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-11-05 07:16:15 +01:00
Szymon Morek 9a4467f368 Replicate CONSTANT_SURFACE across tiles
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-11-03 18:36:18 +01:00
Dominik Dabek 526ba1bde5 Fix l0 kernel set arg buffer caching
Fix for incorrect cache hit if alloc id was uninitialized
and allocations counter was the same.

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-10-27 17:25:10 +02:00
Patryk Wrobel 9b26e96b11 Do not copy std::vector of OS handles when it is not needed
This change replaces unneeded copying of std::vectors
with usage of const references. Furthermore, it adds
reserve() call before filling the container via push_back().

Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-10-21 10:28:58 +02:00
Mateusz Hoppe 0fdb308207 Use correct context for validateHostPtr
- with per context VMs, context with subdeviceBitfield must
be selected

Resolves: NEO-7426

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-10-18 13:10:28 +02:00
Maciej Plewka 1458602efc Store indirect residency at command queue level
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2022-09-22 14:07:19 +02:00
Mateusz Hoppe 92893a5101 L0Debug - add support for mirrored isa heaps
- allow tileInstanced ISA while debugging

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-09-20 19:32:00 +02:00
Compute-Runtime-Validation 643e21631c Revert "Store indirect residency at command queue level"
This reverts commit ffad5c6c09.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-09-20 18:12:12 +02:00
Michal Mrozek 3d5e34f727 Reduce the size of masks to 4.
32 is not required.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2022-09-19 21:53:40 +02:00
Maciej Plewka ffad5c6c09 Store indirect residency at command queue level
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>

Related-To: NEO-7211
2022-09-19 17:01:20 +02:00
Patryk Wrobel f6bf669ee9 Use forward declarations in compression_selector.h
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-09-14 11:54:24 +02:00
Dominik Dabek 16798467ac Add api specific config for allocation cache
Currently disabled for both opencl and level zero

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-09-05 21:15:18 +02:00
Patryk Wrobel 90ba50bf52 Warn when RAII lock returned from function is discarded
Discarding RAII lock returned from function almost always
is a bug. This change introduces usage of [[no_discard]]
attribute from C++17 to prevent such misues.

Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-09-01 16:53:03 +02:00
Dunajski, Bartosz 4809a2a9b3 Allow debug flag to apply allocation alignment for heaps
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-08-29 15:17:56 +02:00
Dominik Dabek 2d949a9f3d Fix device allocation cache
Do not use aligned size when storing allocation
Trim allocation cache before deleting devices

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-08-26 11:15:56 +02:00
Mateusz Hoppe 01b324953e L0Debug - allocate per-tile ISA when tileAttach is enabled
Related-To: NEO-5784

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-08-18 15:48:31 +02:00
Mateusz Jablonski 3d9b5d441a Add UNRECOVERABLE_IF to avoid nullptr dereference
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-08-09 15:44:49 +02:00
Lukasz Jobczyk eb8cd33dc6 Do not flush tag update if already flushed
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-08-08 14:11:42 +02:00
Neil R Spruit ada9b5d4a9 Handle if L0 Event Memory is Shareable
- Properly check for IPC event handle flag to determine if the event
pool memory is sharable between processes.
- Given Host Visible Event Pool, a check is done to determine if the
Host memory can be shared between the processes.
- Enabled handling if Event Host Memory is shareable for DRM
- If Event Pool Memory is Not shareable, then retrieving the IPC Event
Pool Handle returns unsupported.

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2022-08-05 00:11:05 +02:00
Milczarek, Slawomir 601ace6a25 Add unit test for append memory prefetch for regular command list
Related-To: NEO-6740

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-08-04 10:32:08 +02:00
Dunajski, Bartosz 98d776867f Add initial support for KernelArgsBuffer allocation
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-08-03 20:28:21 +02:00
Milczarek, Slawomir 046f9d95fc zeCommandListAppendMemoryPrefetch with memory prefetch manager
Related-To: NEO-6740

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-08-02 20:07:31 +02:00
Kamil Kopryk 17f22990e6 Cleanup includes 4/n
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-07-28 09:44:48 +02:00
Kamil Kopryk 0603819b68 Cleanup includes 3/n
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-07-27 15:28:13 +02:00
Kamil Kopryk d4d54f5093 Cleanup includes
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-07-25 09:58:38 +02:00
Lukasz Jobczyk 4ac6e09117 Do not reuse mem obj's allocation
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-07-19 11:42:17 +02:00
Milczarek, Slawomir 3e22f30ed5 clEnqueueMigrateMemINTEL with memory prefetch for KMD migrated shared allocation
Related-To: NEO-6740

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-07-14 17:35:22 +02:00
Daniel Chabrowski bdf0483068 Hide details of AllocationsList from header
Signed-off-by: Daniel Chabrowski <daniel.chabrowski@intel.com>
2022-07-14 12:19:19 +02:00
cameron 60c819bb72 Fix Memory leak in drm_memory_manager of OsHandleLinux
Add virtual deconstructor to OsHandle and deconstructor to OsHandleLinux
Add override keyword to destructor
Add overriding deconstructor to OsHandleWin
Add newline before private members

https://github.com/intel/compute-runtime/pull/550

Signed-off-by: Cameron S Murtagh <cameron.murtagh00@gmail.com>
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-07-13 11:23:48 +02:00
Compute-Runtime-Validation f53ae0a50e Revert "Add debug flag for EOT WA"
This reverts commit cf3817e058.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-07-09 01:21:56 +02:00
Mateusz Jablonski cf3817e058 Add debug flag for EOT WA
EOT WA requires allocating last 64KB of kernel heap and putting EOT
signature at the last 16 bytes of kernel heap

Related-To: NEO-7099
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-07-07 16:58:24 +02:00
Milczarek, Slawomir 6a9fcd38b1 Create KMD-migrated unified shared memory with multiple local memory regions
Remove the restriction on USM allocation created in a single local memory region
with latest KMD fix for cross tile migration thrashing b/t lmem (dii-3516)

Related-To: NEO-6909

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-07-04 13:33:23 +02:00
Mateusz Hoppe 31dbc04f23 L0Debug - capture SurfaceState heaps
Related-To: NEO-7103

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-06-24 15:05:56 +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
Maciej Plewka 213dc2fe24 Make CPU copy for read buffer when host ptr is write combined on DG2
With this commit on DG2 32bit driver will check if passed host ptr for
clEnqueueReadBuffer is write combined memory. If check will be true copy
will be make on CPU.

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2022-06-13 21:23:21 +02:00
Dominik Dabek cdfe2ce8ad Feature: Flag for device usm allocation reusing
With flag enabled, when app calls freeSVMAlloc on device usm allocation,
don't free it immediately but save it,
and try to use it on subsequent allocations.

This allocation cache will be trimmed if an allocation fails.

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-06-13 20:02:52 +02:00
Bartosz Dunajski 39c1c4d530 Remove virtual padding support
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-06-08 12:42:44 +02:00
Krzysztof Gibala 77dde01503 Pass canonized gpuAddress in setCpuPtrAndGpuAddress
Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-06-07 10:05:18 +02:00
Krzysztof Gibala c51ce2a35c Use GmmHelper as an object in freeGraphicsMemoryImpl
Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-06-07 09:53:41 +02:00
Krzysztof Gibala 81899c4477 Add canonized gpuAddress to GraphicsAllocation constructor
Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-06-06 18:17:36 +02:00
Krzysztof Gibala dc1fe7d59a Change MemoryPool to enum class
Use enum class for MemoryPool in GraphicsAllocation
This change will ensure that GA is constructed in the proper way

- Rename namespace for isSystemMemoryPool method
- Add method getMemoryPoolString for logging actual pool which is in used
- Remove wrong pattern in GraphicsAllocation constructor

Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-06-02 12:46:15 +02:00
Jaime Arteaga 325db6a99c Fix P2P support for implicit scaling
when using implicit scaling, 2 dma-buf handles, one per tile, are
needed to support dma access from peer.

Related-To: LOCI-3122

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-06-01 20:10:32 +02:00
Krzysztof Gibala ae56d50b4f Pass canonized gpuAddress to GraphicsAllocation
Related-To: NEO-6523

Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-05-30 16:54:38 +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
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
Szymon Morek 4266f861ac Make implicit flush for cross-device dependency
Related-To: NEO-6418

If there's a cross-device dependency, flush batched
submissions to avoid deadlock.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-05-16 16:29:09 +02:00
Milczarek, Slawomir 9d31d36491 Disable cross-tile kmd migration for usm allocations
Ensure KMD migrations for USM allocations to occur between smem and lmem only

Related-To: NEO-6969

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-05-16 15:23:34 +02:00
Artur Harasimiuk 819e0f5515 style: configure readability-identifier-naming.LocalVariableCase
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-05-16 12:39:44 +02:00
Artur Harasimiuk e9be9b64c6 clang-tidy configuration cleanup
Define single .clang-tidy configuration with all used checks and use
NOLINT to selectively silence tool. That way cleanup should be easier.
third_part/ has its own configuration that disables clang-tidy for this
folder.

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-05-11 14:02:04 +02:00
Krzysztof Gibala 2fcda0a528 Refactor: Change decanonize method accessing point
Accessing decanonize method as a member of GmmHelper class object

Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-05-11 12:57:02 +02:00
Mateusz Jablonski d935815d74 Move residency data from WddmAllocation to GraphicsAllocation
Related-To: NEO-6848

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-05-10 18:16:42 +02:00
Mateusz Jablonski 943ad0e1eb style: skip redundant unique_ptr::get function
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-05-10 13:22:40 +02:00
Krzysztof Gibala 4f1e01d279 Create getGmmHelper function in MemoryManager
Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-05-09 16:51:23 +02:00
Krzysztof Gibala 1c366d1ec0 Refactor: Change canonize method accessing point
Accessing canonize method as a member of GmmHelper class object

Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-05-09 14:16:31 +02:00
Jaime Arteaga 3f26f45c10 Add support for IPC handles with implicit scaling
When using implicit scaling, device allocations may have
more than one internal allocation created internally. In that case,
a separate dma-buf handle per internal allocation needs to be
exported.

So introduced two driver experimental extensions to export and
import more than one IPC handle:

- zexMemGetIpcHandles
- zexMemOpenIpcHandles

Related-To: LOCI-2919

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-05-09 00:38:17 +02:00
Maciej Plewka 0a16dc6c47 Fix multi thread usage of external host alloc
This is fixed reupload of this commit after auto revert
With this commit OpenCL will track if external host memory is used from
few threads and will secure to update task count in all threads before
destroing allocation.

Resolves: NEO-6807

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2022-05-05 13:32:15 +02:00
Compute-Runtime-Validation 00a1a14652 Revert "Fix multi thread usage of external host alloc"
This reverts commit 54eee2a88b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-04-28 17:42:07 +02:00
Krzysztof Gibala 9b778863b4 Store GmmHelper in Gmm class
Store GmmHelper in Gmm class instead of GmmClientContext

Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-04-27 15:45:49 +02:00
Maciej Plewka 54eee2a88b Fix multi thread usage of external host alloc
With this commit OpenCL will track if external host memory is used from
few threads and will secure to update task count in all threads before
destroing allocation.

Resolves: NEO-6807

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2022-04-26 15:31:24 +02:00
Mateusz Hoppe c9d61840a2 Allocate SBA buffers per HW context
- different physical storage for every HW context
- adds support for debugging with implicit scaling on
- reorganize tests

Relates-To: NEO-6883

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-04-15 10:01:28 +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
Patryk Wrobel 352583b9d9 Detect GPU hang in evictUnusedAllocations()
This change introduces checking of the return value
of wait function in case of blocking version of
evictUnusedAllocations(). Furthermore, it propagates
the error to the callers. It contains also ULTs.

Related-To: NEO-6681
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-04-13 15:39:02 +02:00
John Falkowski 789587bacc Return nullptr for gfx alloc mmap error
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2022-04-12 10:08:19 +02:00
Dominik Dabek 29e4518407 Update formatting in dynamic memory tracking
Format as follows:
backtrace start
call_1
...
call_n
backtrace end

Related-To: NEO-6837

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-04-08 13:17:30 +02:00
Lukasz Jobczyk fffcf2612e Flush tag only if needed in deferred deleter
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-04-07 15:36:29 +02:00
Compute-Runtime-Validation 7a3976ad64 Revert "Force 64KB page size for cpu alignment in dual storage allocation"
This reverts commit 7ff6a5c1fa.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-04-07 00:45:07 +02:00
Kamil Diedrich 7ff6a5c1fa Force 64KB page size for cpu alignment in dual storage allocation
There is no need to force 2MB alignment for CPU allocation in dual
storage usage. Additionaly for WSL this will allow to avoid usage of
malloc in driver path.

Relates-To: NEO-6620
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-04-06 15:28:17 +02:00
Dominik Dabek 8d5c674110 Dynamic memory tracking, update function printing
Print only demangled name if it succeeded.

Related-To: NEO-6837

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-04-06 14:34:24 +02:00
Dominik Dabek f7a767c767 Add demangling to dynamic memory tracking
Related-To: NEO-6837

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-04-05 20:38:27 +02:00
Filip Hazubski 88193cc242 Minor fixes
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-03-31 20:02:11 +02:00
Michal Mrozek 0c0603966b Add debug functionality to track dynamic allocations.
- available only via manual build with ENABLE_DYNAMIC_MEMORY_TRACKING.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2022-03-31 13:24:15 +02:00
Compute-Runtime-Validation 91cfd3cd1a Revert "Unify command/ring/semaphore buffers placement"
This reverts commit e035199de4.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-03-30 14:05:47 +02:00
Mateusz Jablonski e035199de4 Unify command/ring/semaphore buffers placement
put them all to the same memory location

Related-To: NEO-6698
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-03-29 17:55:48 +02:00
Lukasz Jobczyk a230f267e1 Poll task count indefinitely on high throttle command queue
Resolves: NEO-6781

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-03-25 10:06:16 +01:00
Mateusz Jablonski 8a8b4866cb XeHPC: force local memory for command/ring/semaphore buffer
require 48bit resource for ring/semaphore buffer
for multi tile allocations select first tile
for single tile allocation select preferred tile

Related-To: NEO-6698
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-03-24 10:54:26 +01:00
Milczarek, Slawomir f03f530327 Extend zeCommandListAppendMemoryPrefetch to migrate to associated device
Related-To: NEO-6740

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-03-23 14:21:17 +01:00
Mateusz Jablonski 3792481d33 XeHPC Implicit scaling: put command/ring/semaphore buffer to first memory bank
In direct submission scenario command/ring/semaphore buffer allocations
are placed in the same memory bank to ensure that their memory is updated in
correct order

Related-To: NEO-6698
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-03-21 08:10:50 +01:00
Daniel Chabrowski 754efbdaff Cleanup mocks
Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
2022-03-18 11:54:03 +01:00
Jaime Arteaga c0e2251ceb Skip adding allocations to remote devices if not allocated there
When making graphics allocations resident in multi-GPU scenarios,
we should make them resident only if there's an allocation for that
device. So return appropriate null pointer and skip it.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-03-16 23:58:07 +01: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 c0b7f05897 Add memory prefetch for kmd migrated shared allocations
This feature is disabled by default, controlled with the knob
AppendMemoryPrefetchForKmdMigratedSharedAllocations

Related-To: NEO-6740

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-03-09 16:02:18 +01:00
Jaime Arteaga a010fb3634 Dont close shared handle on imported allocations
Related-To: LOCI-2272

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-03-06 04:35:47 +01:00