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.
29
29
MDAPI event-based sampling has been supported for some time and is the most robust
30
30
mechanism to collect MDAPI performance metrics, however it has some limitations:
31
31
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.
34
33
* MDAPI event-based sampling is unlikely to be supported on OSX.
35
34
* The API to create an OpenCL command queue that supports MDAPI event-based
36
35
sampling 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
88
87
where ` <CPU NAME> ` is a short name of your CPU generation. For example, on Kaby
89
88
Lake machines ` <CPU NAME> ` is ` KBL ` . You can also add path to ` libigdmd.dylib `
90
89
library 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
92
91
because 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
94
93
by setting ` /proc/sys/dev/i915/perf_stream_paranoid ` to ` 0 ` :
95
94
96
95
```sh
Original file line number Diff line number Diff line change @@ -139,7 +139,13 @@ MDHelper* MDHelper::CreateEBS(
139
139
const std::string& metricsFileName,
140
140
const bool includeMaxValues )
141
141
{
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
142
147
MDHelper* pMDHelper = new MDHelper (API_TYPE_OCL);
148
+ #endif
143
149
if ( pMDHelper )
144
150
{
145
151
if ( pMDHelper->InitMetricsDiscovery (
You can’t perform that action at this time.
0 commit comments