mirror of https://github.com/llvm/torch-mlir
parent
730cdcd071
commit
94df096c11
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue