  Product between mode-$n$ unfolding $\bY_{(n)}$ of an $N$-D tensor $\tY$ and
Khatri-Rao products of $(N-1)$ factor matrices $\bA^{(m)}$, $m = 1,..., n-1,
n+1, ..., N$ exists in algorithms for CANDECOMP/PARAFAC (CP). If $\tY$ is an
error tensor of a tensor approximation, this product is the gradient of a cost
function with respect to factors, and has the largest workload in most CP
algorithms. In this paper, a fast method to compute this product is proposed.
Experimental verification shows that the fast CP gradient can accelerate the
CP_ALS algorithm 2 times and 8 times faster for factorizations of 3-D and 4-D
tensors, and the speed-up ratios can be 20-30 times for higher dimensional
tensors.
