You lose precision in matmul and could get different results even if you run your operations in the exact same order, here’s an explanation  – https://www.nag.com/content/wandering-precision 5
You could use the following routine to find largest error of a matmul (see this thread 1 for derivation)
def float32_matmul_error(a, b):
    a = a.type(torch.float64)
    b = b.type(torch.float64)
    n = max(a.shape+b.shape)
    u = np.finfo(np.dtype('float32')).eps
    gamma=(n*u)/(1-n*u)
    error=torch.norm(a.flatten())*torch.norm(b.flatten())*gamma
    return error