Commit Graph

34 Commits

Author SHA1 Message Date
Young Jin Yoon d6a14d4ed5 feature: support explicit memory locking
Added lockMemory in context to explicitly locking memory,
Added a boolean flag in graphics_allocation to indicate the allocation
is locked, and modified memory_operations_handler to add lock().

Related-To: NEO-8277
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2024-03-29 07:31:22 +01:00
Young Jin Yoon 068f6a25c6 Revert "feature: support explicit memory locking"
This reverts commit 27a3307bb0.

Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2024-03-25 20:10:20 +01:00
Young Jin Yoon 27a3307bb0 feature: support explicit memory locking
Added lockMemory in context to explicitly locking memory,
Added a boolean flag in graphics_allocation to indicate the allocation
is locked, and modified memory_operations_handler to add lock().
Change the logic to work correctly with makeResident() when lock() is
called previously for the same memory region

Related-To: NEO-8277
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2024-03-25 09:49:18 +01:00
Mateusz Hoppe 3051c5ef2b feature: bindless image extension
- support for zeMemGetPitchFor2dImage() and
zeImageGetDeviceOffsetExp()

Related-To: NEO-10352

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2024-02-14 21:11:31 +01:00
Mateusz Jablonski 27fbdde4c5 refactor: correct naming of unified memory enums
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-13 15:58:21 +01:00
Young Jin Yoon 3782b4bd0e feature: add functions to get/set VA space
Added an extension version of zeContextGetVirtualAddressSpaceIpcHandle
and zeContextPutVirtualAddressSpaceIpcHandle, which return
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE for now.

Related-To: NEO-8259

Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2023-11-06 20:08:45 +01:00
Compute-Runtime-Validation bcc5a8502b Revert "feature: add functions to get/set VA space"
This reverts commit 0550c80d4f.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-11-03 02:06:36 +01:00
Young Jin Yoon 0550c80d4f feature: add functions to get/set VA space
Added an extension version of zeContextGetVirtualAddressSpaceIpcHandle
and zeContextPutVirtualAddressSpaceIpcHandle, which return
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE for now.

Related-To: NEO-8259

Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2023-11-02 18:42:27 +01: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
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
Zbigniew Zdanowicz ff88930625 Refactor ipc event pool data exchange protocol
- using predefined structure adds security to enforce data limit
- code is simplified and easier to maintain or add new data fields

Related-To: NEO-7636

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-01-17 10:46:52 +01:00
Jaime Arteaga 050e4fb1da Pass allocation type to import handle functions
This to allow flexibilty on choosing the allocation type from the
callers in layers above on the driver.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-12-16 03:42:40 +01:00
Patryk Wrobel 2dd3c11248 Do not copy ze_ipc_mem_handle_t in internal functions of NEO
The size of this type is at least 64 bytes due to
ZE_MAX_IPC_HANDLE_SIZE. This change introduces usage
of const reference instead of copying.

Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-10-17 13:51:03 +02:00
Patryk Wrobel 90597995d2 Do not copy ze_ipc_event_pool_handle_t in internal functions of NEO
The size of this type is at least 64 bytes due to
ZE_MAX_IPC_HANDLE_SIZE. This change introduces usage
of const reference instead of copying.

Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-10-17 13:17:24 +02:00
Mateusz Jablonski 747c2d3d83 Cleanup includes in cmdlist, cmdqueue, context, device, driver and module
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-06-03 02:54:41 +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
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
Jim Snow 0a926c7d12 Add Windows image memory export functionality
Adds zeImageGetAllocPropertiesExt function, implementation code shared
shared with zeMemGetAllocProperties moved into common helper function.

Related-To: LOCI-2665

Signed-off-by: Jim Snow <jim.m.snow@intel.com>
2022-03-26 05:11:35 +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
Jaime Arteaga 3b497270c8 Add support for memory free policies
Add support for ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_BLOCKING_FREE
added in v1.3.

Related-To: LOCI-2672

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-12-28 08:27:50 +01:00
Compute-Runtime-Validation dd6653892e Revert "Move SVM allocs memory manager to L0::Context (1/N)"
This reverts commit 9080e2ee5b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-05-09 12:37:44 +02:00
Jaime Arteaga 9080e2ee5b Move SVM allocs memory manager to L0::Context (1/N)
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-05-07 22:17:10 +02:00
Jaime Arteaga 5f0e4f8e2a Revert "Move memory managers to L0::Context (1/N)"
This reverts commit 9ce887b8b53a787a7e0a0d808c96e295655ae57b.


Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-05-06 04:56:09 +02:00
Jaime Arteaga 1f1fbb193b Move memory managers to L0::Context (1/N)
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-05-05 23:01:42 +02:00
Jaime Arteaga ef5174f3fc Eliminate wrappers in L0::Context class for driverHandle calls
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-04-20 23:50:23 +02:00
Jaime Arteaga 3f6d1f5ee9 Correctly pass descriptors to L0 shared alloc function
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-11-11 07:04:54 +01:00
Jaime Arteaga 9473abc86a Correctly pass descriptors to L0 device and host alloc functions
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-11-10 21:31:07 +01:00
Maciej Dziuban b2b90c3daf level-zero v1.0 (3/N)
Implement residency functions

Change-Id: I69179899f2a5fd627d10b976477a6736c600b430
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2020-08-07 13:49:02 +02:00
Jaime Arteaga 902fc2f6c4 level-zero v1.0 (2/N)
Change-Id: I1419231a721fab210e166d26a264cae04d661dcd
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: macabral <matias.a.cabral@intel.com>
Signed-off-by: davidoli <david.olien@intel.com>
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@intel.com>
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
Signed-off-by: Latif, Raiyan <raiyan.latif@intel.com>
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2020-08-03 13:11:13 +02:00
Jaime Arteaga bf7b00d15f Add stubs for virtual memory
Change-Id: Ia789b2507a44c2e8599bcb64d750b89db7c574c9
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-07-28 21:45:41 +02:00
Robert Krzemien 46c7fac0cc Metric Api: zetContextActivateMetricGroups update
Change-Id: Ia3f38e8bfc6176063de36685e16e7a4a21f940c7
Signed-off-by: Robert Krzemien <robert.krzemien@intel.com>
2020-07-28 16:59:53 +02:00
Jaime Arteaga 63a801ee07 Context implementation (3/N)
Add object creators.

Change-Id: Ic656a1bd3735bce1d995c407011ef7c26eab848e
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-07-23 15:27:24 -07:00
Jaime Arteaga b011d76586 Context implementation (2/N)
Add memory allocators.

Change-Id: Ie93d077e7a55b9c9c51c4a594a7db0c10f770091
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-07-23 00:18:01 +02:00
Jaime Arteaga 9537119472 Context implementation (1/N)
Change-Id: I3e0b3c3fdb7c9ab9ac10fccd3d61c7b394dbeee7
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-07-22 08:57:23 -07:00