Skip to content

Instantly share code, notes, and snippets.

@AmosLewis
Last active January 3, 2023 01:28
Show Gist options
  • Save AmosLewis/2fad94e31c790efd3e0f16b1d3c90d81 to your computer and use it in GitHub Desktop.
Save AmosLewis/2fad94e31c790efd3e0f16b1d3c90d81 to your computer and use it in GitHub Desktop.
func.func @torch.aten.as_strided(%arg0: !torch.vtensor<[1,128,2304],f32>) -> !torch.vtensor<[1,128,768],f32> {
%int0 = torch.constant.int 0
%int1 = torch.constant.int 1
%int128 = torch.constant.int 128
%int768 = torch.constant.int 768
%int2304 = torch.constant.int 2304
%240 = torch.prim.ListConstruct %int1, %int128, %int768 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>
%241 = torch.prim.ListConstruct %int294912, %int2304, %int1 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>
%242 = torch.aten.as_strided %arg0, %240, %241, %int0 : !torch.vtensor<[1,128,2304],f32>, !torch.list<int>, !torch.list<int>, !torch.int -> !torch.vtensor<[1,128,768],f32>
return %242 : !torch.vtensor<[1,128,768],f32>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment