You are right, removed the `memory` variable here. My implementation here is somehow simplified here, and contiguous memory is left from some other implementation variants that creates multiple smaller tensors. Thanks!