diff --git a/k2/csrc/intersect_dense_pruned.cu b/k2/csrc/intersect_dense_pruned.cu index e612921ac..8a0fe400d 100644 --- a/k2/csrc/intersect_dense_pruned.cu +++ b/k2/csrc/intersect_dense_pruned.cu @@ -381,6 +381,11 @@ class MultiGraphDenseIntersectPruned { ArcInfo old_ai = arcs_data[old_idx012]; // Only 1 state (the final state) in next frame, so idx1 is always 0. old_ai.u.dest_info_state_idx1 = 0; + // The final arcs we are adding for online decoding partial should not + // map to any real arc in a_fsas. + // We add these final arcs for the purpose of making the partial lattice + // a valid Fsa. + old_ai.a_fsas_arc_idx012 = -1; new_arcs_data[new_idx012] = old_ai; });