- memory optimization of `add(tensor, matrix)`