Commit Graph

54 Commits

Author SHA1 Message Date
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
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 3ed0f074af Add method to set compression flag
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-06-10 12:27:24 +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
Dominik Dabek 1bba3252bc MemObj uses isRenderCompressed when it's an image
Related-To: NEO-5139

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2021-04-21 11:56:47 +02:00
Krzysztof Gibala 8d2cfd87ae Create graphicsAllocation for all devices in image
Unlock flow for multi device setup in:
- enqueueReadImage
- enqueueWriteImage

Related-To: NEO-4589
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2020-12-10 17:40:03 +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
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
Slawomir Milczarek 912af26602 Add support for async destruction of map allocations
- map allocations with CL_MEM_USE_HOST_PTR are still destroyed in place
- map allocations are additionally checked for completion on all os contexts

Related-To: NEO-5073

Change-Id: I6198ff76704a03412ef648503df8e70fee4bd3be
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2020-09-21 07:45:59 +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
Maciej Dziuban 2f4b132722 Use default graphics allocation
Change-Id: Iad369f4cd362ed1330440887dc9b6789dcd0b95d
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2020-08-19 16:17:18 +02:00
Maciej Dziuban 907c767d1e Enable querying if compression is used
Change-Id: If8084a8f0720b93b06dbdd3c6aa6348b2db7a9c6
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2020-08-18 10:26:37 +02:00
Krzysztof Gibala eca0ef41a1 Correct logic in getBasePtrForMap
Add ULT to verify that all mapAllocations are destroyed

Related-To: NEO-4672
Change-Id: If7d00cc9101c15bedf7ecf14a24ca9893f3f7c51
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2020-08-17 12:04:10 +02:00
Krzysztof Gibala cb5ab704b6 Destroy all GraphicsAllocation in ~MemObj
Related-To: NEO-4672
Change-Id: I4fa09ae7753ed258f489b9e9f328d0a455e7d9b6
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2020-08-13 12:18:35 +02:00
Krzysztof Gibala e9c42e54b2 Connect mem_obj with MultiGraphicsAllocation
Related-To: NEO-4672
Change-Id: I188db44b4cb0ac6245bd7c864c69b8f1c0084dc4
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2020-07-22 14:09:27 +02:00
Krzysztof Gibala a8b40de5e8 Remove graphicsAllocation from MemObj
Related-To: NEO-4672
Change-Id: Ie11ba2e30516947f9ca107d53c5b41429dfdace5
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2020-07-08 17:18:16 +02:00
Mateusz Jablonski 5bc511b77d Remove MemObj::rootDeviceEnvironment
Pass Device to Buffer::setArgStateful

Related-To: NEO-4672
Change-Id: I0b7ed3ee578139f250c8470532dc0ae2eb2991e1
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-07-01 18:47:32 +02:00
Mateusz Jablonski 57d0967a2c Pass root device index to MemObj::getGraphicsAllocation method
leave parameterless method in Buffer and Image classes

add method to remove graphics allocation from MultiGraphicsAllocation

Related-To: NEO-4672
Change-Id: I3020eecfabe9a16af7f36d68a74b32d3f4fc2276
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-06-05 13:18:03 +02:00
Mateusz Jablonski 1db6d28754 Add MultiGraphicsAllocation to MemObj class
use it to get allocation type and coherency status

Related-To: NEO-4672
Change-Id: Id1fdc358f7e2038e78c1225ebc986b2a7775c665
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-06-01 17:55:07 +02:00
Filip Hazubski 99b0f04cc0 Add new API properties queries
Add queries for getting properties that were used when creating an object:
 - CL_QUEUE_PROPERTIES_ARRAY
 - CL_PIPE_PROPERTIES
 - CL_MEM_PROPERTIES
 - CL_SAMPLER_PROPERTIES

Related-To: NEO-4368

Change-Id: Ib761ee3dd338e9718d72ed4c9596b38843a9b802
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-05-27 18:50:58 +02:00
Filip Hazubski 5eed521fe1 Update getInfo function
Allow return value size to be 0. Do not modify return value size in case
of error.

Related-To: NEO-4368

Change-Id: I201e8ee7c23fcdc2712f6b04bedc71bf4ab64f06
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-05-21 17:06:28 +02:00
Mateusz Jablonski 159c804312 Add method to get device bitfield from context
Related-To: NEO-4484
Change-Id: I5079c5bff48b552ed5326b2252bcd9401ea66c7d
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-04-28 21:26:11 +02:00
Krzysztof Gibala b0ed3b2ab1 Refactor MemoryPropertiesFlags
Rename:
- MemoryPropertiesFlags to MemoryProperties
- MemoryPropertiesParser to MemoryPropertiesParserHelper
- getMemoryPropertiesFlags to getFlags
- getMemoryPropertiesFlagsIntel to getFlagsIntel
- functions involved with MemoryPropertiesFlags

Related-To: NEO-4143
Change-Id: I4eec67bba95dd5354d0df43c31e6ca724909138e
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2020-04-28 18:15:25 +02:00
Mateusz Jablonski 0c404bc880 Pass device bitfield to allocation properties when creating mem obj
Related-To: NEO-4484
Change-Id: I961e9122591dc7293e37d5c1ca58cbcd649ee653
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-04-16 15:01:37 +02:00
Filip Hazubski fe851da327 Rename device directory
device directory is renamed to cl_device.

Related-To: NEO-3938

Change-Id: I96794c82632d042da6814550597d805df7bb6436
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-03-24 14:35:21 +01:00
Mateusz Jablonski 74072d4916 Access GmmHelper and GmmClientContext via RootDeviceEnvironment
Related-To: NEO-3857
Change-Id: Ie9d719c9884fd89580ce3592a0d4d4cd42862f47
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-25 12:32:16 +01:00
Mateusz Jablonski 9dbeeea18f Clang-format: restore sorting includes
Change-Id: I34eb993b562c77f56d8fbd51a02ee266c1f76678
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-24 10:22:30 +01:00