added CF case for gemm and pairwise