Commit Graph

82 Commits

Author SHA1 Message Date
Compute-Runtime-Validation
7610e889fa Revert "performance: add compressed pool for cl_buffer"
This reverts commit 561385cda1.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-12-11 01:23:46 +01:00
Szymon Morek
561385cda1 performance: add compressed pool for cl_buffer
Related-To: NEO-16423

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2025-12-10 10:44:29 +01:00
Jaroslaw Warchulski
0650b96999 fix: set proper allocation in MemObj::getMemObjectInfo
Related-To: NEO-12585
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
2025-03-24 16:07:35 +01:00
Szymon Morek
6a11e8a077 fix: revert changes around zero-copy
Related-To: NEO-12018

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2024-07-19 12:29:18 +02:00
Szymon Morek
33ab962121 fix: adjust compression hint usage for ocl buffers
Related-To: NEO-11989

Also, use zero-copy on lnl

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2024-07-18 18:24:48 +02:00
Szymon Morek
7d25965a78 performance: change buffer type for new coherency model
Related-To: NEO-11882

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2024-07-09 09:33:53 +02:00
Dominik Dabek
76e8be5c39 fix(ocl): handle gl sharing displayable textures
Displayable textures always need dc flush.

Related-To: NEO-11694

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-06-27 13:43:20 +02:00
Lukasz Jobczyk
436579ca8c fix: Disable async release of buffers with external host ptr
Related-To: NEO-10036

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-03-27 15:07:14 +01:00
Compute-Runtime-Validation
707796a50d Revert "fix: Disable async release of buffers with external host ptr"
This reverts commit 9b715c3ffc.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-03-27 07:49:54 +01:00
Lukasz Jobczyk
9b715c3ffc fix: Disable async release of buffers with external host ptr
Related-To: NEO-10036

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-03-25 12:55:57 +01:00
Compute-Runtime-Validation
e9b866ab11 Revert "fix: Disable async release of buffers with external host ptr"
This reverts commit 70a62d89e3.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-03-23 11:49:42 +01:00
Lukasz Jobczyk
70a62d89e3 fix: Disable async release of buffers with external host ptr
Related-To: NEO-10036

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2024-03-22 18:11:27 +01:00
Dominik Dabek
7a09c51f3d fix(ocl): querying memobj offset
Querying buffer offset via clGetMemObjectInfo should not modify its
value.

Related-To: NEO-9690

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-01-19 15:48:46 +01:00
Mateusz Jablonski
b182917d9d refactor: correct naming of allocation types
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-11 16:23:37 +01:00
Lukasz Jobczyk
c8c3f862f4 refactor: Add key to force zero copy without coherency
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-12-07 07:56:54 +01:00
Mateusz Jablonski
c9664e6bad refactor: rename global debug manager to debugManager
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-11-30 13:00:59 +01:00
Compute-Runtime-Validation
20cef540e0 Revert "performance: re-enable map/UnmapMemObject on CPU"
This reverts commit ef7c1f3940.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-11-10 16:33:12 +01:00
Igor Venevtsev
ef7c1f3940 performance: re-enable map/UnmapMemObject on CPU
Resolves: NEO-9398

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2023-11-08 02:27:22 +01:00
Mateusz Jablonski
c5c2e6808e fix: propagate error from getting CL_MEM_ALLOCATION_HANDLE_INTEL info
Related-To: NEO-9038
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-10-12 10:04:01 +02:00
Mateusz Jablonski
61f0c79c24 fix: handle failure on getting CL_MEM_ALLOCATION_HANDLE_INTEL info
Related-To: NEO-9038
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-10-11 10:33:37 +02:00
Mateusz Jablonski
7d811384d7 fix: avoid double free of mcsAllocation in case multi root device mem obj
Related-To: NEO-9038
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-10-03 13:46:28 +02:00
Filip Hazubski
8dd23f4b4d feature: Add logic around cpu side allocations
Group allocation types related to cpu side allocations in function to
query gmm usage type. These types will have caching enabled even if
CPU caching is not preferred by GPU.

Add logic to query whether the cpu access is allowed for an allocation
(in cases when it is not preffered by GPU).

Related-To: NEO-7194

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2023-07-28 21:04:24 +02:00
Compute-Runtime-Validation
8c155a2e89 Revert "performance: Memory handling improvements"
This reverts commit 5b80bd4d7c.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-07-20 11:37:09 +02:00
Filip Hazubski
5b80bd4d7c performance: Memory handling improvements
By default prefer allocating memory first by KMD, instead of malloc first.

By default prefer not caching allocations on MTL devices. This results
in allocations being handled with non-coherent pat index.

For integrated devices when caching is not preferred do not allow
direct memory access in CPU domain. For map/unmap operations create
a dedicated memory allocation for CPU access, instead of accessing it
directly, reusing the same logic as when mapping/unmapping local memory.

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2023-07-19 19:21:44 +02:00
Maciej Bielski
7ea8ed1757 refactor: extract generic parts of small buffers allocator
Currently the whole code resides within the opencl/ tree, but the
mechanism is meant to be reused in L0 for kernel-ISA allocations
optimization (further work).

This commit is a preparation step, which extracts the generic mechanism
and moves the extracted part under the shared/ tree.

Related-To: NEO-7788
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2023-06-13 10:46:03 +02:00
Igor Venevtsev
3e5101424d Optimize small buffers allocator
- Do not wait for GPU completion on pool exhaust if allocs are in use,
allocate new pool instead
- Free small buffer address range if allocs are not in use and
buffer pool is exhausted

Resolves: NEO-7769, NEO-7836

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2023-04-19 11:56:50 +02:00
Igor Venevtsev
6aadf63725 Revert "Optimize small buffers allocator"
This reverts commit f57ff2913c.

Resolves: HSD-15013057572

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2023-03-24 12:17:54 +01:00
Igor Venevtsev
f57ff2913c Optimize small buffers allocator
- Do not wait for GPU completion on pool exhaust if allocs are in use,
allocate new pool instead
- Reuse existing pool if allocs are not in use

Related-To: NEO-7769

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2023-03-15 19:12:30 +01:00
Warchulski, Jaroslaw
d1b2311207 Cleanup includes 49
Cleaned up files:
opencl/source/command_queue/command_queue_hw.h
opencl/source/gtpin/gtpin_defs.h
opencl/source/mem_obj/mem_obj_helper.h
opencl/source/memory_manager/mem_obj_surface.h
opencl/source/sharings/unified/unified_sharing.h
opencl/test/unit_test/api/cl_enqueue_migrate_mem_objects_tests.inl
opencl/test/unit_test/aub_tests/fixtures/unified_memory_fixture.h
opencl/test/unit_test/command_queue/command_queue_fixture.h

Related-To: NEO-5548

Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-02-10 17:26:49 +01:00
Mateusz Jablonski
24c5352350 refactor: remove redundant including of compiler_cache.h
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-02-03 11:16:31 +01:00
Warchulski, Jaroslaw
439aa6c87f Cleanup includes 43
Cleaned up files:
level_zero/core/test/unit_tests/mocks/mock_kernel.h
opencl/source/mem_obj/mem_obj.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-25 11:33:39 +01:00
Dominik Dabek
0c3cde2141 fix(ocl): adjust pool buffer allocator
Increase chunk alignment from 256 to 512.
Restores performance in some workloads with pool enabled but lowers maximum
possible number of buffers in pool from 256 to 128.

MemObj size will keep the value passed to clCreateBuffer ie. will not be
aligned up by chunk alignment.
CL_MEM_SIZE will now return same value as with pool disabled.

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2023-01-13 14:20:29 +01:00
Warchulski, Jaroslaw
a2fe929f0c Cleanup includes 18
Cleaned up files:
shared/source/command_stream/command_stream_receiver_hw.h
shared/source/compiler_interface/compiler_interface.h
shared/source/direct_submission/direct_submission_hw.h
shared/source/helpers/dirty_state_helpers.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-02 13:28:29 +01:00
Dominik Dabek
8468d6c4b0 Prepare for pool buffer enabling 2/n
Use correct offset for subBuffer created with clCreateSubBuffer

Make calls to clGetMemObjectInfo for CL_MEM_OFFSET and
CL_MEM_ASSOCIATED_MEMOBJECT return values like with pool buffer disabled

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-12-09 21:58:05 +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
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
Dominik Dabek
0cea7fe6d1 Fix allocating small buffers from pool
Wait for engine completion before freeing from pool

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-11-16 17:22:28 +01: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
Kamil Kopryk
d4d54f5093 Cleanup includes
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-07-25 09:58:38 +02:00
Lukasz Jobczyk
5dd25d9e8c Destroy multi graphics allocations synchronously
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-07-13 17:18:33 +02:00
Kamil Kopryk
858059a3c0 Reduce unnecessary move constructors calls
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-06-27 12:49:53 +02:00
Bartosz Dunajski
39c1c4d530 Remove virtual padding support
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-06-08 12:42:44 +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
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
Szymon Morek
c282a78b14 Fix parent MemObj dereference.
Don't dereference parent obj multiple
times (per gfxAllocation). Dereference it once

Related-To: NEO-6418

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-01-14 14:54:59 +01:00
Bartosz Dunajski
5c266f9ab0 Compression refactor [3/n]
Dont use allocation type for compression preference

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-03 17:20:07 +01:00
Bartosz Dunajski
55959d4d1d Helper method to check if allocation is compressed
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-02 16:13:53 +01:00
Maciej Dziuban
f1b6b733f0 Reuse graphics allocation from mapped buffers in OpenCL
Related-To: NEO-6352
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2021-10-27 15:53:10 +02:00