Skip to content

Commit

Permalink
minor fix from CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghuanrong committed Oct 4, 2023
1 parent bc173b5 commit e1a6107
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1095,8 +1095,7 @@ Status UpdateDecoderCrossQK(
[[maybe_unused]] float* cross_qk_buffer_data,
[[maybe_unused]] int max_length,
[[maybe_unused]] AllocatorPtr allocator) {
throw std::runtime_error("CPU beam search current not support output cross QK.");
return Status::OK();
return ORT_MAKE_STATUS(ONNXRUNTIME, FAIL, "CPU beam search current not support output cross QK.");
}

Status FinalizeDecoderCrossQK(
Expand All @@ -1114,8 +1113,7 @@ Status FinalizeDecoderCrossQK(
[[maybe_unused]] int num_return_sequences,
[[maybe_unused]] const int* cache_indir_data,
[[maybe_unused]] gsl::span<const int32_t> beam_indices) {
throw std::runtime_error("CPU beam search current not support output cross QK.");
return Status::OK();
return ORT_MAKE_STATUS(ONNXRUNTIME, FAIL, "CPU beam search current not support output cross QK.");
}

} // namespace GenerationCpuDeviceHelper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
import os

import onnx
from onnx import TensorProto, helper
from transformers import WhisperConfig

from benchmark_helper import Precision
from convert_generation import (
get_shared_initializers,
update_decoder_subgraph_output_cross_attention,
update_decoder_subgraph_share_buffer_and_use_decoder_masked_mha,
)
from onnx import TensorProto, helper
from transformers import WhisperConfig

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit e1a6107

Please sign in to comment.