Skip to content

Commit 9b06f75

Browse files
committed
Reapply 9cffabc
This reverts commit 735f117.
1 parent b4abbf1 commit 9b06f75

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

llvm/lib/Analysis/InteractiveModelRunner.cpp

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,10 @@
1818

1919
using namespace llvm;
2020

21-
#define _IMR_CL_VALS(T, N) clEnumValN(TensorType::N, #T, #T),
22-
23-
static cl::opt<TensorType> DebugReply(
24-
"interactive-model-runner-echo-type", cl::init(TensorType::Invalid),
25-
cl::Hidden,
21+
static cl::opt<bool> DebugReply(
22+
"interactive-model-runner-echo-reply", cl::init(false), cl::Hidden,
2623
cl::desc("The InteractiveModelRunner will echo back to stderr "
27-
"the data received "
28-
"from the host as the specified type (for debugging purposes)."),
29-
cl::values(SUPPORTED_TENSOR_TYPES(_IMR_CL_VALS)
30-
clEnumValN(TensorType::Invalid, "disable", "Don't echo")));
31-
32-
#undef _IMR_CL_VALS
24+
"the data received from the host (for debugging purposes)."));
3325

3426
InteractiveModelRunner::InteractiveModelRunner(
3527
LLVMContext &Ctx, const std::vector<TensorSpec> &Inputs,
@@ -83,7 +75,8 @@ void *InteractiveModelRunner::evaluateUntyped() {
8375
}
8476
InsPoint += *ReadOrErr;
8577
}
86-
if (DebugReply != TensorType::Invalid)
87-
dbgs() << tensorValueToString(OutputBuffer.data(), OutputSpec);
78+
if (DebugReply)
79+
dbgs() << OutputSpec.name() << ": "
80+
<< tensorValueToString(OutputBuffer.data(), OutputSpec) << "\n";
8881
return OutputBuffer.data();
8982
}

0 commit comments

Comments
 (0)