diff --git a/cpp/src/io/fst/logical_stack.cuh b/cpp/src/io/fst/logical_stack.cuh index 3b1ff7dc26f..98641f2c893 100644 --- a/cpp/src/io/fst/logical_stack.cuh +++ b/cpp/src/io/fst/logical_stack.cuh @@ -514,7 +514,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, } // Check if the last element of d_kv_operations is 0. If not, then we have a problem. - if (num_symbols_in) { + if (num_symbols_in && !supports_reset_op) { StackOpT last_symbol = d_kv_ops_current.element(num_symbols_in - 1, stream); CUDF_EXPECTS(last_symbol.stack_level == 0, "The logical stack is not empty!"); }