Skip to content

Instantly share code, notes, and snippets.

@AmosLewis
Created January 17, 2023 18:55
Show Gist options
  • Save AmosLewis/cda8f6d91ba51420eb9d529d635b201b to your computer and use it in GitHub Desktop.
Save AmosLewis/cda8f6d91ba51420eb9d529d635b201b to your computer and use it in GitHub Desktop.
func.func @torch.aten.view(%arg0: !torch.vtensor<[1,128],si64>) -> !torch.vtensor<[1,128],si64> {
%int-1 = torch.constant.int -1
%int128 = torch.constant.int 128
%0 = torch.prim.ListConstruct %int-1, %int128 : (!torch.int, !torch.int) -> !torch.list<int>
%1 = torch.aten.view %arg0, %0 : !torch.vtensor<[1,128],si64>, !torch.list<int> -> !torch.vtensor<[1,128],si64>
return %1 : !torch.vtensor<[1,128],si64>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment