import torch
import torch.nn as nn
import torch.nn.functional as F

class Model(nn.Module):
    def __init__(self, dim=-1):
        super().__init__()
        self.dim = dim

    def forward(self, x: torch.Tensor) -> torch.Tensor:
 
        size = x.size() 
        x_shifted = F.pad(x.unsqueeze(0), (1, 0), value=0.0).squeeze(0)
        

        return x - x_shifted[..., :-1]

num_elements = 100 * 1024 * 1024
shape = (num_elements, )

def get_inputs():
    x = torch.randn(shape, dtype=torch.float32)
    return [x]

def get_init_inputs():
    return [-1]