diff --git a/src/gopt/impl/tensor_reformat.cpp b/src/gopt/impl/tensor_reformat.cpp index b6eefc157027bbb5b9d642b3eddea91df7ede7ca..ec8ad015c1cc2b9a3c3579c3cbbfb65caf448b4c 100644 --- a/src/gopt/impl/tensor_reformat.cpp +++ b/src/gopt/impl/tensor_reformat.cpp @@ -2924,6 +2924,9 @@ void ShuffleShuffleRemovePass::Impl::do_replace() { #endif auto new_var = rewriter.get_var(inp_var); if (inp_format != out_format) { + mgb_assert(m_reformat.find(std::make_pair( + inp_format, out_format)) != m_reformat.end(), + "Unsupported shuffle shuffle remove pass"); new_var = m_reformat[std::make_pair(inp_format, out_format)]( new_var); }