Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/core/src/pass/sdpa_to_paged_attention.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ static std::shared_ptr<v0::Parameter> setName(std::shared_ptr<v0::Parameter> nod
bool ov::pass::SDPAToPagedAttention::run_on_model(const std::shared_ptr<ov::Model>& model) {
RUN_ON_MODEL_SCOPE(SDPAToPagedAttention);

OPENVINO_ASSERT(!model->get_variables().empty(),
"Model is supposed to be stateful, cannot perform "
"the SDPAToPagedAttention transformation. "
"For proper conversion run: optimum-cli export openvino --task text-generation-with-past instead "
"of --task text-generation");

OPENVINO_ASSERT(ov::op::util::has_op_with_type<ov::op::v13::ScaledDotProductAttention>(model),
"No ScaledDotProductAttention operation observed in the graph, cannot perform "
"the SDPAToPagedAttention transformation.");
Expand Down
Loading