Skip to content

Commit

Permalink
more debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
jslhcl committed Feb 22, 2023
1 parent c414d7e commit 7749f31
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions onnxruntime/core/framework/sequential_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,10 @@ onnxruntime::Status ExecuteKernel(StreamExecutionContext& ctx,
if (fstream.is_open()) {
std::cout << "execute node:" << idx << "\n Inputs (len:" << kernel_ctx.InputCount() << ") :\n";
for (int i = 0; i < kernel_ctx.InputCount(); i++) {
std::string name = p_kernel->Node().InputDefs()[i]->Name();
int global_index = 0;
ORT_THROW_IF_ERROR(ctx.GetSessionState().GetOrtValueNameIdxMap().GetIdx(name, global_index));
std::cout << i << " Name:" << name << " gIdx:" << global_index << " alloc:" << ctx.GetSessionState().GetExecutionPlan()->allocation_plan[global_index].alloc_kind << "\n";
const OrtValue* v = kernel_ctx.GetInputMLValue(i);
if (v->IsTensor()) {
const Tensor& t = v->Get<Tensor>();
Expand Down

0 comments on commit 7749f31

Please sign in to comment.