We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c805a71 + a2a053d commit 3e762e0Copy full SHA for 3e762e0
source/ur/ur.cpp
@@ -14,10 +14,12 @@
14
15
// Controls tracing UR calls from within the UR itself.
16
bool PrintTrace = [] {
17
+ const char *UrRet = std::getenv("SYCL_UR_TRACE");
18
const char *PiRet = std::getenv("SYCL_PI_TRACE");
- const char *Trace = PiRet ? PiRet : nullptr;
19
+ const char *Trace = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
20
const int TraceValue = Trace ? std::stoi(Trace) : 0;
- if (TraceValue == -1 || TraceValue == 2) { // Means print all traces
21
+ if ((PiRet && (TraceValue == -1 || TraceValue == 2)) ||
22
+ (UrRet && TraceValue != 0)) {
23
return true;
24
}
25
return false;
0 commit comments