Open yinqiwen opened 6 months ago
Use .contiguous()
to get a contgiuous tensor. In rust, the clone
method is a bit special as its a very common trait from the standard library that is supposed to be cheap so the current implementation is just bumping a ref count rather than doing a full copy.
while pytoch's clone return contiguous tensor
candle
pytorch