Commit Graph

55 Commits

Author SHA1 Message Date
Michal Mrozek
05e2a974c8 refactor: remove redundant code
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2025-11-06 16:08:38 +01:00
Alicja Lukaszewicz
dd252e7852 feature: improve logic to check for P2P access
Related-To: NEO-15711

Signed-off-by: Alicja Lukaszewicz <alicja.lukaszewicz@intel.com>
2025-10-15 10:45:22 +02:00
Naklicki, Mateusz
9b762f46e1 refactor: cleanup header includes in level_zero/tools 2/2
Related-To: NEO-15383
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2025-10-10 12:26:07 +02:00
Naklicki, Mateusz
0c619299d0 refactor: cleanup header includes in level_zero
Related-To: NEO-15383
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2025-10-07 19:58:31 +02:00
Mateusz Jablonski
bd598e0d88 refactor: remove not needed code
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2025-08-28 14:39:59 +02:00
Alicja Lukaszewicz
bca503548a feature: add peer access check on driver init
Related-To: NEO-14885, HSD-14024947073

Signed-off-by: Alicja Lukaszewicz <alicja.lukaszewicz@intel.com>
2025-08-27 15:48:22 +02:00
Kindracki, Jakub Tomasz
a73d5724e3 feature: Return insufficient permissions when driver device cannot be loaded
Return ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS when user doesn't have
permissions to access the GPU driver device file.

Related-To: NEO-8682
Signed-off-by: Kindracki, Jakub Tomasz <jakub.tomasz.kindracki@intel.com>
2025-07-28 16:31:07 +02:00
Mateusz Hoppe
703497b067 fix: read ONEAPI_PVC_SEND_WAR_WA env
- disable optimization with compiler internal option when env is set to
zero

Related-To: NEO-15378, GSD-10884

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2025-07-09 16:22:18 +02:00
Mateusz Jablonski
2394f9fd91 feature: update base layout of L0 handles to match ze_handle_t layout
this layout is required by L0 DDI Handle extension

Related-To: NEO-13121, NEO-13917
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2025-03-28 14:40:20 +01:00
Compute-Runtime-Validation
9785e5c11e Revert "feature: update base layout of L0 handles to match ze_handle_t layout"
This reverts commit 276c606329.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2025-02-26 02:37:14 +01:00
Mateusz Jablonski
276c606329 feature: update base layout of L0 handles to match ze_handle_t layout
this layout is required by L0 DDI Handle extension

Related-To: NEO-13121, NEO-13917
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2025-02-25 01:23:43 +01:00
Mateusz Jablonski
87f4cd8e83 feature: expose separate L0 driver handle per product family in Core/Tools path
Related-To: NEO-14062
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2025-02-17 18:54:07 +01:00
Mateusz Jablonski
7c4708be08 refactor: store global L0 driver handle in vector
Related-To: NEO-14062
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2025-02-13 23:24:57 +01:00
Jaroslaw Warchulski
6a7bee67e9 refactor: unify device hierarchy mode
Related-To: GSD-9560
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
2025-01-14 21:08:44 +01:00
Jack Myers
127af1a715 fix: correct result variable scope in initDriver
The `initDriver` function had an issue where a new `result` variable was defined
in a lower scope, causing the initialization result to be discarded. This commit
removes the redundant variable declaration, ensuring that the `result` variable
initialized in the upper scope is correctly set by the
`Driver::get()->initialize` method and properly reflects the driver
initialization status.

Related-To: NEO-13686
Signed-off-by: Jack Myers <jack.myers@intel.com>
2025-01-14 12:43:35 +01:00
Neil R. Spruit
84cd8226e3 feature: Support for zeInitDrivers
- Enabled support for zeInitDrivers which combines init and driver get
support.
- Moved driverHandleGet to be part of Driver class to allow for unit
testing of the functionality.
- Updated GTPIN init conditions such that init only occurs when pCount >
0 and the driver handle pointer is not null. This ensures that the
gtPin init does not trigger during the loader init calling
zeInitDrivers and only is called before the first handle is retrieved.
- Removed ze_init_flags_t flag from all driverInit functions since this
flag is unused in all functions.

Related-To: NEO-12905

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
2024-11-07 12:16:15 +01:00
Mateusz Jablonski
c0cec096a5 fix: don't return gtpin init error from L0 API call
gtpin should be transparent for application

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-09-02 17:41:08 +02:00
Mateusz Jablonski
b7cedb99a4 fix: move gtpin initialization to first zeDriverGet call
Currently gtpin is intialized during zeInit call. However, it is not
correct as gtpin is calling other L0 API functions, like zeDriverGet
which should not be called until zeInit function finishes.

With this commit gtpin initialization is performed during first
zeDriverGet function call. In case of initialization failure
ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE will be returned every
zeDriverGet call.

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-08-27 15:09:04 +02:00
Mateusz Hoppe
8a7923c6ee fix: allow fork() after zeInit()
- 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>
2024-07-23 15:31:50 +02:00
Artur Harasimiuk
b8e212d728 refactor: make spdlog optional
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2024-06-07 14:14:12 +02:00
Kulkarni, Ashwin Kumar
fbb8fa7dea feature: supports git SHA logging to log file
Related-To: NEO-11364

Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
2024-05-20 22:23:17 +02:00
Kulkarni, Ashwin Kumar
8c1f0836ae feature: enables basic framework for spdlogs
Related-To: NEO-10510

Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
2024-04-23 07:23:46 +02: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
Mateusz Jablonski
36194c4e7d refactor: correct variable namings
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-11-29 23:49:03 +01:00
Mateusz Jablonski
78b01e25d3 fix: correct number of returned L0 drivers
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-11-15 10:14:11 +01:00
Compute-Runtime-Validation
ec24eb0a4c Revert "fix: correct number of returned L0 drivers"
This reverts commit dcb351e9dd.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-11-04 02:24:26 +01:00
Mateusz Jablonski
dcb351e9dd fix: correct number of returned L0 drivers
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-11-03 13:53:25 +01:00
Filip Hazubski
08e92d154f fix: Add getDefaultDeviceHierarchy call to GfxCoreHelper
Added getDefaultDeviceHierarchy call that describes default device
hierarchy for a gfx core. Refactored L0 and OCL paths to use this
value by default and override this value when user sets
ZE_FLAT_DEVICE_HIERARCHY environment variable or
ReturnSubDevicesAsApiDevices debug key.

Updated ReturnSubDevicesAsApiDevices to force COMPOSITE device hierarchy
when set to 0.

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2023-10-06 12:32:41 +02:00
Kacper Nowak
1afaf37f78 refactor: Unify GTPin initialization logic between APIs
Add support for new GTPin loading logic in OCL path, similar to existing
in L0 - invoking exposed, dedicated API call (OpenGTPinOCL).
- Move logic to shared, including unit tests
- Check whether instrumentation is required on
  context creation and if yes,
  make a call to OpenGTPinOCL function.
  Handle potential errors gracefully without exiting.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-08-09 17:15:24 +02:00
Compute-Runtime-Validation
65df34bbc7 Revert "refactor: Unify GTPin initialization logic between APIs"
This reverts commit 68a5108e05.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-08-07 04:31:52 +02:00
Kacper Nowak
68a5108e05 refactor: Unify GTPin initialization logic between APIs
Add support for new GTPin loading logic in OCL path, similar to existing
in L0 - invoking exposed, dedicated API call (OpenGTPinOCL).
- Move logic to shared, including unit tests
- Check whether instrumentation is required on
  clGetPlatformIDs API call, and if yes,
  make a call to OpenGTPinOCL function.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-08-05 18:22:08 +02:00
Neil R Spruit
8efd8853fb feature: L0 Device Hierarchy support for Composite & Flat modes
Related-To: LOCI-4615

- Added Support for users to set ZE_FLAT_DEVICE_HIERARCHY to either FLAT
or COMPOSITE to change how devices are returned in zeDeviceGet and
clGetDeviceIDs.
- COMPOSITE is default behavior that exists today.
- FLAT returns all sub devices which have no sub devices and all root
devices that have no sub devices in zeDeviceGet ie with all devices
flattened out in order.
- Added zeDeviceGetRootDevice for one to retrieve the Root Device for
any SubDevice.

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2023-07-20 01:00:54 +02:00
Neil R Spruit
a5ca2f44fe fix: check L0 driver init success before setting teardown in L0 Loader
Related-To: LOCI-4499

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2023-06-07 08:19:21 +02:00
Fabian Zwolinski
65c73a690f Introduce Online, Offline, Disabled DebuggingModes
This change allows to set DebuggingMode via
ZET_ENABLE_PROGRAM_DEBUGGING env var
0: Disabled
1: Online
2: Offline

Related-To: NEO-7630
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-03-17 09:31:17 +01:00
Mateusz Hoppe
e62c5e25d5 refactor: change debugging enabled to debugging mode
Related-To: NEO-7630

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-03-15 13:41:41 +01:00
Fabian Zwolinski
6c59953072 Add FP64 emulation support for ATS-M
This patch adds FP64 emulation support for ATS-M.
Introducing new environment variable - NEO_FP64_EMULATION - which provides
an option to allow the opt-in emulation of FP64.
When emulation is enabled, we pass -cl-fp64-gen-emu (ocl) /
-ze-fp64-gen-emu (L0) as an internal option to IGC.

Related-To: NEO-7611
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2023-03-07 14:21:01 +01:00
Lukasz Jobczyk
2abbd82195 Flush task at device init
Resolves: NEO-7642

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-01-30 10:41:42 +01:00
Mateusz Hoppe
7850d06c09 feature: Disable LevelZero debugging when experimental OpenCL enabled
- both drivers: OpenCL and LevelZero cannot be debugged within single
process

Related-To: NEO-7025

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-01-16 12:13:37 +01:00
Joshua Santosh Ranjan
f1c50a8c89 Metric Refactor Metric Context
Rename Metric Context and move OA specific functions
and members from Metric Context to OA specific class(MetricSource).
This refactoring is done so that additional Metric Source
like Stall Sampling could be Seamlessly implemented.

Related-To: LOCI-2753


Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
2022-02-03 21:34:14 +01:00
Brandon Yates
1980edd05b Add ze_init_flag_t check to zeInit()
Return an error and don't init if flag is non-zero and GPU_ONLY flag is not set

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2021-08-05 00:31:22 +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
Spruit, Neil R
7a3095c273 Report failure given Compiler Library Load failed for L0
- Return ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE given the Compiler
  cannot be loaded.
- Print dlopen and LoadLibrary error strings given Debug Print Messages
  are enabled.

Related-To: LOCI-1313

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2021-04-01 23:01:38 +02:00
Jaime Arteaga
47bdcce4c6 Add ULTs for missing branches in driverHandleGet()
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-03-22 20:31:42 +01:00
Zbigniew Zdanowicz
779253c49c Add new flag to USM memory manager
Related-To: NEO-5498

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-03-10 11:47:34 +01:00
Jitendra Sharma
7c70a14bc4 Implement ZE_ENABLE_PCI_ID_DEVICE_ORDER environment variable
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-12-23 12:08:43 +01:00
Mateusz Hoppe
8aacad1854 Create DebuggerL0 only when debugging is supported
Related-To: NEO-5239

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-11-23 18:28:45 +01:00
Matias A. Cabral
237e2fe61f Cleanup Sysman initialization
Change-Id: Idc1e13e1b1fd3928674d5f199665054dbab27a9b
Signed-off-by: Matias A. Cabral <matias.a.cabral@intel.com>
2020-08-06 06:28:21 +02:00
Jaime Arteaga
fa8e39fe16 Correct new metrics env vars names
Change-Id: Id496a57076d82aad17c7fe5c757c9910a8ab2c76
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-08-05 18:44:55 +02:00
Jaime Arteaga
902fc2f6c4 level-zero v1.0 (2/N)
Change-Id: I1419231a721fab210e166d26a264cae04d661dcd
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: macabral <matias.a.cabral@intel.com>
Signed-off-by: davidoli <david.olien@intel.com>
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@intel.com>
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
Signed-off-by: Latif, Raiyan <raiyan.latif@intel.com>
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2020-08-03 13:11:13 +02:00
davidoli
b4577ade07 Move Pin init from zetInit to zeInit
Change-Id: Iea704cda26916315343e3cef6840954ba3d62c06
Signed-off-by: davidoli <david.olien@intel.com>
2020-07-31 00:49:33 +02:00