Commit Graph

49 Commits

Author SHA1 Message Date
John Falkowski f652c7311d feature: Add prefetch for chunking with shared and device mem
Perform prefetching of chunks on shared and device allocations
after bind.

Related-To: NEO-8066

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off by: John Falkowski <john.falkowski@intel.com>
2023-08-05 02:17:39 +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
Milczarek, Slawomir bf778be99e [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 as well (for performance reasons).

Related-To: NEO-7252

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-04-24 14:51:49 +02:00
Fabian Zwolinski a1066177a5 Attach UUID to SbaAllocations
Related-To: NEO-7630
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-04-11 12:53:03 +02:00
John Falkowski 007d39cbf7 move two functions to cpp file
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-04-11 09:50:50 +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
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
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 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
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
Jaime Arteaga 623c9afdfa Return same fd handle on multiple calls to peekHandle
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-11-09 13:35:52 +01:00
Compute-Runtime-Validation 5094b279f6 Revert "Return same fd handle on multiple calls to peekHandle"
This reverts commit 5c48e027b9.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-10-13 13:17:35 +02:00
Jaime Arteaga 5c48e027b9 Return same fd handle on multiple calls to peekHandle
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-10-12 17:17:10 +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
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
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
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
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
Filip Hazubski 170fd00d24 Improve mmap logic in createAllocWithAlignment
Unmap trailing extra memory right away.

Related-To: NEO-6417

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-01-21 14:16:27 +01:00
Raiyan Latif 394c0e90e1 Return error when failing on submission
Signed-off-by: Raiyan Latif <raiyan.latif@intel.com>
2022-01-12 16:42:30 +01:00
Filip Hazubski 429fa1fbdd Delay releasing memory in createAllocWithAlignment
When padding memory is needed, store it and release only when
the related allocation is being released.

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-01-11 20:02:43 +01:00
Milczarek, Slawomir 8cf3e8ca94 Improve control of explicit residency flag
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-11-09 10:54:00 +01:00
Milczarek, Slawomir ca4af1dde1 Add helpers for page fault support
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-11-03 13:39:38 +01:00
Milczarek, Slawomir 5aeae0cf99 Add mem advise control flags to drm alocation
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-10-12 11:39:06 +02:00
Lukasz Jobczyk 7392b5fb8d Add new colouring policy
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-10-07 23:33:26 +02:00
Milczarek, Slawomir afa45bd9e7 Add support for mem advise to set cache policy in buffer object
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-10-07 22:16:58 +02:00
Lukasz Jobczyk b5e91e0e53 Change BOs array to stack vec
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-10-06 12:52:43 +02:00
lgotszal 3bd4bca911 Copyright header update
Dates corrected in copyright headers to reflect original publication date
(2018 for OpenCL, 2020 for Level Zero).

Signed-off-by: lgotszal <lukasz.gotszald@intel.com>
2021-05-17 20:38:19 +02:00
Bartosz Dunajski f8f8b53d95 Improve OsHandle struct
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-04-02 18:42:16 +02:00
Mateusz Hoppe 516a905712 Mark Scratch and Private allocations for capture
Related-To: NEO-5237

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-03-10 14:04:57 +01:00
Slawomir Milczarek 7dad49ccf4 Add new setters and getters for cache policies
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2021-02-11 14:07:06 +01:00
Slawomir Milczarek d399613f25 Add support for L3 cache information
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2021-02-05 10:28:02 +01:00
macabral 720ba46548 Register kernel Elf for debugging purpose
Signed-off-by: macabral <matias.a.cabral@intel.com>
2020-12-01 17:16:14 +01:00
Mateusz Hoppe 765b6cc2ed Initialize debugging in Os before creating debugger
Related-To: NEO-4516

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-11-19 16:31:31 +01:00
Lukasz Jobczyk 8892ee3f1f Align mmaped bo address properly
Change-Id: I010f6619821ad715bb6f0e9640be19943a45abd8
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-10-13 14:11:08 +02:00
Lukasz Jobczyk a939c89d91 Create internal BOs with map offset
Resolves: NEO-5097

Change-Id: I842f3d482420373cc630d5bfc034e229fa2cb30c
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-10-09 16:38:03 +02:00
Mateusz Hoppe eb287d87d7 Register Allocations
Related-To: NEO-4964

Change-Id: I792dd7f7d6d594f51701ec7a40b2c0d36531b02b
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-09-18 10:34:02 +02:00
Mateusz Hoppe d363448515 Interfaces to register resources
Change-Id: Ic587aaa5a41e4e7648211cfa730a0aa5bbc2985a
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-09-17 12:39:16 +02:00
Mateusz Jablonski 6870104a1a Pass maxOsContextCount to GraphicsAllocation
Change-Id: I4f327866433fe9b0cc0a6191336b54a9d2282702
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-08-26 09:57:15 +02:00
Mateusz Hoppe cdc7649e77 Pass OsContext to memory management methods
Operate on OsContext when per context VMs are used

Related-To: NEO-4957

Change-Id: Ia6bef88a80163d4ceee9f9bf59bda6b569d8929f
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-08-13 19:48:54 +02:00
Lukasz Jobczyk 49cd8e4e1b Bind bos to proper VM
Change-Id: I536ff342875bba39cf9a9922fcf647af408ae398
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-07-28 13:21:15 +02:00
Lukasz Jobczyk ff0add74e3 Add alternative residency model on Linux
Related-To: NEO-4732

Change-Id: I79e165d2b647af200ca314e1183ecf05903de644
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-07-10 12:38:57 +02:00
Lukasz Jobczyk e027a2653d Move makeResidentBufferObjects to DrmAllocation
Related-To: NEO-4732

Change-Id: Ib7b7a46b0a9fd1d5cc1b89f64f66bc78cab5c563
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-07-02 09:50:26 +02:00
Igor Venevtsev 3859e13322 Split large allocations on Windows due to Wddm limitation
Resolves: NEO-4479

Change-Id: Iffb862a93570a60c2126620d9e5106359acba64a
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2020-06-17 12:47:54 +02:00
Mateusz Jablonski 7df9945ebe Add absolute include paths
Change-Id: I67a6919bbbff1d30c7d6cdb257b41c87bad51e7f
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-23 23:49:12 +01:00
kamdiedrich e072275ae6 Reorganization directory structure [3/n]
Change-Id: If3dfa3f6007f8810a6a1ae1a4f0c7da38544648d
2020-02-23 23:48:28 +01:00