Solved by albanD in post #2 
              
              
                Hi, 
First of all, calling .contiguous() on the input will make sure you have a contiguous tensor and won’t be noticeable for most workload. I would recommand this solution as it is much simpler and may actually be faster than the non-contiguous counterpart. 
To support non-contiguous tensor, you wo…