Commit Graph

62 Commits

Author SHA1 Message Date
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
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
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
Kacper Nowak efba242570 fix(zebin): Extend oneDNN WA for whole application context
When a dummy kernel "kernel void_(){}" is passed in sources - specific
for workloads with ngen backend - enforce fallback to CTNI for the whole
application context (mark the context as non-zebinary).

Related-To: NEO-7772
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-03-07 14:21:57 +01:00
Warchulski, Jaroslaw c43233dabf Cleanup includes 42
Cleaned up files:
level_zero/core/source/kernel/kernel_hw.h
shared/source/helpers/common_types.h
shared/test/common/libult/linux/drm_mock.h
shared/test/common/libult/ult_command_stream_receiver.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-25 09:16:39 +01:00
Maciej Plewka fa4830036a feature(ocl) use tags to synchronize multi root device events
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2023-01-23 10:28:01 +01:00
Maciej Plewka 1421796541 Revert "feature(ocl) use tags to synchronize multi root device events"
This reverts commit 353a7510b2bd2d774d0b7ee82ee48eae7f5dc1d3.

Signed-off-by: Maciej Plewka maciej.plewka@intel.com
2023-01-17 11:29:58 +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
Maciej Plewka 16bc84e27d feature(ocl) use tags to synchronize multi root device events
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2023-01-13 08:09:32 +01:00
Warchulski, Jaroslaw 77b88f19a1 Cleanup includes 23
Cleaned up files:
opencl/source/execution_environment/cl_execution_environment.h
opencl/source/helpers/cl_validators.h
opencl/test/unit_test/mocks/mock_cl_device.h
opencl/test/unit_test/mocks/mock_context.h
shared/source/helpers/cache_policy.h
shared/source/image/image_surface_state.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-09 12:30:30 +01:00
Warchulski, Jaroslaw 5eef40fedd Cleanup includes 22
Cleaned up files:
opencl/source/built_ins/builtins_dispatch_builder.h
opencl/source/context/context.h
opencl/source/gtpin/gtpin_notify.h
opencl/source/kernel/kernel.h
opencl/source/kernel/multi_device_kernel.h
opencl/source/mem_obj/buffer.h
opencl/source/mem_obj/mem_obj.h
shared/source/built_ins/registry/built_ins_registry.h
shared/source/page_fault_manager/cpu_page_fault_manager.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-05 16:59:01 +01:00
Compute-Runtime-Validation 876de37b92 Revert "Feature(OCL) Use tag nodes for root device synchronization"
This reverts commit 547d1c37b3.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-24 19:14:33 +01:00
Maciej Plewka 547d1c37b3 Feature(OCL) Use tag nodes for root device synchronization
With this commit events created on multi root device contexts will
synchronize using signaled TagNodes instead of using taskCounts.

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>

Related-To: NEO-7105
2022-12-23 15:48:54 +01:00
Dominik Dabek 2d34f00b3e Prepare for pool buffer enabling 3/n
Add per platform config
Reorder checks in allocateBufferFromPool

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-12-16 10:47:34 +01:00
Dominik Dabek 70dbce12d1 Prepare for pool buffer enabling 1/n
check if flags allow buffer from pool
add buffer offset to aubtests
disable pool buffer where required

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-12-05 23:51:30 +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
Compute-Runtime-Validation 074a1e8583 Revert "Make small buffer allocations lockable"
This reverts commit 9b9b0f10ef.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-11-19 18:04:32 +01:00
Dominik Dabek 9b9b0f10ef Make small buffer allocations lockable
Allocations of buffers <= 64KB will be lockable, to
allow copying through locked pointer.

Related-To: NEO-7332

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-11-18 16:07:50 +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
Daniel Chabrowski 6fd7ae7142 Cleanup headers
Signed-off-by: Daniel Chabrowski <daniel.chabrowski@intel.com>
2022-05-26 17:55:44 +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
Katarzyna Cencelewska a06fbd2077 Remove device enqueue part 10
- remove DeviceQueue

Related-To: NEO-6559
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-01-19 17:41:06 +01:00
Katarzyna Cencelewska d2818aaea2 Remove device enqueue part 5
-remove scheduler and builtin_kernels_simulation

Related-To: NEO-6559
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-01-13 14:15:26 +01:00
Fabian Zwolinski 617f65c285 Add wrapper for snprintf
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2021-12-17 13:07:49 +01:00
Maciej Dziuban 457ef00abf Reuse graphics allocations in svmMemcpy
Related-To: NEO-6352
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2021-11-17 14:03:05 +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
Maciej Dziuban 3f2536a6ba Move storage of mapped operations to OpenCL context
Relate-To: NEO-6352
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2021-10-26 11:52:13 +02:00
Compute-Runtime-Validation 116dac90de Revert "Move storage of mapped operations to OpenCL context"
This reverts commit 8c9dd3085b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-10-19 16:31:23 +02:00
Maciej Dziuban 8c9dd3085b Move storage of mapped operations to OpenCL context
Relate-To: NEO-6352
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2021-10-18 16:08:25 +02:00
Szymon Morek c8b85bb5a9 Add method to check tile only context
Related-To: NEO-6043

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-07-21 12:22:42 +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
Mateusz Jablonski 1e97e4117e Respect platform in context properties when creating context
Resolves: NEO-5223
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-03-30 20:59:19 +02:00
Mateusz Jablonski 8215395401 Simplify Context method
return if context has multiple sub devices related to a given root device

Related-To: NEO-3691
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-03-30 10:22:15 +02:00
Filip Hazubski 9a8125cdb0 Correct formatting
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2021-03-16 10:29:41 +01:00
Mateusz Jablonski 1b7d7afc07 Refactor USM properties
store reference to std of root device indices and device bitfields
store NEO::Device in USM properties

Related-To: NEO-3691
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-12-30 11:36:56 +01:00
Mateusz Jablonski aa1fc85257 Store device specific kernel members per root device
Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-12-10 17:57:39 +01:00
Filip Hazubski 4052525091 Update DestructorCallbacks helper
Move common logic to the helper.

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-11-16 13:08:53 +01:00
Filip Hazubski 818a5a683e Remove Context::processExtraProperties function
Related-To: NEO-4700

Simplify SharingContextBuilder::processProperties function.

Change-Id: I78bbf06c688c37490d9d7f09c9bfc451f1e68d30
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-10-30 14:33:21 +01:00
Krzysztof Gibala 2c1551d40d Extend specialQueue in context to StackVec
Related-To: NEO-4589
Change-Id: I92db4cf8511e13a35307a4f48b51041a6fc7330f
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2020-10-30 13:33:46 +01:00
Mateusz Jablonski a5a5c94097 Correct clCreateProgramWithBuiltInKernels
create program for all provided devices
move OCL specific code from shared to opencl

Related-To: NEO-5001
Change-Id: Ic352b4e907ae75426634ae4b3c7048edecaf83e7
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-10-22 19:26:34 +02:00
Mateusz Jablonski 52feced02b Correct exposing devices from program created with source
Related-To: NEO-5001
Change-Id: I15dd7480ecd8dc5cf2e4347cd06837ea573ecd95
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-10-20 16:18:30 +02:00
Krzysztof Gibala 214342f405 Create map for deviceBitfields per rootDeviceIndex
Pass rootDeviceIndex to getDeviceBitfieldForAllocation

Related-To: NEO-4589
Change-Id: Ib325a8bf822351ba36b225d94d4173fd725e8766
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2020-09-29 12:18:49 +02:00
Zbigniew Zdanowicz f838f667b1 Add context flag for resolve requiring kernels
Related-To: NEO-5127

Change-Id: Ia5da17735232504aabbca6b0df46ced4dfba3190
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2020-09-28 10:34:00 +02:00
Krzysztof Gibala fee51350f1 Add function to get maxRootDeviceIndex & set of rootDeviceIndices
Add to context:
- getRootDeviceIndices
- getMaxRootDeviceIndex

Related-To: NEO-4589
Change-Id: I68a2162eea3d566c2ee99714d45253dfa35ec0cd
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2020-09-09 10:54:50 +02:00
Filip Hazubski d889c599b2 Correct callback API functions
Add implementation to clSetProgramReleaseCallback and
clSetContextDestructorCallback functions.

Resolves: NEO-4962, NEO-5051

Change-Id: Iad6fffc663665a3cf16b96aa90065140cf8c5477
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-09-08 14:08:50 +02:00
Filip Hazubski 2912cebbd4 Update Context::blitMemoryToAllocation function
Change-Id: I5f81cb023b75e82bd3aff8e393f6b9463c767112
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-07-13 15:23:51 +02:00
Mateusz Jablonski c80ff3a158 Setup context type based on provided devices
Related-To: NEO-4484
Change-Id: I1db354237b87167d4fa824e63737f6fff2ad77cb
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-05-05 09:49:11 +02:00