From 7e1e0f5c9e9a18a421d0b3369a6d0359ac23998f Mon Sep 17 00:00:00 2001 From: Tianlei Wu Date: Wed, 31 Aug 2022 13:53:01 -0700 Subject: [PATCH] fix build error for generation debug code (#12801) fix dumping code --- .../contrib_ops/cpu/transformers/generation_device_helper.cc | 4 ++-- .../contrib_ops/cuda/transformers/generation_device_helper.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/onnxruntime/contrib_ops/cpu/transformers/generation_device_helper.cc b/onnxruntime/contrib_ops/cpu/transformers/generation_device_helper.cc index e0e7e4cc39..aaa3097932 100644 --- a/onnxruntime/contrib_ops/cpu/transformers/generation_device_helper.cc +++ b/onnxruntime/contrib_ops/cpu/transformers/generation_device_helper.cc @@ -468,8 +468,8 @@ Status GreedySearchProcessLogits( topk_indices)); #ifdef DEBUG_GENERATION - dumper->Print("topk_scores", *(topk_scores.get())); - dumper->Print("topk_indices", *(topk_indices.get())); + dumper->Print("topk_scores", topk_scores); + dumper->Print("topk_indices", topk_indices); #endif gsl::span next_token_indices = topk_indices.DataAsSpan(); diff --git a/onnxruntime/contrib_ops/cuda/transformers/generation_device_helper.cc b/onnxruntime/contrib_ops/cuda/transformers/generation_device_helper.cc index d0875dbab7..3679875a8a 100644 --- a/onnxruntime/contrib_ops/cuda/transformers/generation_device_helper.cc +++ b/onnxruntime/contrib_ops/cuda/transformers/generation_device_helper.cc @@ -520,8 +520,8 @@ Status GreedySearchProcessLogits( *topk_scores, *topk_indices)); #ifdef DEBUG_GENERATION - dumper->Print("topk_scores", topk_scores); - dumper->Print("topk_indices", topk_indices); + dumper->Print("topk_scores", *(topk_scores.get())); + dumper->Print("topk_indices", *(topk_indices.get())); #endif const int64_t* next_token_indices = topk_indices->Data();