diff --git a/lite/model_parser/flatbuffers/program_desc.h b/lite/model_parser/flatbuffers/program_desc.h index afe7611599ac9eb2530866b0015d816e67ca878a..0535b7f5272046d30f9ef3f30ad0ec14b661ea34 100644 --- a/lite/model_parser/flatbuffers/program_desc.h +++ b/lite/model_parser/flatbuffers/program_desc.h @@ -79,6 +79,13 @@ class ProgramDescView : public ProgramDescAPI { return desc_->version()->version(); } + void ClearBlocks() override { + CHECK_EQ(BlocksSize(), 0u) << "For backward compatibility, in the " + "read-only flatbuffers version, this " + "interface degenerates to force the number " + "of blocks to be zero."; + } + proto::ProgramDesc const* raw_desc() const { return desc_; } const std::vector& buf() const { return buf_; }