diff --git a/python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/upstream_shape_helpers.py b/python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/upstream_shape_helpers.py index 0b7487ac4..4b79de4be 100644 --- a/python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/upstream_shape_helpers.py +++ b/python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/upstream_shape_helpers.py @@ -2,15 +2,16 @@ # the PyTorch BSD-style license available at # https://github.com/pytorch/pytorch/blob/master/LICENSE +# DO NOT EDIT THIS FILE, except by copying new upstream contents into it. +# Code taken from torch/csrc/jit/runtime/symbolic_shape_registry.cpp +# Once https://github.com/pytorch/pytorch/pull/68564 lands, we can directly +# use the code from upstream. + # Minimal imports needed for the code to compile. from typing import List, Any, Optional import torch number = float -# Code taken from torch/csrc/jit/runtime/symbolic_shape_registry.cpp -# Once https://github.com/pytorch/pytorch/pull/68564 lands, we can directly -# use the code from upstream. - #### SHAPE COMPUTE FUNCTIONS ### def broadcast(a: List[int], b: List[int]): dimsA = len(a)