When calling permute*, someone has to make a copy of strides/shapes/view of given tensors, because shuffling orders also modify the given tensor. This pull request fixed the problem and accordingly deleted the re-compiling of the gradient adder.
I've confirmed all tests passed without SegFault, and a simple three-layer MLP model is now working well.
When calling
permute*
, someone has to make a copy of strides/shapes/view of given tensors, because shuffling orders also modify the given tensor. This pull request fixed the problem and accordingly deleted the re-compiling of the gradient adder.I've confirmed all tests passed without SegFault, and a simple three-layer MLP model is now working well.