First, if transition matrices are stored as dense matrices, then the forward algorithm becomes identical to forward propagation through a rudimentary recurrent neural network.
a neural network toolkit could be used to carry out this computation on a GPU.