Commit Graph

100 Commits

Author SHA1 Message Date
Neil R Spruit 75fbaa0642 fix l0: Set isHostVisibleEventPoolAllocation for all host allocated EventPools
Related-To: LOCI-4147

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2023-03-15 16:56:13 +01:00
Zbigniew Zdanowicz b4544f6f78 Fix dependency resolve in level zero black box tests
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-02-21 08:25:07 +01:00
Neil R Spruit 188f64adfd Fix IPC Event pools allocated for single device used on multidevice
Related-To: LOCI-3860

- Fixed IPC Event pools that are allocated for a single device such that
when opened thru IPC only that device handle can be used by the process
which opened the IPC event pool.

- IPC Event handle includes numDevices as a field to determine if the
root device index is the only index allowed for this event pool.

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2023-02-09 15:16:52 +01:00
Kamil Kopryk 524d945e8c refactor: rename l0 hw_helpers dir to gfx_core_helpers
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-02-02 11:15:56 +01:00
Kamil Kopryk 2484c7ceb2 refactor: rename hw_helper files to gfx_core_helper files
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-02-01 19:37:51 +01:00
Kamil Kopryk eb002acaa1 refactor: rename l0_gfx_core_helper files
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-24 12:59:26 +01:00
Zbigniew Zdanowicz 7925e12392 Add improvements and tweaks to event pool runtime and tests
1. Reposition event pool code
- Implementation of event pool methods should be placed in event pool file
2. Change event pool and event classes
- move all class variables to base classes as protected
- add needed setters and getters for runtime
- add extended mocks and whiteboxes for unit tests
- tests using base or mock class when needed
3. Correct event creation in unit tests
- use HW specific timestamp type
- HW unit tests are using template timestamp type for event creation
- other tests are using helper to create event

Related-To: NEO-7636

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-01-20 16:47:08 +01:00
Warchulski, Jaroslaw 286c672ef4 Cleanup includes 37
Cleaned up files:
level_zero/core/source/event/event.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-20 12:34:39 +01:00
Zbigniew Zdanowicz 172ea34fc2 Refactor event pool class hierarchy
Related-To: NEO-7636

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-01-17 14:42:20 +01:00
Warchulski, Jaroslaw c275008e51 Cleanup includes 32
Cleaned up files:
level_zero/core/source/cmdlist/cmdlist_hw.h
level_zero/core/source/cmdqueue/cmdqueue.h
level_zero/core/source/event/event.h
opencl/source/helpers/get_info_status_mapper.h
opencl/source/helpers/hardware_commands_helper.h
shared/source/helpers/per_thread_data.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-16 20:41:37 +01:00
Joshua Santosh Ranjan 3fdb9ae0dd Fix zero elapsed time for AppendMemoryCopy
1. If cpu based copy is used, it is possible that copy time is
less than device timestamp resolution. In this scenario, this patch
returns 1 instead of 0.

2. This patch also fixes usage of CPU time instead of CPU timestamp
for end timestamp calculation.

Related-To: LOCI-3754

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
2023-01-13 04:40:50 +01:00
Zbigniew Zdanowicz 5a82b84219 refactor event interface for better use of functions
Related-To: NEO-7490

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-01-12 11:50:35 +01:00
Warchulski, Jaroslaw 7ae44268cb Cleanup includes 17
Cleaned up files:
shared/source/built_ins/sip.h
shared/source/compiler_interface/compiler_cache.h
shared/source/compiler_interface/compiler_interface.h
shared/source/device_binary_format/device_binary_formats.h
shared/source/helpers/timestamp_packet.h
shared/source/kernel/debug_data.h
shared/source/utilities/tag_allocator.h
shared/test/common/mocks/mock_device.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-02 10:59:08 +01:00
Spruit, Neil R 905a0bc0b4 Fix Device Allocated IPC Events for L0
- Given Device Allocated IPC Event Pool, the open IPC event pool process
  must allocate the event pool as a device buffer or usage of the memory
will fail.
- Pass deviceAlloc flag thru the IPC Event Pool Handle to enable the
  child processes to allocate the correct memory type.
- Pass isHostVisible flag thru IPCEvent Pool Handle to indicate if the
  event pool must be allocated as host visible regardless of the
allocation type.

Related-To: LOCI-3764

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2022-12-23 03:29:16 +01:00
Compute-Runtime-Validation 08f53f4e96 Revert "Fix Device Allocated IPC Events for L0"
This reverts commit 1292ea26f5.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-22 21:42:26 +01:00
Spruit, Neil R 1292ea26f5 Fix Device Allocated IPC Events for L0
- Given Device Allocated IPC Event Pool, the open IPC event pool process
  must allocate the event pool as a device buffer or usage of the memory
will fail.
- Pass deviceAlloc flag thru the IPC Event Pool Handle to enable the
  child processes to allocate the correct memory type.
- Pass isHostVisible flag thru IPCEvent Pool Handle to indicate if the
  event pool must be allocated as host visible regardless of the
allocation type.

Related-To: LOCI-3764

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2022-12-20 23:43:03 +01:00
Kamil Kopryk 4a87266be1 Don't use global getter for L0GfxCoreHelper and GfxCoreHelper in L0 files
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-20 16:51:43 +01:00
Zbigniew Zdanowicz 595aa2f626 Fix issues in signal all event packets 6/n
This fix unifies setting event properties in event pool, so they are shared
betweem all event pool devices.

Related-To: NEO-7490

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-12-20 10:42:42 +01:00
Compute-Runtime-Validation ad072b4d5d Revert "Fix Device Allocated IPC Events"
This reverts commit 1360ec9179.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-17 05:36:59 +01:00
Spruit, Neil R 1360ec9179 Fix Device Allocated IPC Events
- Given Device Allocated IPC Event Pool, the open IPC event pool process
  must allocate the event pool as a device buffer or usage of the memory
will fail.
- Pass deviceAlloc flag thru the IPC Event Pool Handle to enable the
  child processes to allocate the correct memory type.

Related-To: LOCI-3764

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2022-12-15 23:35:39 +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
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
Kamil Kopryk 73b2104183 Rename L0HwHelper -> L0GfxCoreHelper
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-05 11:26:05 +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
Kamil Kopryk 145f249f0c Move L0HwHelper ownership to RootDeviceEnvironment 4/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>

Use RootDeviceEnvironment getHelper<L0CoreHelper> for
- multiTileCapablePlatform
- alwaysAllocateEventInLocalMem
2022-11-17 12:49:19 +01:00
Kamil Kopryk aaa4e90ad4 Move L0HwHelper ownership to RootDeviceEnvironment 1/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>

Use RootDeviceEnvironment getHelper<L0CoreHelper> for
- setAdditionalGroupProperty
- createEvent
- isResumeWARequired
2022-11-15 08:24:23 +01:00
Zbigniew Zdanowicz 27d042107a Add feature to estimate number of event packets
Related-To: NEO-7469

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-11-04 18:38:17 +01:00
Szymon Morek a91c3a13a4 [XE_HPC][L0] Allocate all events in local memory
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-09-14 13:21:51 +02:00
Szymon Morek 48a3cf4b75 Revert "Allocate all event pools in local memory"
This reverts commit 8aa87a6f8109223d61c5d41214331ffc12659295.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-09-10 01:08:57 +02:00
Szymon Morek 3bb12ad10a Allocate all event pools in local memory
Currently event pools are allocated in system
memory if HOST_VISIBLE flag is being set.
With this change such event pool will be
allocated in device memory if DC flush is not
allowed.

Related-To: NEO-7302

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-09-06 17:17:32 +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
Compute-Runtime-Validation 87a016a47c Revert "Use postsync for copy and fill"
This reverts commit cffe7f158a.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-04-23 04:27:34 +02:00
Aravind Gopalakrishnan cffe7f158a Use postsync for copy and fill
Related-To: NEO-5968

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
2022-04-22 17:20:27 +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
Aravind Gopalakrishnan 8aa2e76173 Allow device allocs for timestamp events
Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
2022-02-28 15:50:22 +01:00
Compute-Runtime-Validation e984760423 Revert "Move and extend local memory DRM allocations"
This reverts commit b84b0015d5.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-02-22 08:48:46 +01:00
Daniel Chabrowski b84b0015d5 Move and extend local memory DRM allocations
Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
2022-02-21 16:04:53 +01: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
Spruit, Neil R ae77bd1bd2 Enable Device Memory to be shared in WSL-2 with L0
- Add getMemoryManagerType to check which memory manager has been init
to determine if Linux + WDDM memory manager is in use.
- Add isNTHandle to test and verify if a handle is an NT handle during
L0 Open IPC Handle.

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2022-01-27 23:14:29 +01:00
Zbigniew Zdanowicz df6829f361 Use event pool init code for result of event pool api creation function
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-11-09 16:29:49 +01:00
Mateusz Jablonski 0d74ab8ae8 Correct allocating event pool in device memory
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-13 17:36:46 +02:00
Aravind Gopalakrishnan e27d8a53a1 Cleanup event class to use function getter/setters
Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
2021-06-10 22:37:35 +02:00
Aravind Gopalakrishnan 71cf6be59e Use device allocations for events if ZE_EVENT_POOL_FLAG_HOST_VISIBLE is not set
Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
2021-06-08 20:23:15 +02:00
Jaime Arteaga 5e29dccddc Add IPC events support
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-06-08 08:11:15 +02:00
Bartosz Dunajski afa461efb0 L0::Event to support dynamic size - part 2
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-05-19 14:00:58 +02:00
Bartosz Dunajski 424b2143da L0::Event to support dynamic size
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-05-18 13:59:58 +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
Bartosz Dunajski 015595a3f8 Remove root device index duplicates from Event pool allocation
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-05-12 10:33:58 +02:00
Bartosz Dunajski cffac84a3b Simplify creating EventPool allocation
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-05-11 18:26:54 +02:00
Compute-Runtime-Validation dd6653892e Revert "Move SVM allocs memory manager to L0::Context (1/N)"
This reverts commit 9080e2ee5b.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-05-09 12:37:44 +02:00