This commit removes early fail in linking with zebin and external
functions which happens when, there's a relocation to external functions
section, but it's not modifying any external function. And only treats
GLOBAL FUNC symbols pointing to external functions section as external
function symbols.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
Do not allocate heap if command list is copy only.
Related-To: NEO-6821
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Co-authored-by: Michal Mrozek <michal.mrozek@intel.com>
require 48bit resource for ring/semaphore buffer
for multi tile allocations select first tile
for single tile allocation select preferred tile
Related-To: NEO-6698
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
For different platforms based on number of available threads
and debug surface layout, calculate max debug surface size.
Related-To: NEO-6676
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit removes custom definition of
_PATCH_TOKEN_GLOBAL_HOST_ACCESS_TABLE and
instead uses one provided by IGC.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
In direct submission scenario command/ring/semaphore buffer allocations
are placed in the same memory bank to ensure that their memory is updated in
correct order
Related-To: NEO-6698
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This patch adds support for reading PCI bandwidth, generation
and linkwidth information from sysfs nodes for the linux
platform.
Related-To: LOCI-2969
Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
Remove parameter requiredThreadArbitrationPolicy
from PreambleHelper::programPreamble function.
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit moves patch token with global host access table to the
kernel scope from the program scope.
Related-To: NEO-6734
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
Add a per-instance SVMAllocsManager::nonGpuDomainAllocs container for
all allocations to be removed in
moveAllocationsWithinUMAllocsManagerToGpuDomain. This approach replaces
the current iterative search and performs the task faster.
Add 7 new unit-tests to verify the functionality related to
nonGpuDomainAllocs container, both in expected and unexpected/synthetic
scenarios.
For UTs replace a dummy unifiedMemoryManager pointer with a pointer to
an instace of SVMAllocsManager, otherwise a SegFault error is thrown at
the end of tests.
Perform overall cleanup in related tests implementation, includes but
not limited to removal of:
- givenInitialPlacementGpu\
WhenMovingToGpuDomainThenFirstAccessDoesNotInvokeTransfer
As it is fully covered by:
givenAllocationMovedToGpuDomain\
WhenVerifyingPagefaultThenAllocationIsMovedToCpuDomain
- givenInitialPlacementGpu\
WhenVerifyingPagefaultThenFirstAccessDoesNotInvokeTransfer
As it is fully covered by:
givenTbxAndnitialPlacementGpu\
WhenVerifyingPagefaultThenMemoryIsUnprotectedOnly
Finally, reduce code duplication where possible.
Related-To: NEO-6658
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
Logic related to programming non coherent and thread arbitration policy for
gens 9 and 11 has been moved to EncodeComputeMode object, where similar
logic for gens gen12lp and newer is located.
Functions PreambleHelper::programThreadArbitration and
PreambleHelper::getThreadArbitrationCommandsSize have been removed.
Redundant setForceNonCoherent call has been removed from XE HPG
Related-To: NEO-6728
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit removes ZebinTargetMetadata struct, and uses
ZebinTargetFlags for both target validations: via machine type, and
via intel gt notes.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This change introduces the new flag called DisableGpuHangDetection.
By default it is disabled. When someone wants to disable hang checking,
then this flag can be set to true.
Related-To: NEO-6681
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This feature is disabled by default, controlled with the knob
AppendMemoryPrefetchForKmdMigratedSharedAllocations
Related-To: NEO-6740
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
Change ThreadArbitrationPolicy::NotPresent value to -1
Update initial values to ThreadArbitrationPolicy::NotPresent
Related-To: NEO-6728
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit adds check in Linker::resolveExternalFunctions checking
if external functions are present before trying to resolve dependencies
and adds default values for ExternalFunctionInfo.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
Remove function clearComputeModePropertiesIfNeeded.
If a field has to be programmed unconditionally, ignore isDirty flag.
Related-To: NEO-6728
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit enables parsing symbol infos
passed in the PATCH_TOKEN_PROGRAM_SYMBOL_TABLE patchtoken.
Related-To: NEO-6734
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This change allows for modifying kernel's barrier count
based on called external functions metadata passed
via zeInfo section in zebin.
Added parsing external functions metadata.
Added resolving external functions call graph.
Added updating kernel barriers based on called external functions.
Added support for L0 dynamic link.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit adds support for querying global pointers via decorated
names passed in zeInfo.
Related-To: NEO-6734
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
On pre-XeHp platforms implicit args aren't at the beginning of indirect data,
GPU address of implicit args buffer is programmed within cross thread data
Related-To: NEO-5081, IGC-4710
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit fixes generating localIDs in zebin.
With thix fix, Emit Local in compute walker will be set accordingly with
the size of local_id argtype (currently, Emit Local is set to Emit None,
which prevents generating local IDs).
Related-To: NEO-6089
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This change:
- moves NEO::WaitStatus to a separate file
- enables detection of GPU hang in clWaitForEvents
- adjusts most of blocking calls in CommandStreamReceiver to return WaitStatus
- adds ULTs to cover the new code
Related-To: NEO-6681
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit fixes generating localIDs in zebin.
With thix fix, Emit Local in compute walker will be set accordingly with
the size of local_id argtype (currently, Emit Local is set to Emit None,
which prevents generating local IDs).
Related-To: NEO-6089
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This patch adds OS specific implementation for IP Sampling.
Implementation for linux is provided as part of this patch.
Related-To: LOCI-2787
--- master-files
level_zero/tools/source/metrics/linux/os_metric_ip_sampling_imp_linux.cpp
level_zero/tools/source/metrics/os_metric_ip_sampling.h
level_zero/tools/source/metrics/windows/os_metric_ip_sampling_imp_windows.cpp
level_zero/tools/test/unit_tests/sources/metrics/linux/test_metric_ip_sampling_linux_prelim.cpp
level_zero/tools/test/unit_tests/sources/metrics/linux/test_metric_ip_sampling_linux_upstream.cpp
level_zero/tools/test/unit_tests/sources/metrics/windows/test_metric_ip_sampling_windows.cpp
--- master-files
Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
according to implicit args design for SIMD-1 local ids are one-by-one
Resolves: NEO-6692
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
In order to setup ioctl helper we need to call ioctl to get hw info
Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
When running multiple threads, one thread could clear
allocationsForDownload while another was iterating over it.
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit fixes setting usesStringMap flag for printf, taking into
account using indirect functions in legacy (non-zebinary) path. It also
adds new field to kernelDescriptor, specifying the binary type
(legacy/zebin).
Related-To: NEO-6604
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This change prevents embedding identical SPIR-V section for each
target requested in fatbinary build. Instead of duplicating SPIR-V,
a new file called 'generic_ir' is added to AR archive. It contains
SPIR-V, which was used to build fatbinary. Build fallback in runtime
has been also adjusted - if 'generic_ir' file is defined in fatbinary
and there is no matching binary, then this generic SPIR-V is used to
rebuild for the requested target.
Additionally, MockOclocArgumentHelper::loadDataFromFile() was adjusted
to ensure null-termination of returned strings.
This change also removes possible undefined behavior, which was
related to reading names of files from AR archive. Previously,
if filename was shorter than requested target name, we tried to
read more memory than allowed.
Related-To: NEO-6490
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
Rename:
- debug flag ProgramPipeControlPriorToNonPipelinedStateCommand
to ProgramExtendedPipeControlPriorToNonPipelinedStateCommand
- local variables
Related-To: NEO-6615
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
use waitUserFence to wait for fence value
move some tests to shared
- ioctl helper tests
- drm memory info tests
- drm cache info
Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
Add pipe control before state base address, state compute
mode and state sip commands.
Related-To: NEO-6615
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
Add pipe control before state base address, state compute
mode and state sip commands on DG2 and PVC when CCS flow is used.
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This change uses value of cpuAddress from monitored fence
to detect GPU hang.
Related-To: NEO-5313
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
when local ids are generated by HW, use same dim order for runtime generation
move common logic to separated file
Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
FilterBdfPath is used only on Linux as a filter for BDF
when opening from /dev/dri/by-path
FilterDeviceId is used on both OSes as a filter for device id
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
When linear stream created for command container has not enough space
for command and BB_END it will program BB_END and allocate new command
buffer allocation. Pointer returned from getSpace in this case will
return storage from new command buffer allocation.
Related-To: NEO-5707
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This patch makes PCIE BDF as the default method for UUID
calculation.
Related-To: LOCI-2909
Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This change uses DRM_IOCTL_I915_GET_RESET_STATS to detect
GPU hangs. When such situation is encountered, then
zeCommandQueueSynchronize returns ZE_RESULT_ERROR_DEVICE_LOST.
Related-To: NEO-5313
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
- ELF type is EXEC
- Absolute GPU addresses in program headers as load addresses
- All relocations are applied (not only for debug info as before)
- Default section alignment for debug zebin is set to 4,
this fix the problem with .notes section parsing
Related-To: NEO-5571
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
Program Multi Gpu params in surface state only on Xe Hp Sdv
Respect zero-size image scenario when programming surface state
Move XeHp-only tests to dedicated subdir
Related-To: NEO-6466
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit cleans the code after previously removed GMock from the
MockWddm(GmockWddm) class by merging MockWddm class into WddmMock.
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
Change GMM resource info params, so that buffers
remain in system memory while images are being
routed to local memory additionally, fixes single
sku builds
Related-To: NEO-6391
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
When encoding ELF binary sort program headers by
virtual addresses incrementally.
This change is needed for compatibility with GDB.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
- Added Functionality to pass ze_power_saving_hint_type_t to zeContextCreate
included in the pNext extensions in ze_context_desc_t.
- Enables handling a hint value 0-100 with 0 being no power savings
and 100 being maximum power savings.
- ZE_RESULT_ERROR_INVALID_ENUMERATION is returned given an invalid hint.
Related-To: LOCI-2567
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
Forcing system memory pool for all allocations in WSL for DG2
while local memory support is being implemented
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
This patch implements the fallback method for Device UUID
using the BDF of the device for all product families.
Related-To: LOCI-2827
Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
Rename MemorySynchronizationCommands::isDcFlushAllowed
to MemorySynchronizationCommands::getDcFlushEnable
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
PVC will support buffers greater than 4GB, hence we have to
use stateless accessing mode as default.
Signed-off-by: Kopryk, Kamil <kamil.kopryk@intel.com>
IGC will be queried for max parameter size at the end of initializing
device caps.
Related-To: NEO-4851
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
New name for mock class:
GMockProgram -> MockProgramAppendKernelDebugOptions
Also GMockSourceLevelDebugger class body has been merged with
MockSourceLevelDebugger.
Related-To: NEO-4914
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
In some of the drm functions there is a pattern
to store array in unique_ptr and pass it's length
as an argument. This commit simplifies this.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
Introduced a new warning, which is printed to build log, when the
binary needs to be recompiled. Added a new flag -Wno-recompiled-from-ir
to allow suppression of that message. Removed a bug related to memcpy_s
from ModuleBuildLogImp::getString() and aligned it with specification.
Related-To: NEO-5819
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
this change also implements logic for recompilation of builtin from spv in L0
in case when binary resource is not available
Related-To: NEO-6170
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
- cmake refactor to disable ld.gold and ld.lld usage when cross-compiling
- skip some ULTs when CPU feature is not available
Related-To: NEO-6017
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
remove setters/getters for Index To Mocs Tables fields
all information contained in MOCS from gmm client context is now handled
by dedicated method set/get MemoryObjectControlState
Related-To: NEO-6466
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
Skip undefined symbols when decoding ELF symbol table
instead of treating them as error in zebin path in
order to support dynamic linking scenarios.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
Added chipset specific uuid retrieving functionality
This is used by zeDeviceGetProperties
Related-To: LOCI-2636
Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
- add function for resolving builtins using relocations
- add relocation for __SubDeviceID symbol
Related-To: NEO-6258
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
If a kernel has ray tracing calls, we allocate and initialize
per-device RTDispatchGlobals if needed, and hand off pointer to
the same into a running kernel via an implicit parameter.
Related-To: NEO-5384
Signed-off-by: Jim Snow <jim.m.snow@intel.com>