Commit Graph

229 Commits

Author SHA1 Message Date
Filip Hazubski 2ed2ac73d1 refactor: correct ioctl and related functions to return signed int
Change IoctlHelper::ioctl function to return int.
Change IoctlHelper::createGemExt function to return int.
Change IoctlHelper::queryDistances function to return int.
Change UuidRegisterResult::retVal type to int32_t.
Rename res to ret in debug_session.cpp for consistency.

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2023-01-19 22:04:27 +01:00
Lukasz Jobczyk 3bf4291558 Align mmap cpu va to 2MB for sizes greater than 2MB
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-01-17 18:26:49 +01:00
Jaime Arteaga 84dec57f0a fix: Add debug message for BO from shared-handle
Related-To: LOCI-3771

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2023-01-13 17:19:49 +01:00
Lukasz Jobczyk dff2c2d8e3 Align external host ptr allocation gpu va to 2MB
Related-To: NEO-7116

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-01-13 12:37:10 +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
Spruit, Neil R d1ee840ba5 Enforce 64KB alignment when mmaping GPU_TIMESTAMP_DEVICE_BUFFER
Related-To: LOCI-3866

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2023-01-12 22:52:25 +01:00
Compute-Runtime-Validation ddb7eb07b0 Revert "Align external host ptr allocation gpu va to 2MB"
This reverts commit d24f403cc4.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-01-12 09:33:16 +01:00
Lukasz Jobczyk d24f403cc4 Align external host ptr allocation gpu va to 2MB
Related-To: NEO-7116

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-01-11 13:45:06 +01:00
Lukasz Jobczyk 39df92a16f Align only CPU VA for SVM_CPU
Resolves: NEO-7608

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-01-10 16:52:29 +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
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 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
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
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 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
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
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
Milczarek, Slawomir f08e552f4d Create multiple-BOs shared allocation in single lmem regions in non-acc mode
Related-To: NEO-6839

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-12-05 11:25:34 +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
Mateusz Jablonski f7c11e8a94 Fix typos
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-11-29 17:12:10 +01:00
Michal Mrozek a104636b31 Improve address alignment logic.
Resolves: NEO-7543

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2022-11-24 14:51:50 +01:00
Dunajski, Bartosz f267c34327 Check completion fence for AllocationType::DEFERRED_TASKS_LIST
Related-To: NEO-7458

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2022-11-23 14:18:35 +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
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
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
Michal Mrozek 508ad66313 Align GPU VA to previous power of 2.
Aligning to next power of 2 was excessive.
We really need previous power of 2.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2022-11-10 16:57:57 +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
Michal Mrozek d9762c0337 Add debug flag to control alignment.
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2022-11-08 19:42:19 +01:00
Wrobel, Patryk 4c05a54c2b Use correct heap when opening device memory IPC handle
This change extends the logic of opening IPC
memory handles and fills the gap between this
logic and allocation of USM device buffers.

When HEAP_EXTENDED is available, then it is
preferred.

Signed-off-by: Wrobel, Patryk <patryk.wrobel@intel.com>
2022-11-08 12:08:04 +01: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
Milczarek, Slawomir 9bc7c48206 Enable kmd-migrated shared allocation with multiple BOs by default
Related-To: NEO-7395

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-10-14 09:51:14 +02:00
Milczarek, Slawomir 6edbfa04a0 Add regkey to create kmd-migrated shared allocation with multiple BOs
Related-To: NEO-7395

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-10-11 16:16:43 +02:00
Jaime Arteaga a3b3f3e86e Add support for PRELIM_I915_PARAM_SET_PAIR
This extension allows pairing two buffer objects so they can be
exported using a single dma-buf handle. When imported, a single
buffer object is created with a total size of the two buffer
objects.

Related-To: LOCI-3355

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

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-09-29 23:41:39 +02:00
Michal Mrozek 2fbc1f652b Choose alignment as next power of 2 for HEAP_EXTENDED allocations.
This way we will get as big pages as possible without leftovers.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2022-09-26 16:42:59 +02:00
Luzynski, Sebastian Jozef bac85ddb25 Move kernel globals from SVM to USM device
With this change, module's data sections will be allocated in USM device
pool instead of SVM or USM shared.

Signed-off-by: Luzynski, Sebastian Jozef <sebastian.jozef.luzynski@intel.com>
2022-09-23 23:06:15 +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
Compute-Runtime-Validation 45c8124d8f Revert "Move kernel globals from SVM to USM device"
This reverts commit 706a5a7a8c.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-09-18 12:49:44 +02:00
Sebastian Luzynski 706a5a7a8c Move kernel globals from SVM to USM device
With this change, module's data sections will be allocated in USM device pool
instead of SVM or USM shared.

Signed-off-by: Sebastian Luzynski <sebastian.jozef.luzynski@intel.com>
2022-09-15 16:50:12 +02:00
Mateusz Hoppe 75b117b82f L0Debug - fixes for ZE AFFINITY MASK
- pass correct deviceIndex when notifying cmdQs
- fix allocating debug surface - single tile allocation when single
bit set in storageInfo

Related-To: NEO-6980

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-08-31 11:43:19 +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
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