Commit Graph

110 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Baj, Tomasz 0d68c55198 Remove all TODOs
Related-To: NEO-6674

Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
2022-02-17 14:10:47 +01:00
Bartosz Dunajski 71f48c89c8 CacheSettingsHelper - timestamp allocations
Related-To: NEO-6664

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-09 19:32:39 +01:00
Bartosz Dunajski a95198521e Initial implementation of CacheSettingsHelper
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-08 16:18:06 +01:00
Bartosz Dunajski c88fce0def Gmm construction cleanup
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-08 10:20:24 +01:00
Bartosz Dunajski 4b0d986876 Move AllocationType enum out of GraphicsAllocation class
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-04 17:49:09 +01:00
Spruit, Neil R ae77bd1bd2 Enable Device Memory to be shared in WSL-2 with L0
- Add getMemoryManagerType to check which memory manager has been init
to determine if Linux + WDDM memory manager is in use.
- Add isNTHandle to test and verify if a handle is an NT handle during
L0 Open IPC Handle.

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2022-01-27 23:14:29 +01:00
Kamil Diedrich 1b7949432f Add shareable allocation on windows dGPUs
Add default initialization for object members

Related-To: LOCI-2665

Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-01-19 19:03:18 +01:00
Bartosz Dunajski dfdd3c597a Remove redundant BUFFER_COMPRESSED allocation type
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-07 13:35:49 +01:00
Bartosz Dunajski 68aea5bf62 Rename compression flags and helpers
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-03 18:09:02 +01:00