Commit Graph

63 Commits

Author SHA1 Message Date
Dominik Dabek b2fc7345cf performance: redesign usm alloc reuse mechanism
Dedicated pools for different allocations size ranges.
Additional reused allocations will create their own pools.
Do not reuse allocations >256MB.

Related-To: NEO-6893, NEO-12299, NEO-12349

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-09-10 18:12:14 +02:00
Wenbin Lu bfaeeb01d6 feature: support SVM heap in reserveVirtualMem
Related-To: NEO-11981

Signed-off-by: Wenbin Lu <wenbin.lu@intel.com>
2024-09-09 23:22:04 +02:00
Compute-Runtime-Validation 99f62ac866 Revert "feature: support SVM heap in reserveVirtualMem"
This reverts commit 93cde3ee12.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-09-03 20:20:25 +02:00
Wenbin Lu 93cde3ee12 feature: support SVM heap in reserveVirtualMem
Related-To: NEO-11981

Signed-off-by: Wenbin Lu <wenbin.lu@intel.com>
2024-09-03 11:38:51 +02:00
Mateusz Hoppe 83ad60eb29 fix: account for hp engines when calculating max context count
Related-To: NEO-11983

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2024-07-26 12:15:14 +02:00
Bartosz Dunajski 18c4f0b54f fix: dont reset cpu ptr in tbx mode during virtual map
Related-To: HSD-18038484849

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2024-07-23 15:32:05 +02:00
Jaroslaw Warchulski daec249430 refactor: remove not needed createGraphicsAllocationFromNTHandle method
Related-To: NEO-11498
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
2024-06-18 14:25:00 +02:00
Jaroslaw Warchulski 76a05c1cab refactor: pass arrayIndex to Wddm::openNTHandle function
Related-To: NEO-11498
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
2024-06-12 12:11:35 +02:00
Jaroslaw Warchulski 0ac1be7669 refactor: pass arrayIndex to Wddm::openSharedHandle function
Related-To: NEO-11498
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
2024-06-07 09:51:26 +02:00
Chodor, Jaroslaw e053f3a839 feature: Add support for legacy acronyms in ocloc's ids query
Expands support for deprecated acronyms to ids query.
Additionally, this commit changes default devices for legacy
acronyms.

Related-To: NEO-10190

Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
2024-05-28 10:18:29 +02:00
Dominik Dabek b4d839fe29 performance(usm): l0, add usm host memory pooling
Disabled by default.

Related-To: NEO-11356

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-05-15 15:20:51 +02:00
Mateusz Hoppe d6675b14b3 fix: release secondaryContexts prior to primary context
Related-To: NEO-10920

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2024-04-05 16:34:39 +02:00
Maciej Plewka b722f3b579 feature: Add interface to bind resources as readonly
Related-To: NEO-10398
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2024-03-27 14:24:58 +01:00
Compute-Runtime-Validation 8e44a46983 Revert "feature: bind resources as read only"
This reverts commit f3d36d3350.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-03-27 08:51:47 +01:00
Maciej Plewka f3d36d3350 feature: bind resources as read only
Related-to: NEO-10398
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2024-03-26 14:11:57 +01:00
Mateusz Hoppe 371412a826 refactor: remove useLocalMem from allocate32BitGraphicsMemoryImpl
- this method allocates System Memory
- argument is not needed - ExternalHeap is selected inside this function
- remove unneeded ults
- allocate memory in Device Pool for external heap allocation in
OsAgnosticMemoryManager

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-09-18 10:08:09 +02:00
Mateusz Jablonski a4addad510 refactor: prework for defining preferred allocation method per allocation type
Related-To: HSD-18032442707, HSD-18032440987
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-08-30 12:17:33 +02:00
Neil R Spruit ded9d7bff2 feature: Get Peer Allocation with specified base Pointer
Related-To: LOCI-4176

- Given a Base Pointer passed into Get Peer Allocation, then the base
pointer is used in the map of the new allocation to the virtual memory.
- Enables users to use the same pointer for all devices in Peer To Peer.
- Currently unsupported on reserved memory due to mapped and exec
resiedency of Virtual addresses.

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2023-05-24 20:41:20 +02:00
Fabian Zwolinski e351a90f81 refactor: Rename member variables to camelCase 2/n
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-04-27 20:39:22 +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
Mateusz Jablonski 8194543ae5 refactor raytracing: unify RT programming logic
reuse EncodeEnableRayTracing in CommandStreamReceiver
add method to determine need for 48b resource flag for RT allocations
Related-To: NEO-7606

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-03-07 11:51:58 +01:00
Milczarek, Slawomir 674691d170 Fix check for page faults enabled in get memory access properties
Related-To: NEO-6465

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-02-28 10:13:25 +01:00
Wrobel, Patryk d8a65c6958 Try to use provided pointer when dual storage shared memory is not supported
If user provided not-null hostptr field, then the driver
should try to use it. This change adds omitted functionality,
which handles the described case also in createUnifiedMemoryAllocation().

Related-To: NEO-7600
Signed-off-by: Wrobel, Patryk <patryk.wrobel@intel.com>
2023-02-21 09:08:11 +01:00
Dominik Dabek 86f63875bf fix(l0): add fallback to cpu memory copy
Fallback to gpu copy if failed to obtain needed locked ptr

Related-To: NEO-7553

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2023-01-26 07:49:34 +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 8de3898abc Cleanup includes 31
Cleaned up files:
shared/source/command_stream/experimental_command_buffer.h
shared/source/helpers/get_info.h
shared/source/helpers/local_id_gen.h
shared/source/memory_manager/gfx_partition.h
shared/source/memory_manager/host_ptr_manager.h
shared/source/memory_manager/prefetch_manager.h
shared/test/common/mocks/mock_memory_manager.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-16 11:45:55 +01:00
John Falkowski 01017a5df3 L0: add support for deferred memory free as per ContextImp::freeMemExt
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-01-12 21:05:02 +01:00
Warchulski, Jaroslaw 6fb68dd84b Separation of MemoryAllocation from os_agnostic_memory_manager.h
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-04 15:09:36 +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
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
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 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
Dominik Dabek 67bfebb25e Add additional create buffer arguments
Allow to: disable performance hints, make allocation lockable

Used in BufferPoolAllocator

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-11-21 16:19:53 +01:00
Mateusz Hoppe f19abda0e2 Set root device index in OsContext
- correclty choose default engine context accounting for root device
index and  subdevices bitfield

Related-To: NEO-7516

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-11-16 23:02:19 +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
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
Dominik Dabek e151bc6e2d [OCL] Flag for allocating small buffers from pool
Improves performance in workloads that create small opencl buffers.

To enable, set env var ExperimentalSmallBufferPoolAllocator=1

Known issues (will be addressed in further commits):
- cannot create subBuffer from such buffer
- pool buffer allocation should be reused

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-10-14 12:18:42 +02:00
Igor Venevtsev 43676ed02a L0Debug Win: initialize device with empty submission
In case of debuggable context device should be additionally
initialized by early empty submission issue.

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2022-09-21 12:02:34 +02:00
Milczarek, Slawomir 046f9d95fc zeCommandListAppendMemoryPrefetch with memory prefetch manager
Related-To: NEO-6740

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-08-02 20:07:31 +02:00
Kamil Diedrich 97ea332a9f Add support for ntHandles in OCL
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-06-17 22:55:53 +02:00
Fabian Zwolinski 5012462fa6 Remove GMock include from mock_memory_manager.h
Related-To: LOCI-3025
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2022-06-17 14:22:53 +02:00
Mateusz Jablonski 1b93d4dcf1 Move mock driver model classes to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-06-14 13:44:40 +02:00
Dominik Dabek cdfe2ce8ad Feature: Flag for device usm allocation reusing
With flag enabled, when app calls freeSVMAlloc on device usm allocation,
don't free it immediately but save it,
and try to use it on subsequent allocations.

This allocation cache will be trimmed if an allocation fails.

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-06-13 20:02:52 +02:00
Baj, Tomasz 9529f21182 Fix missing handle in external memory
Related-To: NEO-6757

Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
2022-06-02 16:05:46 +02:00
Mateusz Jablonski 943ad0e1eb style: skip redundant unique_ptr::get function
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-05-10 13:22:40 +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
Dominik Dabek 8d1ad5a4f3 Refactor: use stack vector for root device indices
Stack vector will not cause dynamic allocations in most circumstances
ie. number of root device indices not more than 16

Related-To: NEO-6837

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-04-14 14:05:42 +02:00