Skip to content

Instantly share code, notes, and snippets.

@AmosLewis
Created January 20, 2023 06:21
Show Gist options
  • Save AmosLewis/21c717648fe703d5498f91e3ad49d7c6 to your computer and use it in GitHub Desktop.
Save AmosLewis/21c717648fe703d5498f91e3ad49d7c6 to your computer and use it in GitHub Desktop.
#loc = loc(unknown)
module attributes {torch.debug_module_name = "SliceNegativeIndexStaticModule"} {
func.func @forward(%arg0: !torch.vtensor<[1,128,2],f32> loc(unknown)) -> !torch.vtensor<[1,0,2],f32> {
%int1 = torch.constant.int 1 loc(#loc1)
%int0 = torch.constant.int 0 loc(#loc2)
%int-1 = torch.constant.int -1 loc(#loc3)
%0 = torch.aten.slice.Tensor %arg0, %int1, %int-1, %int0, %int1 : !torch.vtensor<[1,128,2],f32>, !torch.int, !torch.int, !torch.int, !torch.int -> !torch.vtensor<[1,0,2],f32> loc(#loc4)
return %0 : !torch.vtensor<[1,0,2],f32> loc(#loc)
} loc(#loc)
} loc(#loc)
#loc1 = loc("/home/chi/src/ubuntu20/shark/torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir/torch_mlir_e2e_test/test_suite/slice_like.py":63:19)
#loc2 = loc("/home/chi/src/ubuntu20/shark/torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir/torch_mlir_e2e_test/test_suite/slice_like.py":63:17)
#loc3 = loc("/home/chi/src/ubuntu20/shark/torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir/torch_mlir_e2e_test/test_suite/slice_like.py":63:24)
#loc4 = loc("/home/chi/src/ubuntu20/shark/torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir/torch_mlir_e2e_test/test_suite/slice_like.py":63:15)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment