Moved pathExists from SysCalls to path.h.
In ULTs, use unchanged pathExists and mock stat, getFileAttributesA instead.
Add Windows and Linux ULTs for pathExists.
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
The dependency towards `Drm` is unnecessary and only makes testing more
difficult. Instead, dependency towards `IoctlHelper` alone only is
sufficient.
Related-To: NEO-10158
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
- do not release resources derived from parent process
- zeInit() in child should initilize new driver
Related-To: NEO-11761
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
KMD exposes flat subslice info without indicating slice index
This commit calculates slice count based on total subslice count and
max subslice per slice count that we have from device blob
Related-To: NEO-12073
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
Calling virtual functions from within constructors is incorrect, the
virtualization mechanism does not work until a constructor completes.
So, instead of performing many operations in constructors, make them
small and use static `create()` methods to construct the object properly
and only then perform additional setup.
Mocks are a prominent example how such practice degrades the code.
A function called from a constructor is basically unmockable. Despite
being overriden by derived type (to alter the execution path as per
needs of a given test-case) the parent versions are always called.
This was making test development more and more painful as at some point
there is no hack to compensate for the lack of standard mechanism.
Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
Add resetBuiltins helper function to MockRootDeviceEnvironment.
Update tests to use the new function whenever builtins unique pointer
is reset to ensure that sip kernels are properly freed.
Related-To: HSD-18038645398, HSD-18038819112
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
Get the local memory regions count from the primary source (MemoryInfo)
and store for further use when using DrmMemoryManager.
Add a point of dispatch (virtual `createStorageInfoFromProperties`) for
further Drm-specific customizations related to StorageInfo. As the
function became virtual, move one of its callers
(`isLocalMemoryUsedForIsa()`) from the constructor of `MemoryManager` to
respective constructors of all derivative classes. This prevents
bypassing the virtual call dispatch.
Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
Replace less type-safe uint32_t and reduce conversions between both
types.
Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
Added a logic to check the reset status after the completion to make
sure we go through the logic at least once
Related-To: GSD-8902
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
do not exceed system memory region size when region is available
Related-To: HSD-18038050680
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
* Derive that information from GT list
* Use it to compute local memory size given the mask of tiles to account
for
* Leverage IoctlHelper to dispatch execution (i915 vs Xe)
Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
when i915 reports gtt size between 47 and 48 bits we consider
it as 48 bit VA space
Related-To: GSD-8215
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
Make bindless heaps resident right after heap allocation.
Motivation is that SYCL bindless image can be passed as a value argument
or through memory. Therefore, we're not able to make its bindless heap
resident during kernel initialization or setting kernel arguments.
This fixes SYCL bindless image read_write_*D.cpp tests on DG2.
Related-To: NEO-7063
Signed-off-by: Wenju He <wenju.he@intel.com>
Add support for configuring ccs mode for all applicable devices
before KMD is loaded.
Use ZEX_NUMBER_OF_CCS to configure ccs mode.
Format is as follows:
ZEX_NUMBER_OF_CCS=NumberOfCcs i,e Setting ZEX_NUMBER_OF_CCS
to 4 sets ccs mode to 4 for all devices for which configuration
is supported.
Related-To: NEO-10378
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
Implemented to go through entire contexts in the process and then query
reset status to check the unexpected GPU segfault.
Added a new debug variable GpuFaultCheckThreshold to change the checking
frequency for each hang check for performance analysis.
Related-To: GSD-5673
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
Allow custom values for different test types, i.e. ULT, AUB, etc. can
have custom timeout by using e.g.: NEO_{ULT,AUB,...}_ITERATION_MAX_TIME.
Old behavior with reading NEO_ULT_ITERATION_MAX_TIME for each test type
is preserved but new envirnoment variable has precedence.
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
Enable programming pat indexes on mtl linux for device buffers.
Change DrmMemoryManager::allocateMemoryByKMD to use gemCreateExt.
Changes currently disabled, can be enabled with flag
DisableGemCreateExtSetPat=0
Related-To: NEO-7896
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
Enable programming pat indexes on mtl linux for device buffers.
Change DrmMemoryManager::allocateMemoryByKMD to use gemCreateExt.
Related-To: NEO-7896
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
- makes prelim read/writeGpuMemory generic
- Implements Xe specific ioctls and fsyncs
- Refactors dbg IoctlHelper to use shared base class
for Xe and i915
Related-to: NEO-9668
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
Changed NumaLibrary to read default policy instead of using
the address-based policy, and remove unnecessary argument.
Removed numaif.h from the repo as it is no longer required.
Related-To: NEO-8276
Signed-off-by: Yoon, Young Jin <young.jin.yoon@intel.com>
Modified ioctl_helper_prelim to support the extension of gem_create_ext,
i.e. prelim_drm_i915_gem_create_ext_mempolicy.
Added two debug variables to be used for the mempolicy extension.
Modified functions in memory_info and drm_memory_manager to support extension
Added numaif.h from https://github.com/numactl/numactl/tree/master,
v2.0.14
Related-To: NEO-8276
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
Added an extension version of zeContextGetVirtualAddressSpaceIpcHandle
and zeContextPutVirtualAddressSpaceIpcHandle, which return
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE for now.
Related-To: NEO-8259
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
Added an extension version of zeContextGetVirtualAddressSpaceIpcHandle
and zeContextPutVirtualAddressSpaceIpcHandle, which return
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE for now.
Related-To: NEO-8259
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
Invoking close on invalid fd result in undesired behaviour.
Pass proper file descriptor for close to avoid unnecessary
aborts during destruction.
Related-To: GSD-6816
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
xe topology info to byte aligned storage
xe engine info to 2 byte aligned storage
system info to 4 byte aligned storage
all other info to 8 byte aligned storage
Related-To: NEO-9038
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
DRM_XE_VM_CREATE_FAULT_MODE flag is to be used when
Drm::hasPageFaultSupport returns true.
Related-To: NEO-7996
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
- The FsAccess, ProcFsAccess and SysfsAccess classes have been added in
a file in the Sysman Shared directory. The instances of these classes
are maintained in the Sysman Kmd Interface classes.
- Added functions for opendir, readdir and closedir in the shared code.
- Added a ULT in the sysman directory to cover these new functions from
the shared code.
Related-To: LOCI-4689
Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
When upstream ioctl helper is created it will try to create small
allocation, adding I915_GEM_CREATE_EXT_SET_PAT extension. If it
succeeds, for all resources with valid pat index value it will then
explicitly program pat index value with gem create ext call.
PrintBOCreateDestroyResult value can be used to:
- print whether the set pat extension is supported by the kernel, when
ioctl helper is created
- print whether set pat extension was added for a given gem create ext
call and what pat index value was programmed
Note: introduced changes are disabled by defualt.
Toggle DisableGemCreateExtSetPat can be used to enable new functionality.
Related-To: NEO-7896
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
Related-to: NEO-7695
New debug keys added:
EnableBOChunking is now a mask
0 = no chunking (default).
1 = shared allocations only
2 = device allocations only
3 = shared and device allocations
MinimalAllocationSizeForChunking sets the minimum allocation
size to apply chunking. Default is 2MB.
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
When upstream ioctl helper is created it will try to create small
allocation, adding I915_GEM_CREATE_EXT_SET_PAT extension. If it
succeeds, for all resources with valid pat index value it will then
explicitly program pat index value with gem create ext call.
PrintBOCreateDestroyResult value can be used to:
- print whether the set pat extension is supported by the kernel, when
ioctl helper is created
- print whether set pat extension was added for a given gem create ext
call and what pat index value was programmed
Resolves: NEO-7896
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
Read if support for chunking is available in the KMD.
If available, KMD will create a BO with 1 or more chunks,
depending on the chunk size selected.
Related-To: NEO-7695
Sync to
https://github.com/intel-gpu/drm-uapi-helper/releases/tag/v2.0-rc18
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: John Falkowski <john.falkowski@intel.com>
This patch add new environment variables to control compiler cache.
Works as follow: If persistent cache is set driver check if NEO_CACHE_DIR
is set. If not then driver checks XDG_CACHE_HOME - If exists
then driver create neo_compiler_cache folder, if
not then driver checks HOME directory. If each NEO_CACHE_DIR,
XDG_CACHE_HOME and HOME are not set then compiler cache is disabled.
Current support is for Linux only.
Signed-off-by: Diedrich, Kamil <kamil.diedrich@intel.com>
Related-To: NEO-4262