Commit Graph

53 Commits

Author SHA1 Message Date
Mateusz Jablonski 98bf872fdd fix: return error when cannot obtain debug surface size
remove default max debug surface size
check state save area size only for debug scenarios
reduce state save area size in unit tests - rely on values from mock

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2025-05-23 14:48:08 +02:00
Mateusz Jablonski 8353f68307 feature(internal): add debug key to override max debug surface size
reduce the value in unit tests

Related-To: NEO-14097
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2025-05-21 14:57:41 +02:00
Jaroslaw Warchulski 3e1aa33924 refactor: cleanup headers
Related-To: NEO-5548
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
2025-04-14 14:59:40 +02:00
Filip Hazubski 504440fc4d feature: Add ftrHeaplessMode flag
Pass hwInfo to isHeaplessModeEnabled and isForceBindlessRequired functions.

Related-To: NEO-14526

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2025-04-02 21:06:05 +02:00
Jitendra Sharma dda7876d3a feature: Introduce SipClassType::externalLib
Related-To: NEO-13737
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2025-03-19 11:06:03 +01:00
Michał Pryba 117f4c8d32 test: fix ults that are not freeing Sip kernel correctly
Related-To: NEO-13839
Signed-off-by: Michał Pryba <michal.pryba@intel.com>
2025-03-17 18:53:12 +01:00
Marcel Skierkowski e27a6dc280 refactor: use virtualFileSystem in ULTs
reducing the number of tests that have interactions with filesystem.
writeDataToFile() saves filename and content in std::map.
fileExistsHasSize() checks if file was previously written to virtualFileSystem
loadDataFromVirtualFile() fetches data from std::map based on filename

Related-To: NEO-7006
Signed-off-by: Marcel Skierkowski <marcel.skierkowski@intel.com>
2024-12-13 17:57:07 +01:00
Brandon Yates 013c49db02 fix: change getBindlessDebugSipKernel to also get heapless sip
Rename function to getDebugSipKernel and select either bindless
or heapless depending on mode

Related-to: NEO-8396

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-10-03 20:47:40 +02:00
Mateusz Jablonski da8ce85f0a fix: correct preemption surface size when getting wmtp sip from igc
when SIP kernel is taken from IGC then state save area header
describes preemption surface size required for the SIP kernel

Related-To: NEO-12826
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-10-01 11:06:58 +02:00
Mateusz Jablonski c7ae732a2a test: enable global mock sip in tests
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-09-30 18:19:57 +02:00
Kamil Kopryk 8d3ddbac31 test: correct sip kernel type in ults if heapless enabled
Related-To: NEO-10641

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2024-09-11 16:12:24 +02:00
Brandon Yates 7f0a0ae034 fix: Add new debug sip kernel type for heapless
Related-to: NEO-7979

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-09-11 14:32:15 +02:00
Mateusz Jablonski da6a83faa2 feature: add support for state save area header v4
Related-To: NEO-8188
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-08-26 16:03:20 +02:00
Kamil Kopryk fc3646b58c test: correct expectations in shared ults if heapless enabled
Related-To: NEO-10641
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2024-08-26 09:51:19 +02:00
Mateusz Jablonski 06bc53fa9d fix: handle not recognized state save area header version
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-08-22 13:40:25 +02:00
Mateusz Jablonski 789a008470 fix: setup proper preemption surface size when forcing builtin SIP
when getting SIP kernel from IGC, setup related surface size based on IGC data

Related-To: NEO-8188
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-07-15 15:56:24 +02:00
Brandon Yates df5588a633 feature: Allocate fifo for debugger
Related-to: NEO-7980

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-07-11 11:11:41 +02:00
Brandon Yates ab92499b56 feature: Add support for V3 state save header
Related-to: NEO-8396

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-06-27 18:46:03 +02:00
Filip Hazubski 2f6eaf149a fix: Update SIP kernel initialization logic
Initialize SIP kernel when shared device is being initialized
instead of api-specific device.

Initialize debugger when shared device is being initialized
instead of during platform or driver initialization.

Add missing makeResident calls for SIP kernel in heapless paths.

Related-To: HSD-18038645398, HSD-18038819112

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2024-06-20 18:30:46 +02:00
Filip Hazubski 0d61860af6 fix: Reset builtins pointer after its resources are freed
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>
2024-06-20 10:49:56 +02:00
Mateusz Jablonski 3f45e40684 feature: add debug flag for forcing sip kernel class
Related-To: NEO-8188, NEO-10774
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-06-14 17:34:33 +02:00
Mateusz Hoppe cb7ac1ada0 feature: add debug key to generate sip header file
- header file can be used with LoadBinarySipFromFile

Related-To: GSD-8253

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2024-03-08 19:03:43 +01:00
Mateusz Hoppe 5e15543b14 test: improve unit tests - use virtual file system
- use virtualFileSystem in ULTs, writeDataToFile() does not create file
but instead saves filename. Call to fileExists() checks if file was
previously written

Related-To: NEO-7006

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2024-03-08 13:34:19 +01:00
Brandon Yates f56eeb0eb7 fix: Use debug SIP when debugging is enabled
Disable wMTP when debug is enabled

Related-to: NEO-10085

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-01-18 18:58:16 +01:00
Mateusz Jablonski 432142c574 refactor: correct naming of enum class constants 4/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-13 08:08:51 +01:00
Mateusz Jablonski beafea9b39 refactor: correct naming of enum class constants 2/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-11 13:13:35 +01:00
Mateusz Jablonski c9664e6bad refactor: rename global debug manager to debugManager
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-11-30 13:00:59 +01:00
Fabian Zwolinski 6fca8ee195 refactor: Remove SourceLevelDebugger
Removed:
- SourceLevelDebugger (with tests)
- DebuggerLibrary
- DebuggerLibraryRestore
- debuggerSupported field from hwInfo.capabilityTable
- HasSourceLevelDebuggerSupport matcher
- ExperimentalEnableSourceLevelDebugger debug var
- EnableMockSourceLevelDebugger debug var
- DebuggerOptDisable debug var
- lib_names.h.in file
- third_party/source_level_debugger/igfx_debug_interchange_types.h

Related-To: NEO-7213
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-08-10 11:14:02 +02:00
Mateusz Hoppe c43b827702 feature(debugger): allocate per-context SIP kernels with contextID
- optimize allocating SIP kernels for context - use cached binary
- parse SIP binary to find patch location
- patch SIP binary with Offline dump context id

Related-To: NEO-7630

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-08-09 16:22:20 +02:00
Mateusz Hoppe 997b599168 fix(debugger): pass correct sipAllocation to makeResident
- sipAllocation for context must be resident in Offline mode

Related-To: NEO-7630

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-07-28 20:51:12 +02:00
Fabian Zwolinski 91019afa4b Fix perContextSipKernels map in BuiltIns
Previously std::once_flag was assigned per map:
std::unordered_map<ContextId, std::unique_ptr<SipKernel>> which was
incorrect and caused the situation in which SipKernel is allocated only
on 1 context and was skipped for other contexts, so we ended up with
only one allocation regardless of the number of contexts.

This change assigns std::once_flag for each allocated SipKernel.

Related-To: NEO-7630
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-04-11 17:24:57 +02:00
Fabian Zwolinski c0603e0854 Allocate SipKernel per ctx for Offline dbg mode
- Add debuggingEnabledMode getter in ExecutionEnvironment
- Add new overloaded function - BuiltIns::getSipKernel
- Add perContextSipKernels map to BuiltIns
- Add OsContext to PreemptionHelper::programStateSip arguments
- Add new overloaded function - SipKernel::getBindlessDebugSipKernel

Related-To: NEO-7630
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-03-30 16:40:41 +02:00
Yates, Brandon 7903617a44 fix(l0debug): Fix state save area size on some hw configs
regHeader.num_slices coming from system routine header is
incorrect on some hw configs. This fixes the value in neo
before using to size the state save area allocation

Related-to: LOCI-3937

Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
2023-03-02 18:35:32 +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
Warchulski, Jaroslaw 8de3898abc Cleanup includes 31
Cleaned up files:
shared/source/command_stream/experimental_command_buffer.h
shared/source/helpers/get_info.h
shared/source/helpers/local_id_gen.h
shared/source/memory_manager/gfx_partition.h
shared/source/memory_manager/host_ptr_manager.h
shared/source/memory_manager/prefetch_manager.h
shared/test/common/mocks/mock_memory_manager.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-16 11:45:55 +01:00
Kamil Kopryk 6665f49593 Refactor: don't use global GfxCoreHelper getter in shared files 2/n
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-30 11:35:04 +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 c10aa90815 Cleanup includes 11
Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2022-12-06 12:25:30 +01:00
Mateusz Jablonski ac426f7fdc ULT: move sip tests to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-11-07 14:04:10 +01:00
Mateusz Jablonski 6a46e8f0ca Correct method names in device and module fixtures
correct naming in derived classes

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-08-12 10:40:56 +02:00
Mateusz Jablonski e6fc458d4b Add a struct for test fixtures with correct method naming convention
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-08-11 12:55:52 +02:00
Jitendra Sharma f52f3df274 Add platform specific getter of debug surface size
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>
2022-03-22 12:18:40 +01:00
Mateusz Jablonski 527806b3ed Use full path to include test.h 2/n
fix files in shared

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-12-15 13:09:50 +01:00
Mateusz Hoppe 4d6a2d0a57 Enhance logs in EuThread
- do not overwrite memoryHandle in resumeThread() when thread is
not stopped
- add SIP Commands

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-11-03 11:04:14 +01:00
Mateusz Hoppe 2fb8edb69f Refactor SipKernel
- add debug bindless SipKernelType

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-10-19 11:45:24 +02:00
Igor Venevtsev 4286b3a55c Reserve precise amount of memory for debug surface
Resolves: LOCI-2209

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2021-10-15 12:19:51 +02:00
Artur Harasimiuk 9bea74a780 move mock_memory_manager to shared
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2021-10-05 16:22:38 +02:00
Mateusz Hoppe 754fcae321 Add reading sip header from file
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-09-23 09:54:55 +02:00
Kamil Kopryk a203cd2863 Add sip kernel as hexadecimal array header
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-5777
2021-09-03 17:16:58 +02:00
Piotr Obst acf3e58a64 Move wddm_fixture.h and releted files from opencl to shared
Related-To: NEO-5894
Signed-off-by: Piotr Obst <piotr.obst@intel.com>
2021-07-07 12:30:12 +02:00