Commit Graph

128 Commits

Author SHA1 Message Date
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
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
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
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
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
Warchulski, Jaroslaw 64f735481d Cleanup includes 48
Cleaned up files:
shared/source/command_container/command_encoder.inl
shared/source/os_interface/hw_info_config.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-02-10 17:23:02 +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
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
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 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
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
Mateusz Jablonski 1d6c3b0e04 Store root device environment reference in gmm helper
Related-To: NEO-6853
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-12-19 19:50:16 +01:00
Kamil Diedrich c1e27c85d7 Addition of a variable describing code behavior
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-12-19 15:45:57 +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
Mateusz Jablonski 6c7ca96f28 Reduce usage of global product helper getter [1/n]
Related-To: NEO-6853
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-12-15 15:01:41 +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
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
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
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
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
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
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
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
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
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
Yates, Brandon 518016f20f L0 Debug - Zero init debug surface in windows
Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
2022-10-21 18:36:14 +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
Compute-Runtime-Validation 40ddeeb3ba Revert "Add support for USM shared in WSL for dGPU"
This reverts commit 1044a8aeee.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-10-21 05:59:34 +02:00
Kamil Diedrich 1044a8aeee Add support for USM shared in WSL for dGPU
This patch force KMD allocation path for USM host allocation
and also for host part of USM shared allocation

Related-To: NEO-6913
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-10-20 11:26:24 +02:00
Compute-Runtime-Validation e744116bbb Revert "Add support for USM shared in WSL for dGPU"
This reverts commit 68d0523ccf.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-10-19 05:05:55 +02:00
Kamil Diedrich 68d0523ccf Add support for USM shared in WSL for dGPU
This patch force KMD allocation path for USM host allocation
and also for host part of USM shared allocation


Related-To: NEO-6913
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-10-18 14:00:14 +02:00
Kamil Diedrich edeaa968f5 Destroy resource handle when created
Do not create resource when cpuPtr is set

Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-08-16 13:03:59 +02:00
Compute-Runtime-Validation a5614a1c66 Revert "Destroy resource handle when created"
This reverts commit 011a0dd497.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-08-12 09:16:34 +02:00
Kamil Diedrich 011a0dd497 Destroy resource handle when created
Do not create resource when cpuPtr is set

Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-08-10 12:35:49 +02:00
Compute-Runtime-Validation 00ff0dc337 Revert "Destroy resource handle when created"
This reverts commit 5a6a90aa0e.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-08-02 11:04:10 +02:00
Kamil Diedrich 5a6a90aa0e Destroy resource handle when created
When allocation is created and createResource is set we need to
remove resourceHandle instead of allocation handle list otherwise
in long running application (a lot of allocations) we will observe
memory leak.

Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-07-28 13:22:52 +02:00
Igor Venevtsev 547dd59272 Debugger L0 Win: Implement CREATE_DEBUG_DATA/MODULE_CREATE events handling
Related-To: NEO-6723

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2022-07-20 13:20:50 +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
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
Maciej Plewka 5bee8ebd35 Revert "Allow cpu buffers copy on DG2 in 32bit"
This reverts commit 2055daf696.

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2022-06-08 11:26:00 +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