Commit Graph

177 Commits

Author SHA1 Message Date
Compute-Runtime-Validation 143299a7a0 Revert "Flush printf from kernel during event synchronize"
This reverts commit c908f5a0b3.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-02-09 15:35:12 +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
Zhang, Winston c908f5a0b3 Flush printf from kernel during event synchronize
During event synchronize in commandlist, now the printf buffer
should get flushed out when host synchronize is called.

Related-To: LOCI-3681

Signed-off-by: Zhang, Winston <winston.zhang@intel.com>
2023-02-07 21:52:31 +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
Aravind Gopalakrishnan d7a78db328 debug: Add debug key for custom event timeout
- This helps to investigate tests using debug key

Related-To: LOCI-3673

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
2023-01-31 21:58:39 +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 b9b9155ee0 Fail ipc event pool creation for max event packet misconfiguration
Remote event pool is created with device list that configure max event packet
IPC context can have different device list and configure different
max event packet.
When these two numbers are different driver should not allow creation of
IPC event pool.

Related-To: NEO-7636

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-01-20 00:45:29 +01:00
Zbigniew Zdanowicz 9441e1c510 disable event query status optimization for ipc events
Related-To: NEO-7636

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-01-18 08:49:34 +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
Zbigniew Zdanowicz ff88930625 Refactor ipc event pool data exchange protocol
- using predefined structure adds security to enforce data limit
- code is simplified and easier to maintain or add new data fields

Related-To: NEO-7636

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-01-17 10:46:52 +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
Zbigniew Zdanowicz ee99df18aa Fix event signaling in command list extension function
Related-To: NEO-7490

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-01-13 14:13:00 +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
Zbigniew Zdanowicz 5339d5c0af refactor level zero event for better access of completion field
Related-To: NEO-7490

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2023-01-12 10:57:57 +01:00
Kamil Kopryk 98e0557a4c Don't use global getter for L0GfxCoreHelper and GfxCoreHelper in L0 2/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-01-02 11:55:14 +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
Warchulski, Jaroslaw 9f3fc6858e Cleanup includes 16
Cleaned up files:
shared/source/built_ins/built_ins.h
shared/source/command_container/command_encoder.h
shared/source/helpers/hw_helper.h
shared/source/memory_manager/allocation_properties.h
shared/source/xe_hpc_core/hw_cmds.h
shared/test/common/test_macros/test_excludes.h

Related-To: NEO-5548

Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-29 15:12:37 +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
Szymon Morek 637c4e5621 Disable state caching if used on regular cmd list
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-12-09 16:47: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
Zbigniew Zdanowicz c1ecba0c4c Fix two issues at signaling all event packets 1/n
First fix is to calculate remaining packets only when available.
Second fix is to use multi-tile signal when number of remaining packets
does match partition count - this is to resolve subdevice - root device
possible conflicts.

Related-To: NEO-7490

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-12-08 16:28:54 +01:00
Kamil Kopryk 6993ed5c52 Reduce binaries sizes 2/n
Observed about 50MB reduction in overall binaries size (directory build))
when building all targets
with MSVC (Visual Studio 2022 17.3.0 preview 6)
using Debug 64 configuration.

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-08 16:14:38 +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
Zbigniew Zdanowicz 9f8911e9da Fix level zero event synchronization issues for TBX mode
This change has two issues fixed.
First fix assures event must not download all allocations sent to GPU
when event is not ready.
Second fix performs page walk on event allocation before event allocation
can be downloaded, as download before page walk is not supported scenario
in TBX mode.

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-12-07 11:10:29 +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
Compute-Runtime-Validation da3a5046fc Revert "Download all allocations when event is ready"
This reverts commit d97dcc80b2.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-12-01 15:27:56 +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
Zbigniew Zdanowicz d97dcc80b2 Download all allocations when event is ready
Related-To: NEO-7545

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-11-28 18:33:14 +01:00
Zbigniew Zdanowicz c0c9ce548a Validate level zero events in TBX mode
Related-To: NEO-7545

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-11-28 16:45:02 +01:00
Szymon Morek 4598fc61e2 Don't access virtual method if not needed
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-11-25 16:16:32 +01:00
Szymon Morek 5d2ed42275 Disable isCompleted state if event reset on GPU
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-11-22 17:11:07 +01:00
Zbigniew Zdanowicz f5fb26d017 Prepare tests to enable signaling of all event packets
Related-To: NEO-7490

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-11-17 15:34:54 +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 be1c1e89cb Add option to signal and synchronize using all available event packets
Related-To: NEO-7469

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-11-10 23:28:43 +01:00
Kamil Kopryk af3f370ff0 Correct event reset
Related-To: NEO-7391
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-11-09 17:20:22 +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 d3f30b4046 Remove not needed access to atomic variable
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-10-11 09:34:24 +02:00
Szymon Morek 67c0378a63 set Event::csr for immediate cmdlists
Currently Event::csr is set during
initialization and never changes.
This PR is to associate Event::csr with the one
that was used to dispatch task in cmdlist

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-10-03 11:54:11 +02:00
Szymon Morek ec04de61a7 [L0][XE_HPC]Perform memcpy on CPU for non-usm ptrs
Related-To: NEO-7237

If size is small enough, it is more efficient to
perform copy through locked ptr on CPU.
This change also introduces experimental flag to
enable this.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-09-26 13:20:40 +02:00