File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ MDAPI performance counters for each event.
2929MDAPI event-based sampling has been supported for some time and is the most robust
3030mechanism to collect MDAPI performance metrics, however it has some limitations:
3131
32- * MDAPI event-based sampling is currently only available on Windows.
33- * MDAPI event-based sampling on Linux is tracked here: [ intel/compute-runtime #182 ] ( https://github.com/intel/compute-runtime/issues/182 ) .
32+ * MDAPI event-based sampling is only available on Windows and newer Linux drivers.
3433* MDAPI event-based sampling is unlikely to be supported on OSX.
3534* The API to create an OpenCL command queue that supports MDAPI event-based
3635sampling currently does not support newer OpenCL command queue properties such
@@ -88,9 +87,9 @@ it usually resides under `/System/Library/Extensions/AppleIntel<CPU NAME>Graphic
8887where ` <CPU NAME> ` is a short name of your CPU generation. For example, on Kaby
8988Lake machines ` <CPU NAME> ` is ` KBL ` . You can also add path to ` libigdmd.dylib `
9089library to ` DYLD_LIBRARY_PATH ` environment library, so that it can be found system-wide.
91- * MDAPI time-based sampling currently requires elevated privileges
90+ * Collecting MDAPI metrics currently requires elevated privileges
9291because metrics are collected system-wide.
93- * On Linux, MDAPI time-based sampling may be enabled for non-root users
92+ * On Linux, MDAPI metrics may be enabled for non-root users
9493by setting ` /proc/sys/dev/i915/perf_stream_paranoid ` to ` 0 ` :
9594
9695 ```sh
Original file line number Diff line number Diff line change @@ -139,7 +139,13 @@ MDHelper* MDHelper::CreateEBS(
139139 const std::string& metricsFileName,
140140 const bool includeMaxValues )
141141{
142+ #if defined(__linux__)
143+ // This is a temporary workaround until the Linux MDAPI is updated
144+ // to expose metrics for OpenCL.
145+ MDHelper* pMDHelper = new MDHelper (API_TYPE_OCL|API_TYPE_OGL4_X);
146+ #else
142147 MDHelper* pMDHelper = new MDHelper (API_TYPE_OCL);
148+ #endif
143149 if ( pMDHelper )
144150 {
145151 if ( pMDHelper->InitMetricsDiscovery (
You can’t perform that action at this time.
0 commit comments