Add note to not edit upstream_shape_helpers.py

pull/698/head snapshot-20220324.344
Sean Silva 2022-03-24 09:32:19 -07:00 committed by GitHub
parent 730cdcd071
commit 94df096c11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -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)