CMul should resize the gradInput into the same shape as input.
do not use pushudata on a tensor that is retrieved with checkudata.
make the dimension index int.