mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Revert "Metric Detect Paranoid mode and fail gracefully"
This reverts commit a720282358dff08fb36b95eaf9bf184efa315f48. This revert is to avoid suggesting to disable paranoid mode. This revert also avoids L0 metrics mandating paranoid mode setting. Related-To: LOCI-2822 Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9a39cad07d
commit
e1ef9ac79a
@@ -8,7 +8,6 @@
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/sys_calls.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/utilities/io_functions.h"
|
||||
|
||||
#include "level_zero/tools/source/metrics/metric_enumeration_imp.h"
|
||||
|
||||
@@ -77,29 +76,4 @@ MetricsDiscovery::IAdapter_1_9 *MetricEnumeration::getMetricsAdapter() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool MetricEnumeration::isReportTriggerAvailable() {
|
||||
|
||||
const char *perfStreamParanoidFile = "/proc/sys/dev/i915/perf_stream_paranoid";
|
||||
bool reportTriggerAvailable = false;
|
||||
|
||||
FILE *fileDescriptor = NEO::IoFunctions::fopenPtr(perfStreamParanoidFile, "rb");
|
||||
if (fileDescriptor != nullptr) {
|
||||
char paranoidVal[2] = {0};
|
||||
size_t bytesRead = NEO::IoFunctions::freadPtr(¶noidVal[0], 1, 1, fileDescriptor);
|
||||
NEO::IoFunctions::fclosePtr(fileDescriptor);
|
||||
|
||||
if (bytesRead == 1) {
|
||||
reportTriggerAvailable = strncmp(paranoidVal, "0", 1) == 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!reportTriggerAvailable) {
|
||||
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "%s",
|
||||
"INFO: Metrics Collection requires i915 paranoid mode to be disabled\n"
|
||||
"INFO: set /proc/sys/dev/i915/perf_stream_paranoid to 0\n");
|
||||
}
|
||||
|
||||
return reportTriggerAvailable;
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user