Overview of Exportability Comparison#
The following script shows the exported program for many short cases
to retrieve an ONNX model equivalent to the original model.
Go to Bottom of the page to see a table summarizing the results.
The summary explicitly includes the new-tracing exporter next to
yobx, dynamo-ir, and tracing.
<<<
import warnings
warnings.filterwarnings("ignore")
import inspect
import textwrap
import pandas
from yobx.helpers import string_type
from yobx.helpers.onnx_helper import pretty_onnx
from yobx.torch.testing.model_eval_cases import discover, run_exporter
from yobx.ext_test_case import unit_test_going
cases = discover()
print()
print(":ref:`Summary <ledx-summary-exported-program>`")
print()
sorted_cases = sorted(cases.items())
if unit_test_going():
sorted_cases = sorted_cases[:3]
for name, cls_model in sorted_cases:
print(f"* :ref:`{name} <ledx-model-case-export-{name}>`")
print()
print()
obs = []
for name, cls_model in sorted(cases.items()):
print()
print(f".. _ledx-model-case-export-{name}:")
print()
print(name)
print("=" * len(name))
print()
print(f"code: :class:`yobx.torch.testing._model_eval_cases.{name}`")
print()
print("forward")
print("+++++++")
print()
print(".. code-block:: python")
print()
src = inspect.getsource(cls_model.forward)
if src:
print(textwrap.indent(textwrap.dedent(src), " "))
else:
print(" # code is missing")
print()
print()
for exporter in ("yobx", "dynamo-ir", "tracing", "new-tracing"):
expname = exporter.replace("export-", "")
print()
print(expname)
print("+" * len(expname))
print()
res = run_exporter(exporter, cls_model, True, quiet=True)
case_ref = f":ref:`{name} <ledx-model-case-export-{name}>`"
expo = exporter
if "inputs" in res:
print(f"* **inputs:** ``{string_type(res['inputs'], with_shape=True)}``")
if "dynamic_shapes" in res:
print(f"* **shapes:** ``{string_type(res['dynamic_shapes'])}``")
print()
print()
if "onx" in res:
print(".. code-block:: text")
print()
print(textwrap.indent(pretty_onnx(res["onx"]), " "))
print()
print()
if "error" not in res:
obs.append(
dict(
case=case_ref, n_nodes=len(res["onx"].graph.node), exporter=expo
)
)
if "error" in res:
print("**FAILED**")
print()
print(".. code-block:: text")
print()
err = str(res["error"])
if err:
print(textwrap.indent(err, " "))
else:
print(" # no error found for the failure")
print()
print()
obs.append(dict(case=case_ref, n_nodes="FAIL", exporter=expo))
print()
print(".. _ledx-summary-exported-program:")
print()
print("Summary")
print("+++++++")
print()
df = pandas.DataFrame(obs)
piv = df.pivot(index="case", columns="exporter", values="n_nodes")
print(piv.to_markdown(tablefmt="rst"))
print()
print(
"``FAIL`` indicates an export or numerical validation failure; see each case above."
)
print()
>>>
AtenAsStrided#
code: yobx.torch.testing._model_eval_cases.AtenAsStrided
forward#
def forward(self, x):
y = torch.as_strided(x, (2, 2, 8, 4), (128, 8, 16, 1))
return y
yobx#
inputs:
#1[(T1s2x2x8x8,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 2, 8, 8]
init: name='init' type=int64 shape=(1,) -- array([-1])
init: name='init_2' type=int64 shape=(128,)
init: name='init_3' type=int64 shape=(4,) -- array([2, 2, 8, 4])
Reshape(x, init) -> reshape
Gather(reshape, init_2) -> gather
Reshape(gather, init_3) -> output_0
output: name='output_0' type=dtype('float32') shape=[2, 2, 8, 4]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s2x2x8x8,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 2, 8, 8]
init: name='init' type=int64 shape=(1,) -- array([-1])
init: name='init_2' type=int64 shape=(128,)
init: name='init_3' type=int64 shape=(4,) -- array([2, 2, 8, 4])
Reshape(x, init) -> reshape
Gather(reshape, init_2) -> gather
Reshape(gather, init_3) -> output
output: name='output' type=dtype('float32') shape=[2, 2, 8, 4]
new-tracing#
inputs:
#1[(T1s2x2x8x8,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 2, 8, 8]
init: name='init' type=int64 shape=(1,) -- array([-1])
init: name='init_2' type=int64 shape=(128,)
init: name='init_3' type=int64 shape=(4,) -- array([2, 2, 8, 4])
Reshape(x, init) -> reshape
Gather(reshape, init_2) -> gather
Reshape(gather, init_3) -> output
output: name='output' type=dtype('float32') shape=[2, 2, 8, 4]
AtenCumprod#
code: yobx.torch.testing._model_eval_cases.AtenCumprod
forward#
def forward(self, x):
return torch.cumprod(x, dim=-1)
yobx#
inputs:
#1[(T1s1x1x8x5,)]shapes:
dict(x:{0:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s77', 1, 8, 5]
init: name='init' type=int64 shape=() -- array([3])
init: name='init_2' type=int64 shape=() -- array([3])
init: name='init_3' type=float32 shape=(1,) -- array([2.], dtype=float32)
init: name='init_4' type=float32 shape=(1,) -- array([2.], dtype=float32)
Abs(x) -> abs
Log(abs) -> log
CumSum(log, init) -> cumsum
Exp(cumsum) -> exp
Sign(x) -> sign
Neg(sign) -> neg
Relu(neg) -> relu
CumSum(relu, init_2) -> cumsum_2
Mod(cumsum_2, init_3, fmod=1) -> mod
Mul(mod, init_4) -> mul
Mul(mul, exp) -> Sub1MulPattern--cumprod_0
Sub(exp, Sub1MulPattern--cumprod_0) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 1, 8, 5]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s1x1x8x5,)]shapes:
dict(x:{0:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s26', 1, 8, 5]
init: name='init' type=int64 shape=() -- array([3])
init: name='init_2' type=int64 shape=() -- array([3])
init: name='init_3' type=float32 shape=(1,) -- array([2.], dtype=float32)
init: name='init_4' type=float32 shape=(1,) -- array([2.], dtype=float32)
Abs(x) -> abs
Log(abs) -> log
CumSum(log, init) -> cumsum
Exp(cumsum) -> exp
Sign(x) -> sign
Neg(sign) -> neg
Relu(neg) -> relu
CumSum(relu, init_2) -> cumsum_2
Mod(cumsum_2, init_3, fmod=1) -> mod
Mul(mod, init_4) -> mul
Mul(mul, exp) -> Sub1MulPattern--cumprod_0
Sub(exp, Sub1MulPattern--cumprod_0) -> output
output: name='output' type=dtype('float32') shape=['s26', 1, 8, 5]
new-tracing#
inputs:
#1[(T1s1x1x8x5,)]shapes:
dict(x:{0:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['_dyn_0', 1, 8, 5]
init: name='init' type=int64 shape=() -- array([3])
init: name='init_2' type=int64 shape=() -- array([3])
init: name='init_3' type=float32 shape=(1,) -- array([2.], dtype=float32)
init: name='init_4' type=float32 shape=(1,) -- array([2.], dtype=float32)
Abs(x) -> abs
Log(abs) -> log
CumSum(log, init) -> cumsum
Exp(cumsum) -> exp
Sign(x) -> sign
Neg(sign) -> neg
Relu(neg) -> relu
CumSum(relu, init_2) -> cumsum_2
Mod(cumsum_2, init_3, fmod=1) -> mod
Mul(mod, init_4) -> mul
Mul(mul, exp) -> Sub1MulPattern--cumprod_default_0
Sub(exp, Sub1MulPattern--cumprod_default_0) -> output
output: name='output' type=dtype('float32') shape=['_dyn_0', 1, 8, 5]
AtenInterpolate#
code: yobx.torch.testing._model_eval_cases.AtenInterpolate
forward#
def forward(self, x):
y = torch.nn.functional.interpolate(
x, scale_factor=2.0, mode="bilinear", recompute_scale_factor=False
)
return y
yobx#
inputs:
#1[(T1s2x2x3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 2, 3, 4]
init: name='init' type=int64 shape=(2,) -- array([6, 8])
Shape(x, start=0, end=2) -> shape
Concat(shape, init, axis=0) -> concat
Resize(x, , , concat, mode=b'linear', coordinate_transformation_mode=b'pytorch_half_pixel', nearest_mode=b'floor') -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 2, 6, 8]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s2x2x3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 2, 3, 4]
init: name='init' type=int64 shape=(2,) -- array([6, 8])
Shape(x, start=0, end=2) -> shape
Concat(shape, init, axis=0) -> concat
Resize(x, , , concat, mode=b'linear', coordinate_transformation_mode=b'pytorch_half_pixel', nearest_mode=b'floor') -> output
output: name='output' type=dtype('float32') shape=['Resize_dim0', 'Resize_dim1', 'Resize_dim2', 'Resize_dim3']
new-tracing#
inputs:
#1[(T1s2x2x3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 2, 3, 4]
init: name='init' type=int64 shape=(2,) -- array([6, 8])
Shape(x, start=0, end=2) -> shape
Concat(shape, init, axis=0) -> concat
Resize(x, , , concat, mode=b'linear', coordinate_transformation_mode=b'pytorch_half_pixel', nearest_mode=b'floor') -> output
output: name='output' type=dtype('float32') shape=['batch', 2, 6, 8]
AtenNnFunctionalBilinear#
code: yobx.torch.testing._model_eval_cases.AtenNnFunctionalBilinear
forward#
def forward(self, x1, x2):
return torch.nn.functional.bilinear(x1, x2, self.weight, self.bias)
yobx#
inputs:
#1[(T1s2x3,T1s2x4)]shapes:
dict(x1:{0:Dim(batch)},x2:{0:Dim(batch)})
opset: domain='' version=21
input: name='x1' type=dtype('float32') shape=['batch', 3]
input: name='x2' type=dtype('float32') shape=['batch', 4]
init: name='init_10' type=int64 shape=(1,) -- array([-2])
init: name='init_11' type=int64 shape=(1,) -- array([-1])
init: name='ShapeBasedEditDistanceReshapePattern_shape' type=int64 shape=(3,) -- array([0, 5, 4])
init: name='p_bias' type=float32 shape=(5,)
init: name='reshape' type=float32 shape=(3, 20)
MatMul(x1, reshape) -> matmul
Reshape(matmul, ShapeBasedEditDistanceReshapePattern_shape) -> reshape_2
Unsqueeze(x2, init_10) -> unsqueeze_4
Mul(reshape_2, unsqueeze_4) -> mul_2
ReduceSum(mul_2, init_11, keepdims=0) -> reducesum
Add(reducesum, p_bias) -> output_0
output: name='output_0' type=dtype('float32') shape=['s24', 5]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s2x3,T1s2x4)]shapes:
dict(x1:{0:Dim(batch)},x2:{0:Dim(batch)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x1' type=dtype('float32') shape=['batch', 3]
input: name='x2' type=dtype('float32') shape=['batch', 4]
init: name='bias' type=float32 shape=(5,)
init: name='init_10' type=int64 shape=(1,) -- array([-2])
init: name='init_11' type=int64 shape=(1,) -- array([-1])
init: name='ShapeBasedEditDistanceReshapePattern_shape' type=int64 shape=(3,) -- array([0, 5, 4])
init: name='reshape' type=float32 shape=(3, 20)
MatMul(x1, reshape) -> matmul
Reshape(matmul, ShapeBasedEditDistanceReshapePattern_shape) -> reshape_2
Unsqueeze(x2, init_10) -> unsqueeze_4
Mul(reshape_2, unsqueeze_4) -> mul_2
ReduceSum(mul_2, init_11, keepdims=0) -> reducesum
Add(reducesum, bias) -> output
output: name='output' type=dtype('float32') shape=['batch', 5]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
Shape(input_0) -> output_0
output: name='output_0' type=? shape=?
----- function name=PrepareInitializer_1 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
Shape(input_0, start=0, end=1) -> output_0
output: name='output_0' type=? shape=?
----- function name=PrepareInitializer_2 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Squeeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
----- function name=PrepareInitializer_3 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
input: 'input_2'
input: 'input_3'
Slice(input_0, input_1, input_2, input_3) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#1[(T1s2x3,T1s2x4)]shapes:
dict(x1:{0:Dim(batch)},x2:{0:Dim(batch)})
opset: domain='' version=21
input: name='x1' type=dtype('float32') shape=['batch', 3]
input: name='x2' type=dtype('float32') shape=['batch', 4]
init: name='bias' type=float32 shape=(5,)
init: name='param_1' type=float32 shape=(3, 20)
init: name='init' type=int64 shape=(3,) -- array([-1, 5, 4])
init: name='init_3' type=int64 shape=(1,) -- array([-1])
init: name='ShapeBasedReshapeIsSqueezePattern_axes' type=int64 shape=(1,) -- array([1])
MatMul(x1, param_1) -> mm_default
Reshape(mm_default, init) -> view_default
Unsqueeze(x2, ShapeBasedReshapeIsSqueezePattern_axes) -> view_default_1
Mul(view_default, view_default_1) -> mul_tensor
ReduceSum(mul_tensor, init_3, keepdims=0) -> sum_dim_int_list
Add(sum_dim_int_list, bias) -> output
output: name='output' type=dtype('float32') shape=['batch', 5]
AtenNnFunctionalSoftMarginLoss#
code: yobx.torch.testing._model_eval_cases.AtenNnFunctionalSoftMarginLoss
forward#
def forward(self, x, target):
return torch.nn.functional.soft_margin_loss(x, target, reduction="none")
yobx#
inputs:
#1[(T1s2x3,T1s2x3)]shapes:
dict(x:{0:Dim(batch)},target:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='target' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=(1,) -- array([1.], dtype=float32)
Mul(x, target) -> mul
Neg(mul) -> neg
Exp(neg) -> exp
Add(init, exp) -> add
Log(add) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 3]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s2x3,T1s2x3)]shapes:
dict(x:{0:Dim(batch)},target:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='target' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=(1,) -- array([1.], dtype=float32)
Mul(x, target) -> mul
Neg(mul) -> neg
Exp(neg) -> exp
Add(init, exp) -> add
Log(add) -> output
output: name='output' type=dtype('float32') shape=['batch', 3]
new-tracing#
inputs:
#1[(T1s2x3,T1s2x3)]shapes:
dict(x:{0:Dim(batch)},target:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='target' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=(1,) -- array([1.], dtype=float32)
Mul(x, target) -> mul
Neg(mul) -> neg
Exp(neg) -> exp
Add(init, exp) -> add
Log(add) -> output
output: name='output' type=dtype('float32') shape=['batch', 3]
AtenNonZero#
code: yobx.torch.testing._model_eval_cases.AtenNonZero
forward#
def forward(self, x):
y = torch.nonzero(x)
return y
yobx#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
NonZero(x) -> nonzero_2
Transpose(nonzero_2, perm=[1,0]) -> output_0
output: name='output_0' type=dtype('int64') shape=['u0', 2]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
NonZero(x) -> nonzero_2
Transpose(nonzero_2, perm=[1,0]) -> output
output: name='output' type=dtype('int64') shape=['NonZero_nonzero_2_nnz', 2]
new-tracing#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
NonZero(x) -> nonzero
Transpose(nonzero, perm=[1,0]) -> output
output: name='output' type=dtype('int64') shape=['u1', 2]
AtenNonZeroTuple#
code: yobx.torch.testing._model_eval_cases.AtenNonZeroTuple
forward#
def forward(self, x):
y = torch.nonzero(x, as_tuple=True)
return y[0], y[1]
yobx#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='ShapeBasedReshapeIsSqueezePattern_axes' type=int64 shape=(1,) -- array([0])
init: name='ShapeBasedReshapeIsSqueezePattern_axes_0' type=int64 shape=(1,) -- array([0])
NonZero(x) -> nonzero
Split(nonzero, num_outputs=2) -> split, split_2
Squeeze(split, ShapeBasedReshapeIsSqueezePattern_axes) -> output_0
Squeeze(split_2, ShapeBasedReshapeIsSqueezePattern_axes_0) -> output_1
output: name='output_0' type=dtype('int64') shape=['d_output_0_0']
output: name='output_1' type=dtype('int64') shape=['d_output_1_0']
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='ShapeBasedReshapeIsSqueezePattern_axes' type=int64 shape=(1,) -- array([0])
init: name='ShapeBasedReshapeIsSqueezePattern_axes_0' type=int64 shape=(1,) -- array([0])
NonZero(x) -> nonzero_2
Split(nonzero_2, num_outputs=2) -> split, split_2
Squeeze(split, ShapeBasedReshapeIsSqueezePattern_axes) -> output_0
Squeeze(split_2, ShapeBasedReshapeIsSqueezePattern_axes_0) -> output_1
output: name='output_0' type=dtype('int64') shape=['NonZero_nonzero_2_nnz']
output: name='output_1' type=dtype('int64') shape=['NonZero_nonzero_2_nnz']
new-tracing#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='init' type=int64 shape=(1,) -- array([1])
NonZero(x) -> nonzero
Transpose(nonzero, perm=[1,0]) -> nonzero_default
Split(nonzero_default, axis=1, num_outputs=2) -> unbind_int_u0, unbind_int_u1
Squeeze(unbind_int_u0, init) -> output_0
Squeeze(unbind_int_u1, init) -> output_1
output: name='output_0' type=dtype('int64') shape=['d_output_0_0']
output: name='output_1' type=dtype('int64') shape=['d_output_1_0']
AtenRollPos#
code: yobx.torch.testing._model_eval_cases.AtenRollPos
forward#
def forward(self, x):
return torch.roll(x, 1, -1)
yobx#
inputs:
#1[(T1s2x3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3, 4]
init: name='init' type=int64 shape=(1,) -- array([-1])
init: name='init_2' type=int64 shape=(1,) -- array([4])
init: name='init_3' type=int64 shape=(1,) -- array([-1])
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='init_5' type=int64 shape=(1,) -- array([-1])
init: name='init_6' type=int64 shape=(1,) -- array([-1])
Slice(x, init, init_2, init_3) -> slice
Slice(x, init_4, init_5, init_6) -> slice_2
Concat(slice, slice_2, axis=-1) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 3, 4]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s2x3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3, 4]
init: name='init' type=int64 shape=(1,) -- array([-1])
init: name='init_2' type=int64 shape=(1,) -- array([4])
init: name='init_3' type=int64 shape=(1,) -- array([-1])
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='init_5' type=int64 shape=(1,) -- array([-1])
init: name='init_6' type=int64 shape=(1,) -- array([-1])
Slice(x, init, init_2, init_3) -> slice
Slice(x, init_4, init_5, init_6) -> slice_2
Concat(slice, slice_2, axis=-1) -> output
output: name='output' type=dtype('float32') shape=['batch', 3, 4]
new-tracing#
inputs:
#1[(T1s2x3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3, 4]
init: name='init' type=int64 shape=(1,) -- array([-1])
init: name='init_2' type=int64 shape=(1,) -- array([4])
init: name='init_3' type=int64 shape=(1,) -- array([-1])
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='init_5' type=int64 shape=(1,) -- array([-1])
init: name='init_6' type=int64 shape=(1,) -- array([-1])
Slice(x, init, init_2, init_3) -> slice
Slice(x, init_4, init_5, init_6) -> slice_2
Concat(slice, slice_2, axis=-1) -> output
output: name='output' type=dtype('float32') shape=['batch', 3, 4]
AtenRollRelu#
code: yobx.torch.testing._model_eval_cases.AtenRollRelu
forward#
def forward(self, x):
return torch.relu(torch.roll(x, -1, -1))
yobx#
inputs:
#1[(T1s2x3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3, 4]
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='init_2' type=int64 shape=(1,) -- array([4])
init: name='init_3' type=int64 shape=(1,) -- array([-1])
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='init_5' type=int64 shape=(1,) -- array([1])
init: name='init_6' type=int64 shape=(1,) -- array([-1])
Slice(x, init, init_2, init_3) -> slice
Slice(x, init_4, init_5, init_6) -> slice_2
Concat(slice, slice_2, axis=-1) -> concat
Relu(concat) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 3, 4]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s2x3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3, 4]
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='init_2' type=int64 shape=(1,) -- array([4])
init: name='init_3' type=int64 shape=(1,) -- array([-1])
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='init_5' type=int64 shape=(1,) -- array([1])
init: name='init_6' type=int64 shape=(1,) -- array([-1])
Slice(x, init, init_2, init_3) -> slice
Slice(x, init_4, init_5, init_6) -> slice_2
Concat(slice, slice_2, axis=-1) -> concat
Relu(concat) -> output
output: name='output' type=dtype('float32') shape=['batch', 3, 4]
new-tracing#
inputs:
#1[(T1s2x3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3, 4]
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='init_2' type=int64 shape=(1,) -- array([4])
init: name='init_3' type=int64 shape=(1,) -- array([-1])
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='init_5' type=int64 shape=(1,) -- array([1])
init: name='init_6' type=int64 shape=(1,) -- array([-1])
Slice(x, init, init_2, init_3) -> slice
Slice(x, init_4, init_5, init_6) -> slice_2
Concat(slice, slice_2, axis=-1) -> concat
Relu(concat) -> output
output: name='output' type=dtype('float32') shape=['batch', 3, 4]
BuildInIsInstance#
code: yobx.torch.testing._model_eval_cases.BuildInIsInstance
forward#
def forward(self, x, lx: list | torch.Tensor):
if isinstance(lx, list):
t = lx[0] * lx[1].sum(axis=1, keepdim=True)
return torch.sigmoid(self.linear(x)) - self.buff + t
return torch.sigmoid(self.linear(x)) - self.buff + lx
yobx#
inputs:
#2[(T1s4x3,#2[T1s4x1,T1s4x2]),(T1s8x3,#2[T1s8x1,T1s8x2])]shapes:
dict(x:{0:Dim(batch)},lx:#2[{0:Dim(batch)},{0:Dim(batch)}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='lx_0' type=dtype('float32') shape=['batch', 1]
input: name='lx_1' type=dtype('float32') shape=['batch', 2]
init: name='b_buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='p_linear_bias' type=float32 shape=(1,) -- array([-0.35561192], dtype=float32)
init: name='transpose' type=float32 shape=(3, 1) -- array([ 0.40115446, -0.24664187, -0.4952653 ], dtype=float32)
Gemm(x, transpose, p_linear_bias) -> add_2
Sigmoid(add_2) -> sigmoid
Sub(sigmoid, b_buff) -> sub
ReduceSum(lx_1, init, keepdims=1) -> sum_1
Mul(lx_0, sum_1) -> mul
Add(sub, mul) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 1]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s4x3,#2[T1s4x1,T1s4x2]),(T1s8x3,#2[T1s8x1,T1s8x2])]shapes:
dict(x:{0:Dim(batch)},lx:#2[{0:Dim(batch)},{0:Dim(batch)}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='lx_0' type=dtype('float32') shape=['batch', 1]
input: name='lx_1' type=dtype('float32') shape=['batch', 2]
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='_traced_m2_buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='_traced_m2_linearbias' type=float32 shape=(1,) -- array([-0.05201516], dtype=float32)
init: name='_traced_m2_lineartranspose' type=float32 shape=(3, 1) -- array([-0.17277978, -0.5023738 , 0.12520076], dtype=float32)
Gemm(x, _traced_m2_lineartranspose, _traced_m2_linearbias) -> _traced_m2_linearadd
Sigmoid(_traced_m2_linearadd) -> sigmoid
Sub(sigmoid, _traced_m2_buff) -> sub
ReduceSum(lx_1, init, keepdims=1) -> sum_1
Mul(lx_0, sum_1) -> mul
Add(sub, mul) -> output
output: name='output' type=dtype('float32') shape=['batch', 1]
new-tracing#
inputs:
#2[(T1s4x3,#2[T1s4x1,T1s4x2]),(T1s8x3,#2[T1s8x1,T1s8x2])]shapes:
dict(x:{0:Dim(batch)},lx:#2[{0:Dim(batch)},{0:Dim(batch)}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='lx_0' type=dtype('float32') shape=['batch', 1]
input: name='lx_1' type=dtype('float32') shape=['batch', 2]
init: name='buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='param_1' type=float32 shape=(3, 1) -- array([ 0.35989377, -0.24109852, -0.42897215], dtype=float32)
init: name='linear_bias' type=float32 shape=(1,) -- array([0.06304913], dtype=float32)
Gemm(x, param_1, linear_bias, alpha=1.00, beta=1.00) -> addmm_default
Sigmoid(addmm_default) -> sigmoid_default
Sub(sigmoid_default, buff) -> sub_tensor
ReduceSum(lx_1, init, keepdims=1) -> sum_dim_int_list
Mul(lx_0, sum_dim_int_list) -> mul_tensor
Add(sub_tensor, mul_tensor) -> output
output: name='output' type=dtype('float32') shape=['batch', 1]
BuildInLen#
code: yobx.torch.testing._model_eval_cases.BuildInLen
forward#
def forward(self, x, lx: list):
t = lx[0] * lx[1].sum(axis=1, keepdim=True)
if len(lx) > 2:
t = t + lx[2].sum(axis=1, keepdim=True)
return torch.sigmoid(self.linear(x)) - self.buff + t
yobx#
inputs:
#2[(T1s4x3,#2[T1s4x1,T1s4x2]),(T1s8x3,#3[T1s8x1,T1s8x2,T1s8x3])]shapes:
dict(x:{0:Dim(batch)},lx:#2[{0:Dim(batch)},{0:Dim(batch)}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='lx_0' type=dtype('float32') shape=['batch', 1]
input: name='lx_1' type=dtype('float32') shape=['batch', 2]
init: name='b_buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='p_linear_bias' type=float32 shape=(1,) -- array([0.5160802], dtype=float32)
init: name='transpose' type=float32 shape=(3, 1) -- array([-0.22335304, 0.3261058 , 0.19413929], dtype=float32)
Gemm(x, transpose, p_linear_bias) -> add_2
Sigmoid(add_2) -> sigmoid
Sub(sigmoid, b_buff) -> sub
ReduceSum(lx_1, init, keepdims=1) -> sum_1
Mul(lx_0, sum_1) -> mul
Add(sub, mul) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 1]
FAILED
diff.1
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s4x3,#2[T1s4x1,T1s4x2]),(T1s8x3,#3[T1s8x1,T1s8x2,T1s8x3])]shapes:
dict(x:{0:Dim(batch)},lx:#2[{0:Dim(batch)},{0:Dim(batch)}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='lx_0' type=dtype('float32') shape=['batch', 1]
input: name='lx_1' type=dtype('float32') shape=['batch', 2]
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='_traced_m2_buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='_traced_m2_linearbias' type=float32 shape=(1,) -- array([-0.07386871], dtype=float32)
init: name='_traced_m2_lineartranspose' type=float32 shape=(3, 1) -- array([-0.5046289 , -0.4989286 , 0.53592974], dtype=float32)
Gemm(x, _traced_m2_lineartranspose, _traced_m2_linearbias) -> _traced_m2_linearadd
Sigmoid(_traced_m2_linearadd) -> sigmoid
Sub(sigmoid, _traced_m2_buff) -> sub
ReduceSum(lx_1, init, keepdims=1) -> sum_1
Mul(lx_0, sum_1) -> mul
Add(sub, mul) -> output
output: name='output' type=dtype('float32') shape=['batch', 1]
FAILED
diff.1
new-tracing#
inputs:
#2[(T1s4x3,#2[T1s4x1,T1s4x2]),(T1s8x3,#3[T1s8x1,T1s8x2,T1s8x3])]shapes:
dict(x:{0:Dim(batch)},lx:#2[{0:Dim(batch)},{0:Dim(batch)}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='lx_0' type=dtype('float32') shape=['batch', 1]
input: name='lx_1' type=dtype('float32') shape=['batch', 2]
init: name='buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='param_1' type=float32 shape=(3, 1) -- array([0.56796646, 0.45722598, 0.00860016], dtype=float32)
init: name='linear_bias' type=float32 shape=(1,) -- array([0.31890982], dtype=float32)
Gemm(x, param_1, linear_bias, alpha=1.00, beta=1.00) -> addmm_default
Sigmoid(addmm_default) -> sigmoid_default
Sub(sigmoid_default, buff) -> sub_tensor
ReduceSum(lx_1, init, keepdims=1) -> sum_dim_int_list
Mul(lx_0, sum_dim_int_list) -> mul_tensor
Add(sub_tensor, mul_tensor) -> output
output: name='output' type=dtype('float32') shape=['batch', 1]
FAILED
diff.1
ComplexPolar#
code: yobx.torch.testing._model_eval_cases.ComplexPolar
forward#
def forward(self, x, angle):
return torch.polar(x, angle)
yobx#
inputs:
#1[(T1s4x4,T1s4x4)]shapes:
dict(x:{0:Dim(batch)},angle:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
input: name='angle' type=dtype('float32') shape=['batch', 4]
init: name='init' type=complex64 shape=(1,) -- array([0.+1.j], dtype=complex64)
Cast(x, to=14) -> cast_3
Cos(angle) -> cos
Cast(cos, to=14) -> cast
Sin(angle) -> sin
Cast(sin, to=14) -> cast_2
Mul(cast_2, init) -> mul
Add(cast, mul) -> add
Mul(cast_3, add) -> output_0
output: name='output_0' type=dtype('complex64') shape=['s77', 4]
FAILED
[ONNXRuntimeError] : 10 : INVALID_GRAPH : This is an invalid model. Type Error: Type 'tensor(complex64)' of input parameter (cast_2) of operator (Mul) in node (polar_5) is invalid.
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s4x4,T1s4x4)]shapes:
dict(x:{0:Dim(batch)},angle:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
input: name='angle' type=dtype('float32') shape=['batch', 4]
init: name='init' type=complex64 shape=(1,) -- array([0.+1.j], dtype=complex64)
Cast(x, to=14) -> cast_3
Cos(angle) -> cos
Cast(cos, to=14) -> cast
Sin(angle) -> sin
Cast(sin, to=14) -> cast_2
Mul(cast_2, init) -> mul
Add(cast, mul) -> add
Mul(cast_3, add) -> output
output: name='output' type=dtype('complex64') shape=['batch', 4]
FAILED
[ONNXRuntimeError] : 10 : INVALID_GRAPH : This is an invalid model. Type Error: Type 'tensor(complex64)' of input parameter (cast_2) of operator (Mul) in node (polar_5) is invalid.
new-tracing#
FAILED
Could not extract specialized integer from data-dependent expression u0 (unhinted: u0). (Size-like symbols: none)
Caused by: (_meta_registrations.py:3986 in meta_complex)
For more information, run with TORCH_LOGS="dynamic"
For extended logs when we create symbols, also add TORCHDYNAMO_EXTENDED_DEBUG_CREATE_SYMBOL="u0"
If you suspect the guard was triggered from C++, add TORCHDYNAMO_EXTENDED_DEBUG_CPP=1
For more debugging help, see https://docs.google.com/document/d/1HSuTTVvYH1pTew89Rtpeu84Ht3nQEFTYhAX3Ypa_xJs/edit?usp=sharing
For C++ stack trace, run with TORCHDYNAMO_EXTENDED_DEBUG_CPP=1
ControlFlowCond#
code: yobx.torch.testing._model_eval_cases.ControlFlowCond
forward#
def forward(self, x):
def true_fn(x):
return torch.sin(x)
def false_fn(x):
return torch.cos(x)
return torch.cond(x.sum() > 0, true_fn, false_fn, [x])
yobx#
inputs:
#1[(T1s5x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_1
Greater(sum_1, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 3]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond#0
Sin(x) -> cond#0
output: name='cond#0' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond#0
Cos(x) -> cond#0
output: name='cond#0' type=dtype('float32') shape=['batch', 3]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s5x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_1
Greater(sum_1, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output
output: name='output' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> condcc
Sin(x) -> condcc
output: name='condcc' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> condcc
Cos(x) -> condcc
output: name='condcc' type=dtype('float32') shape=['batch', 3]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#1[(T1s5x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_default
Greater(sum_default, init) -> gt_scalar
If(gt_scalar, then_branch=G1, else_branch=G2) -> output
output: name='output' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond
Sin(x) -> cond
output: name='cond' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond
Cos(x) -> cond
output: name='cond' type=dtype('float32') shape=['batch', 3]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
ControlFlowCond2Inputs#
code: yobx.torch.testing._model_eval_cases.ControlFlowCond2Inputs
forward#
def forward(self, x, y):
def true_fn(x, y):
return torch.sin(x), torch.cos(x) + y
def false_fn(x, y):
return torch.cos(x), torch.sin(x) + y
return torch.cond(x.sum() > 0, true_fn, false_fn, [x, y])
yobx#
inputs:
#1[(T1s5x3,T1s5x3)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='y' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_1
Greater(sum_1, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output_0, output_1
output: name='output_0' type=dtype('float32') shape=['s77', 3]
output: name='output_1' type=dtype('float32') shape=['s77', 3]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond#0,cond#1
Cos(x) -> cos__1_0
Add(cos__1_0, y) -> cond#1
Sin(x) -> cond#0
output: name='cond#0' type=dtype('float32') shape=['batch', 3]
output: name='cond#1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond#0,cond#1
Cos(x) -> cond#0
Sin(x) -> sin__2_1
Add(sin__2_1, y) -> cond#1
output: name='cond#0' type=dtype('float32') shape=['batch', 3]
output: name='cond#1' type=dtype('float32') shape=['batch', 3]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s5x3,T1s5x3)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='y' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_1
Greater(sum_1, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output_0, output_1
output: name='output_0' type=dtype('float32') shape=['batch', 3]
output: name='output_1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> condcc#0,condcc#1
Cos(x) -> cos__1_0
Add(cos__1_0, y) -> condcc#1
Sin(x) -> condcc#0
output: name='condcc#0' type=dtype('float32') shape=['batch', 3]
output: name='condcc#1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> condcc#0,condcc#1
Cos(x) -> condcc#0
Sin(x) -> sin__2_1
Add(sin__2_1, y) -> condcc#1
output: name='condcc#0' type=dtype('float32') shape=['batch', 3]
output: name='condcc#1' type=dtype('float32') shape=['batch', 3]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#1[(T1s5x3,T1s5x3)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='y' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_default
Greater(sum_default, init) -> gt_scalar
If(gt_scalar, then_branch=G1, else_branch=G2) -> output_0, output_1
output: name='output_0' type=dtype('float32') shape=['batch', 3]
output: name='output_1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond#0,cond#1
Cos(x) -> cos__1_0
Add(cos__1_0, y) -> cond#1
Sin(x) -> cond#0
output: name='cond#0' type=dtype('float32') shape=['batch', 3]
output: name='cond#1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond#0,cond#1
Cos(x) -> cond#0
Sin(x) -> sin__2_1
Add(sin__2_1, y) -> cond#1
output: name='cond#0' type=dtype('float32') shape=['batch', 3]
output: name='cond#1' type=dtype('float32') shape=['batch', 3]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
ControlFlowCond2Outputs#
code: yobx.torch.testing._model_eval_cases.ControlFlowCond2Outputs
forward#
def forward(self, x):
def true_fn(x):
return torch.sin(x), torch.cos(x)
def false_fn(x):
return torch.cos(x), torch.sin(x)
return torch.cond(x.sum() > 0, true_fn, false_fn, [x])
yobx#
inputs:
#1[(T1s5x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_1
Greater(sum_1, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output_0, output_1
output: name='output_0' type=dtype('float32') shape=['s77', 3]
output: name='output_1' type=dtype('float32') shape=['s77', 3]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond#0,cond#1
Cos(x) -> cond#1
Sin(x) -> cond#0
output: name='cond#0' type=dtype('float32') shape=['batch', 3]
output: name='cond#1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond#0,cond#1
Cos(x) -> cond#0
Sin(x) -> cond#1
output: name='cond#0' type=dtype('float32') shape=['batch', 3]
output: name='cond#1' type=dtype('float32') shape=['batch', 3]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s5x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_1
Greater(sum_1, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output_0, output_1
output: name='output_0' type=dtype('float32') shape=['batch', 3]
output: name='output_1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> condcc#0,condcc#1
Cos(x) -> condcc#1
Sin(x) -> condcc#0
output: name='condcc#0' type=dtype('float32') shape=['batch', 3]
output: name='condcc#1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> condcc#0,condcc#1
Cos(x) -> condcc#0
Sin(x) -> condcc#1
output: name='condcc#0' type=dtype('float32') shape=['batch', 3]
output: name='condcc#1' type=dtype('float32') shape=['batch', 3]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#1[(T1s5x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_default
Greater(sum_default, init) -> gt_scalar
If(gt_scalar, then_branch=G1, else_branch=G2) -> output_0, output_1
output: name='output_0' type=dtype('float32') shape=['batch', 3]
output: name='output_1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond#0,cond#1
Cos(x) -> cond#1
Sin(x) -> cond#0
output: name='cond#0' type=dtype('float32') shape=['batch', 3]
output: name='cond#1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond#0,cond#1
Cos(x) -> cond#0
Sin(x) -> cond#1
output: name='cond#0' type=dtype('float32') shape=['batch', 3]
output: name='cond#1' type=dtype('float32') shape=['batch', 3]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
ControlFlowCondConstant#
code: yobx.torch.testing._model_eval_cases.ControlFlowCondConstant
forward#
def forward(self, x):
def true_fn(x):
return torch.sin(x) - torch.ones(x.shape, dtype=x.dtype, device=x.device)
def false_fn(x):
return torch.cos(x) + torch.ones((1, 1024), dtype=x.dtype, device=x.device)
return torch.cond(x.sum() > 0, true_fn, false_fn, [x])
yobx#
inputs:
#1[(T1s1024x1024,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 1024]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_1
Greater(sum_1, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 1024]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond#0
Constant(value=[1024]) -> init_2__1
Shape(x, start=0, end=1) -> shape__1
Concat(shape__1, init_2__1, axis=0) -> concat__1
ConstantOfShape(concat__1, value=[1.0]) -> ones__1_1
Sin(x) -> sin__1_0
Sub(sin__1_0, ones__1_1) -> cond#0
output: name='cond#0' type=dtype('float32') shape=['batch', 1024]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond#0
Constant(value=[[1.0, 1.0...) -> ones__2
Cos(x) -> cos__2_2
Add(cos__2_2, ones__2) -> cond#0
output: name='cond#0' type=dtype('float32') shape=['batch', 1024]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s1024x1024,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 1024]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_1
Greater(sum_1, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output
output: name='output' type=dtype('float32') shape=['batch^ConstantOfShape_dim0', 1024]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> condcc
Shape(x) -> size__1
ConstantOfShape(size__1, value=[1.0]) -> ones__1_1
Sin(x) -> sin__1_0
Sub(sin__1_0, ones__1_1) -> condcc
output: name='condcc' type=dtype('float32') shape=['batch^ConstantOfShape_dim0', 1024]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> condcc
Constant(value=[[1.0, 1.0...) -> ones__2
Cos(x) -> cos__2_2
Add(cos__2_2, ones__2) -> condcc
output: name='condcc' type=dtype('float32') shape=['batch', 1024]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#1[(T1s1024x1024,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 1024]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_default
Greater(sum_default, init) -> gt_scalar
If(gt_scalar, then_branch=G1, else_branch=G2) -> output
output: name='output' type=dtype('float32') shape=['batch^ConstantOfShape_dim0', 1024]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond
Shape(x) -> size__1
ConstantOfShape(size__1, value=[1.0]) -> ones__1_1
Sin(x) -> sin__1_0
Sub(sin__1_0, ones__1_1) -> cond
output: name='cond' type=dtype('float32') shape=['batch^ConstantOfShape_dim0', 1024]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond
Constant(value=[[1.0, 1.0...) -> ones__2
Cos(x) -> cos__2_2
Add(cos__2_2, ones__2) -> cond
output: name='cond' type=dtype('float32') shape=['batch', 1024]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
ControlFlowCondIdentity_153832#
code: yobx.torch.testing._model_eval_cases.ControlFlowCondIdentity_153832
forward#
def forward(self, x, y):
def branch_cond_then_1(x):
x = torch.abs(x) + 1
return x
def branch_cond_else_1(x):
return x # fails but succeeds with x.clone()
x = torch.cond(x.sum() > 0, branch_cond_then_1, branch_cond_else_1, [x])
return x + y
yobx#
FAILED
This higher order operator doesn't work unless it is captured completely with torch.compile. Got graph break/error:
Encountered aliasing during higher order op tracing
Higher Order Operator: torch.cond
Explanation: Higher order ops do not support aliasing. Found in cond
Hint: Replace `return input` with `return input.clone()` to avoid aliasing.
Hint: Consider using the debug context to change user code to avoid aliasing.
Hint: Please open an issue.
Developer debug context: Input-to-output aliasing detected at nodes l_args_3_0_ and l_args_3_0_ in
graph():
%l_args_3_0_ : torch._subclasses.fake_tensor.FakeTensor [num_users=1] = placeholder[target=l_args_3_0_]
return (l_args_3_0_,)
For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0040.html
from user code:
File "/opt/hostedtoolcache/Python/3.13.18/x64/lib/python3.13/site-packages/torch/_higher_order_ops/cond.py", line 241, in _cond_op_wrapper
return cond_op(*args, **kwargs)
~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.18/x64/lib/python3.13/site-packages/torch/_export/non_strict_utils.py", line 1397, in __torch_function__
return func(*args, **kwargs)
~~~~^^^^^^^^^^^^^^^^^
Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
This higher order operator doesn't work unless it is captured completely with torch.compile. Got graph break/error:
Encountered aliasing during higher order op tracing
Higher Order Operator: torch.cond
Explanation: Higher order ops do not support aliasing. Found in cond
Hint: Replace `return input` with `return input.clone()` to avoid aliasing.
Hint: Consider using the debug context to change user code to avoid aliasing.
Hint: Please open an issue.
Developer debug context: Input-to-output aliasing detected at nodes l_args_3_0_ and l_args_3_0_ in
graph():
%s85 : torch.SymInt [num_users=0] = placeholder[target=s85]
%s12 : torch.SymInt [num_users=0] = placeholder[target=s12]
%l_args_3_0_ : torch._subclasses.fake_tensor.FakeTensor [num_users=1] = placeholder[target=l_args_3_0_]
return (l_args_3_0_,)
For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0040.html
from user code:
File "/opt/hostedtoolcache/Python/3.13.18/x64/lib/python3.13/site-packages/torch/_higher_order_ops/cond.py", line 241, in _cond_op_wrapper
return cond_op(*args, **kwargs)
~~~~~~~^^^^^^^^^^^^^^^^^
Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"
new-tracing#
FAILED
This higher order operator doesn't work unless it is captured completely with torch.compile. Got graph break/error:
Encountered aliasing during higher order op tracing
Higher Order Operator: torch.cond
Explanation: Higher order ops do not support aliasing. Found in cond
Hint: Replace `return input` with `return input.clone()` to avoid aliasing.
Hint: Consider using the debug context to change user code to avoid aliasing.
Hint: Please open an issue.
Developer debug context: Input-to-output aliasing detected at nodes l_args_3_0_ and l_args_3_0_ in
graph():
%s85 : torch.SymInt [num_users=0] = placeholder[target=s85]
%s12 : torch.SymInt [num_users=0] = placeholder[target=s12]
%l_args_3_0_ : torch._subclasses.fake_tensor.FakeTensor [num_users=1] = placeholder[target=l_args_3_0_]
return (l_args_3_0_,)
For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0040.html
from user code:
File "/opt/hostedtoolcache/Python/3.13.18/x64/lib/python3.13/site-packages/torch/_higher_order_ops/cond.py", line 241, in _cond_op_wrapper
return cond_op(*args, **kwargs)
~~~~~~~^^^^^^^^^^^^^^^^^
Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"
ControlFlowCondNestedModule#
code: yobx.torch.testing._model_eval_cases.ControlFlowCondNestedModule
forward#
def forward(self, x):
def true_fn(x):
return self.submodule(x)
def false_fn(x):
return x - self.weight
y = torch.cond(x.sum() > 0, true_fn, false_fn, [x])
return y
yobx#
inputs:
#1[(T7s2,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions.0' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('int64') shape=['batch']
init: name='init' type=int64 shape=() -- array([0])
init: name='p_weight' type=float32 shape=(1,) -- array([42.], dtype=float32)
init: name='p_submodule_weight' type=float32 shape=(1,) -- array([100.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_1
Greater(sum_1, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output_0
output: name='output_0' type=dtype('float32') shape=['d_output_0_0']
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond#0
Abs(x) -> abs_1__1
ReduceSum(abs_1__1, keepdims=0) -> sum_1__1
Constant(value=100) -> init__1
Greater(sum_1__1, init__1) -> gt__1
If(gt__1, then_branch=G3, else_branch=G4) -> cond#0
output: name='cond#0' type=dtype('float32') shape=['d_output_0_0']
----- subgraph ---- If - cond__1 - att.then_branch=G3 -- level=2 -- -> cond#0__1
Cast(x, to=1) -> cast__2
Mul(cast__2, p_submodule_weight) -> cond#0__1
output: name='cond#0__1' type=dtype('float32') shape=['s77']
----- subgraph ---- If - cond__1 - att.else_branch=G4 -- level=2 -- -> cond#0__1_0
Cast(x, to=1) -> cast__3
Div(cast__3, p_submodule_weight) -> cond#0__1_0
output: name='cond#0__1_0' type=dtype('float32') shape=['s77']
----- subgraph ---- If - cond__1 - att.then_branch=G3 -- level=1 -- -> cond#0__1
Cast(x, to=1) -> cast__2
Mul(cast__2, p_submodule_weight) -> cond#0__1
output: name='cond#0__1' type=dtype('float32') shape=['s77']
----- subgraph ---- If - cond__1 - att.else_branch=G4 -- level=1 -- -> cond#0__1_0
Cast(x, to=1) -> cast__3
Div(cast__3, p_submodule_weight) -> cond#0__1_0
output: name='cond#0__1_0' type=dtype('float32') shape=['s77']
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond#0
Cast(x, to=1) -> cast__4
Sub(cast__4, p_weight) -> cond#0
output: name='cond#0' type=dtype('float32') shape=['batch']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='local_functions.0' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T7s2,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions.0' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('int64') shape=['batch']
init: name='init' type=int64 shape=() -- array([0])
ReduceSum(x, keepdims=0) -> sum_1
Greater(sum_1, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output
output: name='output' type=dtype('float32') shape=['batch']
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> condcc
Abs(x) -> abs_1__1
ReduceSum(abs_1__1, keepdims=0) -> sum_1__1
Constant(value=100) -> init__1
Greater(sum_1__1, init__1) -> gt__1
If(gt__1, then_branch=G3, else_branch=G4) -> condcc
output: name='condcc' type=dtype('float32') shape=['batch']
----- subgraph ---- If - cond__1 - att.then_branch=G3 -- level=2 -- -> condcc__1
Cast(x, to=1) -> cast__2
Constant(value=[100.0]) -> weight__2
Mul(cast__2, weight__2) -> condcc__1
output: name='condcc__1' type=dtype('float32') shape=['batch']
----- subgraph ---- If - cond__1 - att.else_branch=G4 -- level=2 -- -> condcc__1_0
Cast(x, to=1) -> cast__3
Constant(value=[100.0]) -> weight__3
Div(cast__3, weight__3) -> condcc__1_0
output: name='condcc__1_0' type=dtype('float32') shape=['batch']
----- subgraph ---- If - cond__1 - att.then_branch=G3 -- level=1 -- -> condcc__1
Cast(x, to=1) -> cast__2
Constant(value=[100.0]) -> weight__2
Mul(cast__2, weight__2) -> condcc__1
output: name='condcc__1' type=dtype('float32') shape=['batch']
----- subgraph ---- If - cond__1 - att.else_branch=G4 -- level=1 -- -> condcc__1_0
Cast(x, to=1) -> cast__3
Constant(value=[100.0]) -> weight__3
Div(cast__3, weight__3) -> condcc__1_0
output: name='condcc__1_0' type=dtype('float32') shape=['batch']
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> condcc
Cast(x, to=1) -> cast__4
Constant(value=[42.0]) -> weight__4
Sub(cast__4, weight__4) -> condcc
output: name='condcc' type=dtype('float32') shape=['batch']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='local_functions.0' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#1[(T7s2,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions.0' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('int64') shape=['batch']
init: name='init' type=int64 shape=() -- array([0])
ReduceSum(x, keepdims=0) -> sum_default
Greater(sum_default, init) -> gt_scalar
If(gt_scalar, then_branch=G1, else_branch=G2) -> output
output: name='output' type=dtype('float32') shape=['batch']
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond
Abs(x) -> abs_1__1
ReduceSum(abs_1__1, keepdims=0) -> sum_1__1
Constant(value=100) -> init__1
Greater(sum_1__1, init__1) -> gt__1
If(gt__1, then_branch=G3, else_branch=G4) -> cond
output: name='cond' type=dtype('float32') shape=['batch']
----- subgraph ---- If - cond__1 - att.then_branch=G3 -- level=2 -- -> condcc__1
Cast(x, to=1) -> cast__2
Constant(value=[100.0]) -> weight__2
Mul(cast__2, weight__2) -> condcc__1
output: name='condcc__1' type=dtype('float32') shape=['batch']
----- subgraph ---- If - cond__1 - att.else_branch=G4 -- level=2 -- -> condcc__1_0
Cast(x, to=1) -> cast__3
Constant(value=[100.0]) -> weight__3
Div(cast__3, weight__3) -> condcc__1_0
output: name='condcc__1_0' type=dtype('float32') shape=['batch']
----- subgraph ---- If - cond__1 - att.then_branch=G3 -- level=1 -- -> condcc__1
Cast(x, to=1) -> cast__2
Constant(value=[100.0]) -> weight__2
Mul(cast__2, weight__2) -> condcc__1
output: name='condcc__1' type=dtype('float32') shape=['batch']
----- subgraph ---- If - cond__1 - att.else_branch=G4 -- level=1 -- -> condcc__1_0
Cast(x, to=1) -> cast__3
Constant(value=[100.0]) -> weight__3
Div(cast__3, weight__3) -> condcc__1_0
output: name='condcc__1_0' type=dtype('float32') shape=['batch']
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond
Cast(x, to=1) -> cast__4
Constant(value=[42.0]) -> weight__4
Sub(cast__4, weight__4) -> cond
output: name='cond' type=dtype('float32') shape=['batch']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='local_functions.0' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
ControlFlowCondNonZero#
code: yobx.torch.testing._model_eval_cases.ControlFlowCondNonZero
forward#
def forward(self, input_ids, image_features, vocab_size):
def then_branch(input_ids, image_features, vocab_size):
input_shape = input_ids.size()
input_ids = input_ids.view(-1, input_shape[-1])
condition = (input_ids < 0) & (input_ids > -int(1e9))
positions = torch.nonzero(condition, as_tuple=True)
input_ids = input_ids.clamp_min(0).clamp_max(vocab_size)
return (input_ids, positions[0], positions[1])
def else_branch(input_ids, image_features, vocab_size):
r = torch.where(torch.zeros((1, 1), dtype=torch.bool))
return (input_ids, r[0], r[1])
a, b, c = torch.cond(
image_features.numel() > 0,
then_branch,
else_branch,
[input_ids, image_features, vocab_size],
)
return a, b, c
yobx#
FAILED
Expect operands to be a tuple of possibly nested dict/list/tuple that only consists of tensor leaves, but got [FakeTensor(..., size=(s72, 12), dtype=torch.int64), FakeTensor(..., size=(s28, s11)), 1025].
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T7s2x12,T1s2x16,int),(T7s2x12,T1s2x0,int)]shapes:
({0:Dim(batch)},{0:Dim(batch),1:Dim(seq_length)},None)
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='input_ids' type=dtype('int64') shape=['batch', 12]
input: name='image_features' type=dtype('float32') shape=['batch', 'seq_length']
input: name='vocab_size' type=dtype('int64') shape=[]
init: name='init' type=int64 shape=() -- array([0])
Size(image_features) -> numel
Greater(numel, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output_0, output_1, output_2
output: name='output_0' type=dtype('int64') shape=['12*batch/:getitem', 'getitem']
output: name='output_1' type=dtype('int64') shape=['NonZero_nonzero_2_nnz']
output: name='output_2' type=dtype('int64') shape=['NonZero_nonzero_2_nnz']
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> condcc#0,condcc#1,condcc#2
Constant(value=[0]) -> init_11__1
Clip(input_ids, init_11__1) -> clamp_min__1
Min(clamp_min__1, vocab_size) -> condcc#0
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes_1__1
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes_2__1
Constant(value=[0]) -> reshape__1
Less(input_ids, reshape__1) -> lt__1
Constant(value=[-10000000...) -> reshape_2__1
Greater(input_ids, reshape_2__1) -> gt__1
And(lt__1, gt__1) -> and___1
NonZero(and___1) -> nonzero_2__1
Split(nonzero_2__1, num_outputs=2) -> split__1, split_2__1
Squeeze(split__1, ShapeBasedReshapeIsSqueezePattern_axes_1__1) -> condcc#1
Squeeze(split_2__1, ShapeBasedReshapeIsSqueezePattern_axes_2__1) -> condcc#2
output: name='condcc#0' type=dtype('int64') shape=['12*batch/:getitem', 'getitem']
output: name='condcc#1' type=dtype('int64') shape=['NonZero_nonzero_2_nnz']
output: name='condcc#2' type=dtype('int64') shape=['NonZero_nonzero_2_nnz']
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> condcc#0,condcc#1,condcc#2
Constant(value=[]) -> condcc#1
Constant(value=[]) -> condcc#2
Identity(input_ids) -> condcc#0
output: name='condcc#0' type=dtype('int64') shape=['batch', 12]
output: name='condcc#1' type=dtype('int64') shape=[0]
output: name='condcc#2' type=dtype('int64') shape=[0]
new-tracing#
inputs:
#2[(T7s2x12,T1s2x16,int),(T7s2x12,T1s2x0,int)]shapes:
({0:Dim(batch)},{0:Dim(batch),1:Dim(seq_length)},None)
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='input_ids' type=dtype('int64') shape=['batch', 12]
input: name='image_features' type=dtype('float32') shape=['batch', 'seq_length']
init: name='init_3' type=int64 shape=() -- array([0])
init: name='cst_scalar_int' type=int64 shape=() -- array([1025])
Shape(image_features, start=0, end=1) -> shape
Squeeze(shape) -> sym_size_int
Shape(image_features, start=1, end=2) -> shape_2
Squeeze(shape_2) -> sym_size_int_1
Mul(sym_size_int, sym_size_int_1) -> mul_tensor
Greater(mul_tensor, init_3) -> gt_scalar
If(gt_scalar, then_branch=G1, else_branch=G2) -> output_0, output_1, output_2
output: name='output_0' type=dtype('int64') shape=['batch', 12]
output: name='output_1' type=dtype('int64') shape=['d_output_1_0']
output: name='output_2' type=dtype('int64') shape=['d_output_2_0']
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond#0,cond#1,cond#2
Constant(value=[0]) -> init_11__1
Clip(input_ids, init_11__1) -> clamp_min__1
Min(clamp_min__1, cst_scalar_int) -> cond#0
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes_1__1
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes_2__1
Constant(value=[0]) -> reshape__1
Less(input_ids, reshape__1) -> lt__1
Constant(value=[-10000000...) -> reshape_2__1
Greater(input_ids, reshape_2__1) -> gt__1
And(lt__1, gt__1) -> and___1
NonZero(and___1) -> nonzero_2__1
Split(nonzero_2__1, num_outputs=2) -> split__1, split_2__1
Squeeze(split__1, ShapeBasedReshapeIsSqueezePattern_axes_1__1) -> cond#1
Squeeze(split_2__1, ShapeBasedReshapeIsSqueezePattern_axes_2__1) -> cond#2
output: name='cond#0' type=dtype('int64') shape=['12*batch/:getitem', 'getitem']
output: name='cond#1' type=dtype('int64') shape=['NonZero_nonzero_2_nnz']
output: name='cond#2' type=dtype('int64') shape=['NonZero_nonzero_2_nnz']
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond#0,cond#1,cond#2
Constant(value=[]) -> cond#1
Constant(value=[]) -> cond#2
Identity(input_ids) -> cond#0
output: name='cond#0' type=dtype('int64') shape=['batch', 12]
output: name='cond#1' type=dtype('int64') shape=[0]
output: name='cond#2' type=dtype('int64') shape=[0]
ControlFlowIndirectRanks#
code: yobx.torch.testing._model_eval_cases.ControlFlowIndirectRanks
forward#
def forward(self, x):
x1 = x + 1
if x1.ndim == 2:
return x1.clone()
return x / x1.ndim
yobx#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='reshape' type=float32 shape=(1,) -- array([1.], dtype=float32)
Add(x, reshape) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 4]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='reshape' type=float32 shape=(1,) -- array([1.], dtype=float32)
Add(x, reshape) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='reshape' type=float32 shape=(1,) -- array([1.], dtype=float32)
Add(x, reshape) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
ControlFlowIndirectRanksCat#
code: yobx.torch.testing._model_eval_cases.ControlFlowIndirectRanksCat
forward#
def forward(self, x, y):
x1 = x + 1
y1 = y + 2
cat = torch.cat([x1, y1], dim=1)
if cat.ndim == 2:
return cat.clone()
return cat / cat.ndim
yobx#
inputs:
#2[(T1s3x4,T1s3x4),(T1s5x4,T1s5x2)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(batch),1:Dim(seq)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
input: name='y' type=dtype('float32') shape=['batch', 'seq']
init: name='reshape' type=float32 shape=(1,) -- array([1.], dtype=float32)
init: name='reshape_2' type=float32 shape=(1,) -- array([2.], dtype=float32)
Add(x, reshape) -> add
Add(y, reshape_2) -> add_1
Concat(add, add_1, axis=1) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's94+4']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4,T1s3x4),(T1s5x4,T1s5x2)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(batch),1:Dim(seq)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
input: name='y' type=dtype('float32') shape=['batch', 'seq']
init: name='reshape' type=float32 shape=(1,) -- array([1.], dtype=float32)
init: name='reshape_2' type=float32 shape=(1,) -- array([2.], dtype=float32)
Add(x, reshape) -> add_2
Add(y, reshape_2) -> add_5
Concat(add_2, add_5, axis=1) -> output
output: name='output' type=dtype('float32') shape=['batch', 'seq+4']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#2[(T1s3x4,T1s3x4),(T1s5x4,T1s5x2)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(batch),1:Dim(seq)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
input: name='y' type=dtype('float32') shape=['batch', 'seq']
init: name='reshape' type=float32 shape=(1,) -- array([1.], dtype=float32)
init: name='reshape_2' type=float32 shape=(1,) -- array([2.], dtype=float32)
Add(x, reshape) -> add_tensor
Add(y, reshape_2) -> add_tensor_1
Concat(add_tensor, add_tensor_1, axis=1) -> output
output: name='output' type=dtype('float32') shape=['batch', 'seq+4']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
ControlFlowNestCond#
code: yobx.torch.testing._model_eval_cases.ControlFlowNestCond
forward#
def forward(self, x):
def true_fn2(x):
def true_fn1(x):
return torch.sin(x)
def false_fn1(x):
return torch.cos(x)
return torch.cond(x.sum() < 0, true_fn1, false_fn1, [x])
def false_fn2(x):
return -x
return torch.cond(x.sum() > 0, true_fn2, false_fn2, [x])
yobx#
inputs:
#1[(T1s5x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions.0' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_1
Greater(sum_1, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 3]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond#0
Constant(value=0.0) -> init__1
ReduceSum(x, keepdims=0) -> sum_1__1
Less(sum_1__1, init__1) -> lt__1
If(lt__1, then_branch=G3, else_branch=G4) -> cond#0
output: name='cond#0' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond__1 - att.then_branch=G3 -- level=2 -- -> cond#0__1
Sin(x) -> cond#0__1
output: name='cond#0__1' type=dtype('float32') shape=['s77', 3]
----- subgraph ---- If - cond__1 - att.else_branch=G4 -- level=2 -- -> cond#0__1_0
Cos(x) -> cond#0__1_0
output: name='cond#0__1_0' type=dtype('float32') shape=['s77', 3]
----- subgraph ---- If - cond__1 - att.then_branch=G3 -- level=1 -- -> cond#0__1
Sin(x) -> cond#0__1
output: name='cond#0__1' type=dtype('float32') shape=['s77', 3]
----- subgraph ---- If - cond__1 - att.else_branch=G4 -- level=1 -- -> cond#0__1_0
Cos(x) -> cond#0__1_0
output: name='cond#0__1_0' type=dtype('float32') shape=['s77', 3]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond#0
Neg(x) -> cond#0
output: name='cond#0' type=dtype('float32') shape=['batch', 3]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='local_functions.0' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s5x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions.0' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_1
Greater(sum_1, init) -> gt
If(gt, then_branch=G1, else_branch=G2) -> output
output: name='output' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> condcc
Constant(value=0.0) -> init__1
ReduceSum(x, keepdims=0) -> sum_1__1
Less(sum_1__1, init__1) -> lt__1
If(lt__1, then_branch=G3, else_branch=G4) -> condcc
output: name='condcc' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond__1 - att.then_branch=G3 -- level=2 -- -> condcc__1
Sin(x) -> condcc__1
output: name='condcc__1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond__1 - att.else_branch=G4 -- level=2 -- -> condcc__1_0
Cos(x) -> condcc__1_0
output: name='condcc__1_0' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond__1 - att.then_branch=G3 -- level=1 -- -> condcc__1
Sin(x) -> condcc__1
output: name='condcc__1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond__1 - att.else_branch=G4 -- level=1 -- -> condcc__1_0
Cos(x) -> condcc__1_0
output: name='condcc__1_0' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> condcc
Neg(x) -> condcc
output: name='condcc' type=dtype('float32') shape=['batch', 3]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='local_functions.0' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#1[(T1s5x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions.0' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
ReduceSum(x, keepdims=0) -> sum_default
Greater(sum_default, init) -> gt_scalar
If(gt_scalar, then_branch=G1, else_branch=G2) -> output
output: name='output' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.then_branch=G1 -- level=1 -- -> cond
Constant(value=0.0) -> init__1
ReduceSum(x, keepdims=0) -> sum_1__1
Less(sum_1__1, init__1) -> lt__1
If(lt__1, then_branch=G3, else_branch=G4) -> cond
output: name='cond' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond__1 - att.then_branch=G3 -- level=2 -- -> condcc__1
Sin(x) -> condcc__1
output: name='condcc__1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond__1 - att.else_branch=G4 -- level=2 -- -> condcc__1_0
Cos(x) -> condcc__1_0
output: name='condcc__1_0' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond__1 - att.then_branch=G3 -- level=1 -- -> condcc__1
Sin(x) -> condcc__1
output: name='condcc__1' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond__1 - att.else_branch=G4 -- level=1 -- -> condcc__1_0
Cos(x) -> condcc__1_0
output: name='condcc__1_0' type=dtype('float32') shape=['batch', 3]
----- subgraph ---- If - cond - att.else_branch=G2 -- level=1 -- -> cond
Neg(x) -> cond
output: name='cond' type=dtype('float32') shape=['batch', 3]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='local_functions.0' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
ControlFlowNumelZero1#
code: yobx.torch.testing._model_eval_cases.ControlFlowNumelZero1
forward#
def forward(self, x):
def empty_cache(x):
return x.shape[-2]
size = (empty_cache(x), 1)
return torch.full(size, fill_value=2)
yobx#
inputs:
#3[(T1s3x2x2x5,),(T1s3x2x1x5,),(T1s3x2x0x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s77', 2, 's53', 5]
init: name='init_2' type=int64 shape=(1,) -- array([1])
Shape(x, start=2, end=3) -> shape
Concat(shape, init_2, axis=0) -> concat
ConstantOfShape(concat, value=[2]) -> output_0
output: name='output_0' type=dtype('int64') shape=['s53', 1]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#3[(T1s3x2x2x5,),(T1s3x2x1x5,),(T1s3x2x0x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s26', 2, 's36', 5]
init: name='init_10' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--getitemB_index_5_starts' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--getitemB_index_5_ends' type=int64 shape=(1,) -- array([3])
init: name='GatherToSlicePattern--getitemB_index_5_axes' type=int64 shape=(1,) -- array([0])
Shape(x) -> size
Slice(size, GatherToSlicePattern--getitemB_index_5_starts, GatherToSlicePattern--getitemB_index_5_ends, GatherToSlicePattern--getitemB_index_5_axes) -> gather_3
Concat(gather_3, init_10, axis=0) -> concat
ConstantOfShape(concat, value=[2]) -> output
output: name='output' type=dtype('int64') shape=['getitem_2', 1]
new-tracing#
inputs:
#3[(T1s3x2x2x5,),(T1s3x2x1x5,),(T1s3x2x0x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['_dyn_5', 2, '_dyn_6', 5]
init: name='init_2' type=int64 shape=(1,) -- array([1])
Shape(x, start=2, end=3) -> shape
Concat(shape, init_2, axis=0) -> concat
ConstantOfShape(concat, value=[2]) -> output
output: name='output' type=dtype('int64') shape=['_dyn_6', 1]
ControlFlowNumelZero2#
code: yobx.torch.testing._model_eval_cases.ControlFlowNumelZero2
forward#
def forward(self, x):
def empty_cache(x):
torch._check(x.numel() != 0)
if x.numel() == 0:
return 0
return x.shape[-2]
size = (empty_cache(x), 1)
return torch.full(size, fill_value=2)
yobx#
inputs:
#2[(T1s3x2x2x5,),(T1s3x2x1x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s77', 2, 's53', 5]
init: name='init_2' type=int64 shape=(1,) -- array([1])
Shape(x, start=2, end=3) -> shape
Concat(shape, init_2, axis=0) -> concat
ConstantOfShape(concat, value=[2]) -> output_0
output: name='output_0' type=dtype('int64') shape=['s53', 1]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x2x2x5,),(T1s3x2x1x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s26', 2, 's36', 5]
init: name='init_10' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--getitemB_index_5_starts' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--getitemB_index_5_ends' type=int64 shape=(1,) -- array([3])
init: name='GatherToSlicePattern--getitemB_index_5_axes' type=int64 shape=(1,) -- array([0])
Shape(x) -> size
Slice(size, GatherToSlicePattern--getitemB_index_5_starts, GatherToSlicePattern--getitemB_index_5_ends, GatherToSlicePattern--getitemB_index_5_axes) -> gather_3
Concat(gather_3, init_10, axis=0) -> concat
ConstantOfShape(concat, value=[2]) -> output
output: name='output' type=dtype('int64') shape=['getitem_2', 1]
new-tracing#
inputs:
#2[(T1s3x2x2x5,),(T1s3x2x1x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['_dyn_7', 2, '_dyn_8', 5]
init: name='init_2' type=int64 shape=(1,) -- array([1])
Shape(x, start=2, end=3) -> shape
Concat(shape, init_2, axis=0) -> concat
ConstantOfShape(concat, value=[2]) -> output
output: name='output' type=dtype('int64') shape=['_dyn_8', 1]
ControlFlowNumelZero3#
code: yobx.torch.testing._model_eval_cases.ControlFlowNumelZero3
forward#
def forward(self, x):
def empty_cache(x):
torch._check(x.shape[0] > 0)
torch._check(x.shape[2] > 0)
if x.numel() == 0:
return 0
return x.shape[-2]
size = (empty_cache(x), 1)
return torch.full(size, fill_value=2)
yobx#
inputs:
#2[(T1s3x2x2x5,),(T1s3x2x1x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s77', 2, 's53', 5]
init: name='init_2' type=int64 shape=(1,) -- array([1])
Shape(x, start=2, end=3) -> shape
Concat(shape, init_2, axis=0) -> concat
ConstantOfShape(concat, value=[2]) -> output_0
output: name='output_0' type=dtype('int64') shape=['s53', 1]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x2x2x5,),(T1s3x2x1x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s26', 2, 's36', 5]
init: name='init_22' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--getitemB_index_17_starts' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--getitemB_index_17_ends' type=int64 shape=(1,) -- array([3])
init: name='GatherToSlicePattern--getitemB_index_17_axes' type=int64 shape=(1,) -- array([0])
Shape(x) -> size_2
Slice(size_2, GatherToSlicePattern--getitemB_index_17_starts, GatherToSlicePattern--getitemB_index_17_ends, GatherToSlicePattern--getitemB_index_17_axes) -> gather_9
Concat(gather_9, init_22, axis=0) -> concat
ConstantOfShape(concat, value=[2]) -> output
output: name='output' type=dtype('int64') shape=['getitem_10', 1]
new-tracing#
inputs:
#2[(T1s3x2x2x5,),(T1s3x2x1x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['_dyn_9', 2, '_dyn_10', 5]
init: name='init_2' type=int64 shape=(1,) -- array([1])
Shape(x, start=2, end=3) -> shape
Concat(shape, init_2, axis=0) -> concat
ConstantOfShape(concat, value=[2]) -> output
output: name='output' type=dtype('int64') shape=['_dyn_10', 1]
ControlFlowNumelZero4#
code: yobx.torch.testing._model_eval_cases.ControlFlowNumelZero4
forward#
def forward(self, x):
def empty_cache(x):
torch._check(x.shape[0] > 0 and x.shape[2] > 0)
if x.numel() == 0:
return 0
return x.shape[-2]
size = (empty_cache(x), 1)
return torch.full(size, fill_value=2)
yobx#
inputs:
#2[(T1s3x2x2x5,),(T1s3x2x1x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s77', 2, 's53', 5]
init: name='init_2' type=int64 shape=(1,) -- array([1])
Shape(x, start=2, end=3) -> shape
Concat(shape, init_2, axis=0) -> concat
ConstantOfShape(concat, value=[2]) -> output_0
output: name='output_0' type=dtype('int64') shape=['s53', 1]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x2x2x5,),(T1s3x2x1x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s26', 2, 's36', 5]
init: name='init_22' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--getitemB_index_17_starts' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--getitemB_index_17_ends' type=int64 shape=(1,) -- array([3])
init: name='GatherToSlicePattern--getitemB_index_17_axes' type=int64 shape=(1,) -- array([0])
Shape(x) -> size_2
Slice(size_2, GatherToSlicePattern--getitemB_index_17_starts, GatherToSlicePattern--getitemB_index_17_ends, GatherToSlicePattern--getitemB_index_17_axes) -> gather_9
Concat(gather_9, init_22, axis=0) -> concat
ConstantOfShape(concat, value=[2]) -> output
output: name='output' type=dtype('int64') shape=['getitem_10', 1]
new-tracing#
inputs:
#2[(T1s3x2x2x5,),(T1s3x2x1x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['_dyn_11', 2, '_dyn_12', 5]
init: name='init_2' type=int64 shape=(1,) -- array([1])
Shape(x, start=2, end=3) -> shape
Concat(shape, init_2, axis=0) -> concat
ConstantOfShape(concat, value=[2]) -> output
output: name='output' type=dtype('int64') shape=['_dyn_12', 1]
ControlFlowNumelZero5#
code: yobx.torch.testing._model_eval_cases.ControlFlowNumelZero5
forward#
def forward(self, x):
def empty_cache(x):
torch._check(x.numel() != 0)
if x.shape[0] != 0 and x.shape[2] != 0:
return 0
return x.shape[-2]
size = (empty_cache(x), 1)
return torch.full(size, fill_value=2)
yobx#
inputs:
#2[(T1s3x2x2x5,),(T1s3x2x1x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s77', 2, 's53', 5]
init: name='output_0' type=int64 shape=(0, 1) -- array([], dtype=int64)
output: name='output_0' type=dtype('int64') shape=[0, 1]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x2x2x5,),(T1s3x2x1x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s26', 2, 's36', 5]
init: name='output' type=int64 shape=(0, 1) -- array([], dtype=int64)
output: name='output' type=dtype('int64') shape=[0, 1]
new-tracing#
inputs:
#2[(T1s3x2x2x5,),(T1s3x2x1x5,)]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['_dyn_13', 2, '_dyn_14', 5]
init: name='output' type=int64 shape=(0, 1) -- array([], dtype=int64)
output: name='output' type=dtype('int64') shape=[0, 1]
ControlFlowRanks#
code: yobx.torch.testing._model_eval_cases.ControlFlowRanks
forward#
def forward(self, x):
if x.ndim == 2:
return x.clone()
return x / x.ndim
yobx#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
Identity(x) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 4]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
Identity(x) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
new-tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
Identity(x) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
ControlFlowRanksType#
code: yobx.torch.testing._model_eval_cases.ControlFlowRanksType
forward#
def forward(self, x=None):
if (
x is not None
and (x.dtype == torch.float32 or x.dtype == torch.float16)
and x.ndim == 2
):
return x.clone()
torch._check(x is not None)
return (x / x.ndim).to(torch.float32) # type: ignore
yobx#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
Identity(x) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 4]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
Identity(x) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
new-tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
Identity(x) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
ControlFlowScan#
code: yobx.torch.testing._model_eval_cases.ControlFlowScan
forward#
def forward(self, x):
def add(carry: torch.Tensor, y: torch.Tensor):
next_carry = carry + y
return [next_carry, next_carry]
init = x.new_zeros(x.shape[1:])
carry, _out = torch.ops.higher_order.scan(add, [init], [x], additional_inputs=[])
return carry
yobx#
inputs:
#1[(T1s3x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='new_zeros' type=float32 shape=(3,) -- array([0., 0., 0.], dtype=float32)
Scan(new_zeros, x, body=G1, num_scan_inputs=1, scan_input_directions=[0], scan_output_axes=[0], scan_output_directions=[0]) -> output_0, scan#1
output: name='output_0' type=dtype('float32') shape=['d_output_0_0']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_new_zeros,scan_0_x -> output_0,output_1
input: name='init_0_new_zeros' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
Add(init_0_new_zeros, scan_0_x) -> add__1
Identity(add__1) -> output_0
Identity(add__1) -> output_1
output: name='output_0' type=dtype('float32') shape=[3]
output: name='output_1' type=dtype('float32') shape=[3]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s3x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='new_zeros' type=float32 shape=(3,) -- array([0., 0., 0.], dtype=float32)
Scan(new_zeros, x, body=G1, num_scan_inputs=1, scan_input_directions=[0], scan_output_axes=[0], scan_output_directions=[0]) -> output, scancc#1
output: name='output' type=dtype('float32') shape=[3]
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_new_zeros,scan_0_x -> output_0,output_1
input: name='init_0_new_zeros' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
Add(init_0_new_zeros, scan_0_x) -> add__1_0
Identity(add__1_0) -> output_0
Identity(add__1_0) -> output_1
output: name='output_0' type=dtype('float32') shape=[3]
output: name='output_1' type=dtype('float32') shape=[3]
new-tracing#
inputs:
#1[(T1s3x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='new_zeros_default' type=float32 shape=(3,) -- array([0., 0., 0.], dtype=float32)
Scan(new_zeros_default, x, body=G1, num_scan_inputs=1, scan_input_directions=[0], scan_output_axes=[0], scan_output_directions=[0]) -> output, scan#1
output: name='output' type=dtype('float32') shape=['d_output_0']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_new_zeros_default,scan_0_x -> output_0,output_1
input: name='init_0_new_zeros_default' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
Add(init_0_new_zeros_default, scan_0_x) -> add_tensor__1
Identity(add_tensor__1) -> output_0
Identity(add_tensor__1) -> output_1
output: name='output_0' type=dtype('float32') shape=[3]
output: name='output_1' type=dtype('float32') shape=[3]
ControlFlowScan2Carried#
code: yobx.torch.testing._model_eval_cases.ControlFlowScan2Carried
forward#
def forward(self, x):
def add(carry1: torch.Tensor, carry2: torch.Tensor, y1: torch.Tensor, y2: torch.Tensor):
next_carry1 = carry1 + y1
next_carry2 = carry2 * y2
return [next_carry1, next_carry2, next_carry1, next_carry2]
init1 = torch.zeros_like(x[0])
init2 = torch.ones_like(x[0])
carry1, carry2, out1, out2 = torch.ops.higher_order.scan(
add,
[init1, init2],
[x, x * 2],
# dim=0, # 01/31/2025, not supported anymore
additional_inputs=[],
)
return carry1, carry2, out1, out2
yobx#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='reshape' type=float32 shape=(1,) -- array([2.], dtype=float32)
init: name='zeros_like' type=float32 shape=(4,) -- array([0., 0., 0., 0.], dtype=float32)
init: name='ones_like' type=float32 shape=(4,) -- array([1., 1., 1., 1.], dtype=float32)
Mul(x, reshape) -> mul_2
Scan(zeros_like, ones_like, x, mul_2, body=G1, num_scan_inputs=2, scan_input_directions=[0,0], scan_output_axes=[0,0], scan_output_directions=[0,0]) -> output_0, output_1, output_2, output_3
output: name='output_0' type=dtype('float32') shape=['d_output_0_0']
output: name='output_1' type=dtype('float32') shape=['d_output_1_0']
output: name='output_2' type=dtype('float32') shape=['s77', 4]
output: name='output_3' type=dtype('float32') shape=['s77', 4]
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_zeros_like,init_1_ones_like,scan_0_x,scan_1_mul -> output_0,output_1,output_2,output_3
input: name='init_0_zeros_like' type=dtype('float32') shape=None
input: name='init_1_ones_like' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
input: name='scan_1_mul' type=dtype('float32') shape=None
Add(init_0_zeros_like, scan_0_x) -> add__1
Identity(add__1) -> output_0
Mul(init_1_ones_like, scan_1_mul) -> mul__1
Identity(mul__1) -> output_1
Identity(add__1) -> output_2
Identity(mul__1) -> output_3
output: name='output_0' type=dtype('float32') shape=[4]
output: name='output_1' type=dtype('float32') shape=[4]
output: name='output_2' type=dtype('float32') shape=[4]
output: name='output_3' type=dtype('float32') shape=[4]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='reshape' type=float32 shape=(1,) -- array([2.], dtype=float32)
init: name='zeros_like' type=float32 shape=(4,) -- array([0., 0., 0., 0.], dtype=float32)
init: name='ones_like' type=float32 shape=(4,) -- array([1., 1., 1., 1.], dtype=float32)
Mul(x, reshape) -> mul_2
Scan(zeros_like, ones_like, x, mul_2, body=G1, num_scan_inputs=2, scan_input_directions=[0,0], scan_output_axes=[0,0], scan_output_directions=[0,0]) -> output_0, output_1, output_2, output_3
output: name='output_0' type=dtype('float32') shape=[4]
output: name='output_1' type=dtype('float32') shape=[4]
output: name='output_2' type=dtype('float32') shape=['d_output_2_0', 'd_output_2_1']
output: name='output_3' type=dtype('float32') shape=['d_output_3_0', 'd_output_3_1']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_zeros_like,init_1_ones_like,scan_0_x,scan_1_mul -> output_0,output_1,output_2,output_3
input: name='init_0_zeros_like' type=dtype('float32') shape=None
input: name='init_1_ones_like' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
input: name='scan_1_mul' type=dtype('float32') shape=None
Add(init_0_zeros_like, scan_0_x) -> add__1_0
Identity(add__1_0) -> output_0
Mul(init_1_ones_like, scan_1_mul) -> mul__1_1
Identity(mul__1_1) -> output_1
Identity(add__1_0) -> output_2
Identity(mul__1_1) -> output_3
output: name='output_0' type=dtype('float32') shape=[4]
output: name='output_1' type=dtype('float32') shape=[4]
output: name='output_2' type=dtype('float32') shape=[4]
output: name='output_3' type=dtype('float32') shape=[4]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='reshape' type=float32 shape=(1,) -- array([2.], dtype=float32)
init: name='detach_default' type=float32 shape=(4,) -- array([0., 0., 0., 0.], dtype=float32)
init: name='detach_default_1' type=float32 shape=(4,) -- array([1., 1., 1., 1.], dtype=float32)
Mul(x, reshape) -> mul
Scan(detach_default, detach_default_1, x, mul, body=G1, num_scan_inputs=2, scan_input_directions=[0,0], scan_output_axes=[0,0], scan_output_directions=[0,0]) -> output_0, output_1, output_2, output_3
output: name='output_0' type=dtype('float32') shape=['d_output_0_0']
output: name='output_1' type=dtype('float32') shape=['d_output_1_0']
output: name='output_2' type=dtype('float32') shape=['batch', 4]
output: name='output_3' type=dtype('float32') shape=['batch', 4]
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_detach_default,init_1_detach_default_1,scan_0_x,scan_1_mul_tensor -> output_0,output_1,output_2,output_3
input: name='init_0_detach_default' type=dtype('float32') shape=None
input: name='init_1_detach_default_1' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
input: name='scan_1_mul_tensor' type=dtype('float32') shape=None
Add(init_0_detach_default, scan_0_x) -> add_tensor__1
Identity(add_tensor__1) -> output_0
Mul(init_1_detach_default_1, scan_1_mul_tensor) -> mul_tensor__1
Identity(mul_tensor__1) -> output_1
Identity(add_tensor__1) -> output_2
Identity(mul_tensor__1) -> output_3
output: name='output_0' type=dtype('float32') shape=[4]
output: name='output_1' type=dtype('float32') shape=[4]
output: name='output_2' type=dtype('float32') shape=[4]
output: name='output_3' type=dtype('float32') shape=[4]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
ControlFlowScanCDist#
code: yobx.torch.testing._model_eval_cases.ControlFlowScanCDist
forward#
def forward(self, x):
def dist(carry: torch.Tensor, x: torch.Tensor):
sub = carry - x.reshape((1, -1))
sq = sub * sub
rd = sq.sum(dim=1) ** 0.5
# clone --> UnsupportedAliasMutationException:
# Combine_fn might be aliasing the input!
return [carry.clone(), rd]
_carry, out = torch.ops.higher_order.scan(
dist,
[x],
[x],
# dim=0, # 01/31/2025, not supported anymore
additional_inputs=[],
)
return out
yobx#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
Scan(x, x, body=G1, num_scan_inputs=1, scan_input_directions=[0], scan_output_axes=[0], scan_output_directions=[0]) -> scan#0, output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's77']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_x,scan_0_x -> output_0,output_1
input: name='init_0_x' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
Constant(value=[1]) -> init_2__1
Constant(value=0.5) -> init_3__1
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes__1
Unsqueeze(scan_0_x, ShapeBasedReshapeIsSqueezePattern_axes__1) -> reshape__1
Sub(init_0_x, reshape__1) -> sub__1
Mul(sub__1, sub__1) -> mul__1
ReduceSum(mul__1, init_2__1, keepdims=0) -> sum_1__1
Pow(sum_1__1, init_3__1) -> output_1
Identity(init_0_x) -> output_0
output: name='output_0' type=dtype('float32') shape=['batch', 4]
output: name='output_1' type=dtype('float32') shape=['batch']
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
Scan(x, x, body=G1, num_scan_inputs=1, scan_input_directions=[0], scan_output_axes=[0], scan_output_directions=[0]) -> scancc#0, output
output: name='output' type=dtype('float32') shape=['d_output_0', 'd_output_1']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_x,scan_0_x -> output_0,output_1
input: name='init_0_x' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
Constant(value=[1]) -> init_2__1
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes__1
Unsqueeze(scan_0_x, ShapeBasedReshapeIsSqueezePattern_axes__1) -> reshape__1
Sub(init_0_x, reshape__1) -> sub__1_0
Mul(sub__1_0, sub__1_0) -> mul__1_1
ReduceSum(mul__1_1, init_2__1, keepdims=0) -> sum_1__1
Sqrt(sum_1__1) -> output_1
Identity(init_0_x) -> output_0
output: name='output_0' type=dtype('float32') shape=['batch', 4]
output: name='output_1' type=dtype('float32') shape=['batch']
new-tracing#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
Scan(x, x, body=G1, num_scan_inputs=1, scan_input_directions=[0], scan_output_axes=[0], scan_output_directions=[0]) -> scan#0, output
output: name='output' type=dtype('float32') shape=['batch', 'batch']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_x,scan_0_x -> output_0,output_1
input: name='init_0_x' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
Constant(value=[1]) -> init_2__1
Constant(value=0.5) -> init_3__1
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes__1
Unsqueeze(scan_0_x, ShapeBasedReshapeIsSqueezePattern_axes__1) -> view_default__1
Sub(init_0_x, view_default__1) -> sub_tensor__1
Mul(sub_tensor__1, sub_tensor__1) -> mul_tensor__1
ReduceSum(mul_tensor__1, init_2__1, keepdims=0) -> sum_dim_int_list__1
Pow(sum_dim_int_list__1, init_3__1) -> output_1
Identity(init_0_x) -> output_0
output: name='output_0' type=dtype('float32') shape=['batch', 4]
output: name='output_1' type=dtype('float32') shape=['batch']
ControlFlowScanCDist2#
code: yobx.torch.testing._model_eval_cases.ControlFlowScanCDist2
forward#
def forward(self, x):
def dist(unused: torch.Tensor, x: torch.Tensor, samex: torch.Tensor):
sub = samex - x.reshape((1, -1))
sq = sub * sub
rd = torch.sqrt(sq.sum(dim=1))
# clone --> UnsupportedAliasMutationException:
# Combine_fn might be aliasing the input!
return [unused.clone(), rd]
z = torch.tensor([0], dtype=torch.float32)
y = x.clone()
out = torch.ops.higher_order.scan(
dist,
[z],
[x],
# dim=0, # 01/31/2025, not supported anymore
additional_inputs=[y],
)
return out[1]
yobx#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='detach_' type=float32 shape=(1,) -- array([0.], dtype=float32)
Scan(detach_, x, body=G1, num_scan_inputs=1, scan_input_directions=[0], scan_output_axes=[0], scan_output_directions=[0]) -> scan#0, output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's77']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_detach_,scan_0_x -> output_0,output_1
input: name='init_0_detach_' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
Constant(value=[1]) -> init_2__1
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes__1
Unsqueeze(scan_0_x, ShapeBasedReshapeIsSqueezePattern_axes__1) -> reshape__1
Sub(x, reshape__1) -> sub__1
Mul(sub__1, sub__1) -> mul__1
ReduceSum(mul__1, init_2__1, keepdims=0) -> sum_1__1
Sqrt(sum_1__1) -> output_1
Identity(init_0_detach_) -> output_0
output: name='output_0' type=dtype('float32') shape=[1]
output: name='output_1' type=dtype('float32') shape=['batch']
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='cst' type=float32 shape=(1,) -- array([0.], dtype=float32)
Scan(cst, x, body=G1, num_scan_inputs=1, scan_input_directions=[0], scan_output_axes=[0], scan_output_directions=[0]) -> scancc#0, output
output: name='output' type=dtype('float32') shape=['d_output_0', 'd_output_1']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_cst,scan_0_x -> output_0,output_1
input: name='init_0_cst' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
Constant(value=[1]) -> init_2__1
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes__1
Unsqueeze(scan_0_x, ShapeBasedReshapeIsSqueezePattern_axes__1) -> reshape__1
Sub(x, reshape__1) -> sub__1_0
Mul(sub__1_0, sub__1_0) -> mul__1_1
ReduceSum(mul__1_1, init_2__1, keepdims=0) -> sum_1__1
Sqrt(sum_1__1) -> output_1
Identity(init_0_cst) -> output_0
output: name='output_0' type=dtype('float32') shape=[1]
output: name='output_1' type=dtype('float32') shape=['batch']
new-tracing#
inputs:
#1[(T1s3x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='local_functions' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='cst' type=float32 shape=(1,) -- array([0.], dtype=float32)
Scan(cst, x, body=G1, num_scan_inputs=1, scan_input_directions=[0], scan_output_axes=[0], scan_output_directions=[0]) -> scan#0, output
output: name='output' type=dtype('float32') shape=['batch', 'batch']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_cst,scan_0_x -> output_0,output_1
input: name='init_0_cst' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
Constant(value=[1]) -> init_2__1
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes__1
Unsqueeze(scan_0_x, ShapeBasedReshapeIsSqueezePattern_axes__1) -> view_default__1
Sub(x, view_default__1) -> sub_tensor__1
Mul(sub_tensor__1, sub_tensor__1) -> mul_tensor__1
ReduceSum(mul_tensor__1, init_2__1, keepdims=0) -> sum_dim_int_list__1
Sqrt(sum_dim_int_list__1) -> output_1
Identity(init_0_cst) -> output_0
output: name='output_0' type=dtype('float32') shape=[1]
output: name='output_1' type=dtype('float32') shape=['batch']
ControlFlowScanCDistXY#
code: yobx.torch.testing._model_eval_cases.ControlFlowScanCDistXY
forward#
def forward(self, x, y):
def dist(y: torch.Tensor, scanned_x: torch.Tensor):
sub = y - scanned_x.reshape((1, -1))
sq = sub * sub
rd = torch.sqrt(sq.sum(dim=1))
# clone --> UnsupportedAliasMutationException:
# Combine_fn might be aliasing the input!
return [y.clone(), rd]
_carry, out = torch.ops.higher_order.scan(
dist,
[y],
[x],
# dim=0, # 01/31/2025, not supported anymore
additional_inputs=[],
)
return out
yobx#
inputs:
#2[(T1s3x4,T1s5x4),(T1s13x14,T1s15x14)]shapes:
dict(x:{0:Dim(x_rows),1:Dim(dim)},y:{0:Dim(y_rows),1:Dim(dim)})
opset: domain='local_functions' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['x_rows', 'dim']
input: name='y' type=dtype('float32') shape=['y_rows', 'dim']
Scan(y, x, body=G1, num_scan_inputs=1, scan_input_directions=[0], scan_output_axes=[0], scan_output_directions=[0]) -> scan#0, output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's17']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_y,scan_0_x -> output_0,output_1
input: name='init_0_y' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
Constant(value=[1]) -> init_2__1
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes__1
Unsqueeze(scan_0_x, ShapeBasedReshapeIsSqueezePattern_axes__1) -> reshape__1
Sub(init_0_y, reshape__1) -> sub__1
Mul(sub__1, sub__1) -> mul__1
ReduceSum(mul__1, init_2__1, keepdims=0) -> sum_1__1
Sqrt(sum_1__1) -> output_1
Identity(init_0_y) -> output_0
output: name='output_0' type=dtype('float32') shape=['y_rows', 'dim']
output: name='output_1' type=dtype('float32') shape=['y_rows']
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4,T1s5x4),(T1s13x14,T1s15x14)]shapes:
dict(x:{0:Dim(x_rows),1:Dim(dim)},y:{0:Dim(y_rows),1:Dim(dim)})
opset: domain='local_functions' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['x_rows', 'dim']
input: name='y' type=dtype('float32') shape=['y_rows', 'dim']
Scan(y, x, body=G1, num_scan_inputs=1, scan_input_directions=[0], scan_output_axes=[0], scan_output_directions=[0]) -> scancc#0, output
output: name='output' type=dtype('float32') shape=['d_output_0', 'd_output_1']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_y,scan_0_x -> output_0,output_1
input: name='init_0_y' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
Constant(value=[1]) -> init_2__1
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes__1
Unsqueeze(scan_0_x, ShapeBasedReshapeIsSqueezePattern_axes__1) -> reshape__1
Sub(init_0_y, reshape__1) -> sub__1_0
Mul(sub__1_0, sub__1_0) -> mul__1_1
ReduceSum(mul__1_1, init_2__1, keepdims=0) -> sum_1__1
Sqrt(sum_1__1) -> output_1
Identity(init_0_y) -> output_0
output: name='output_0' type=dtype('float32') shape=['y_rows', 'dim']
output: name='output_1' type=dtype('float32') shape=['y_rows']
new-tracing#
inputs:
#2[(T1s3x4,T1s5x4),(T1s13x14,T1s15x14)]shapes:
dict(x:{0:Dim(x_rows),1:Dim(dim)},y:{0:Dim(y_rows),1:Dim(dim)})
opset: domain='local_functions' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['x_rows', 'dim']
input: name='y' type=dtype('float32') shape=['y_rows', 'dim']
Scan(y, x, body=G1, num_scan_inputs=1, scan_input_directions=[0], scan_output_axes=[0], scan_output_directions=[0]) -> scan#0, output
output: name='output' type=dtype('float32') shape=['x_rows', 'y_rows']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- init_0_y,scan_0_x -> output_0,output_1
input: name='init_0_y' type=dtype('float32') shape=None
input: name='scan_0_x' type=dtype('float32') shape=None
Constant(value=[1]) -> init_2__1
Constant(value=[0]) -> ShapeBasedReshapeIsSqueezePattern_axes__1
Unsqueeze(scan_0_x, ShapeBasedReshapeIsSqueezePattern_axes__1) -> view_default__1
Sub(init_0_y, view_default__1) -> sub_tensor__1
Mul(sub_tensor__1, sub_tensor__1) -> mul_tensor__1
ReduceSum(mul_tensor__1, init_2__1, keepdims=0) -> sum_dim_int_list__1
Sqrt(sum_dim_int_list__1) -> output_1
Identity(init_0_y) -> output_0
output: name='output_0' type=dtype('float32') shape=['y_rows', 'dim']
output: name='output_1' type=dtype('float32') shape=['y_rows']
ControlFlowScanDecomposition_151564#
code: yobx.torch.testing._model_eval_cases.ControlFlowScanDecomposition_151564
forward#
def forward(self, images, position):
def dummy_loop(padded: torch.Tensor, pos: torch.Tensor):
copy = torch.zeros(padded.shape)
for i in range(pos.shape[0]):
p = pos[i]
copy[i, :p] = padded[i, :p]
return copy
def dummy_loop_with_scan(padded: torch.Tensor, pos: torch.Tensor):
def pad_row(padded, p):
row = torch.zeros((padded.shape[0],))
torch._check(p.item() > 0)
torch._check(p.item() < padded.shape[0])
# this check is not always true, we add it anyway to make this dimension >= 2
# and avoid raising an exception about dynamic dimension in {0, 1}
if torch.compiler.is_exporting():
torch._check(p.item() > 1)
row[: p.item()] = padded[: p.item()]
return (row,)
return torch.ops.higher_order.scan(pad_row, [], [padded, pos], [])
def select_when_exporting(f, f_scan):
return f_scan if torch.compiler.is_exporting() else f
return select_when_exporting(dummy_loop, dummy_loop_with_scan)(images, position)
yobx#
inputs:
#1[(T1s5x6,T7s5)]shapes:
dict(images:{0:DYNAMIC,1:DYNAMIC},position:{0:DYNAMIC})
opset: domain='aten' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='images' type=dtype('float32') shape=['s34', 's90']
input: name='position' type=dtype('int64') shape=['s71']
Scan(images, position, body=G1, num_scan_inputs=2, scan_input_directions=[0,0], scan_output_axes=[0], scan_output_directions=[0]) -> output_0
output: name='output_0' type=dtype('float32') shape=['s34', 's90']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- scan_0_images,scan_1_position -> output_0
input: name='scan_0_images' type=dtype('float32') shape=None
input: name='scan_1_position' type=dtype('int64') shape=None
Constant(value=[0]) -> init_2__1
Constant(value=[0]) -> init_3__1
Unsqueeze(scan_1_position, init_3__1) -> unsqueeze_2__1
Constant(value=[0]) -> init_4__1
Slice(scan_0_images, init_2__1, unsqueeze_2__1, init_4__1) -> slice_1__1
Shape(scan_0_images, start=0, end=1) -> shape__1
ConstantOfShape(shape__1, value=[0.0]) -> zeros__1
Shape(zeros__1) -> shape__2
Constant(value=[0]) -> init__2
Unsqueeze(scan_1_position, init__2) -> unsqueeze__2
Constant(value=[0]) -> init_2__2
Slice(zeros__1, unsqueeze__2, shape__2, init_2__2) -> slice__2
Concat(slice_1__1, slice__2, axis=0) -> output_0
output: name='output_0' type=dtype('float32') shape=['s90']
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s5x6,T7s5)]shapes:
dict(images:{0:DYNAMIC,1:DYNAMIC},position:{0:DYNAMIC})
opset: domain='aten' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='images' type=dtype('float32') shape=['s26', 's49']
input: name='position' type=dtype('int64') shape=['s93']
Scan(images, position, body=G1, num_scan_inputs=2, scan_input_directions=[0,0], scan_output_axes=[0], scan_output_directions=[0]) -> output
output: name='output' type=dtype('float32') shape=['d_output_0', 'd_output_1']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- scan_0_images,scan_1_position -> output_0
input: name='scan_0_images' type=dtype('float32') shape=None
input: name='scan_1_position' type=dtype('int64') shape=None
Constant(value=[0]) -> getitem_2_axis__1
Constant(value=[0]) -> init_6__1
Unsqueeze(scan_1_position, init_6__1) -> unsqueeze_2__1
Constant(value=[0]) -> getitem_2_start__1
Constant(value=[1]) -> getitem_2_step__1
Slice(scan_0_images, getitem_2_start__1, unsqueeze_2__1, getitem_2_axis__1, getitem_2_step__1) -> getitem_2__1
Shape(scan_0_images, start=0, end=1) -> gather__1
ConstantOfShape(gather__1, value=[0.0]) -> zeros__1
Shape(zeros__1) -> shape__2
Constant(value=[0]) -> init__2
Unsqueeze(scan_1_position, init__2) -> unsqueeze__2
Constant(value=[0]) -> init_2__2
Slice(zeros__1, unsqueeze__2, shape__2, init_2__2) -> slice__2
Concat(getitem_2__1, slice__2, axis=0) -> output_0
output: name='output_0' type=dtype('float32') shape=['getitem']
new-tracing#
inputs:
#1[(T1s5x6,T7s5)]shapes:
dict(images:{0:DYNAMIC,1:DYNAMIC},position:{0:DYNAMIC})
opset: domain='aten' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='images' type=dtype('float32') shape=['_dyn_15', '_dyn_16']
input: name='position' type=dtype('int64') shape=['_dyn_17']
Scan(images, position, body=G1, num_scan_inputs=2, scan_input_directions=[0,0], scan_output_axes=[0], scan_output_directions=[0]) -> output_0
output: name='output_0' type=dtype('float32') shape=['_dyn_15', '_dyn_16']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- scan_0_images,scan_1_position -> output_0
input: name='scan_0_images' type=dtype('float32') shape=None
input: name='scan_1_position' type=dtype('int64') shape=None
Constant(value=[0]) -> init_2__1
Constant(value=[0]) -> init_3__1
Unsqueeze(scan_1_position, init_3__1) -> unsqueeze_2__1
Constant(value=[0]) -> init_4__1
Slice(scan_0_images, init_2__1, unsqueeze_2__1, init_4__1) -> slice_tensor__1
Shape(scan_0_images, start=0, end=1) -> shape__1
ConstantOfShape(shape__1, value=[0.0]) -> zeros__1
Shape(zeros__1) -> shape__2
Constant(value=[0]) -> init__2
Unsqueeze(scan_1_position, init__2) -> unsqueeze__2
Constant(value=[0]) -> init_2__2
Slice(zeros__1, unsqueeze__2, shape__2, init_2__2) -> slice__2
Concat(slice_tensor__1, slice__2, axis=0) -> output_0
output: name='output_0' type=dtype('float32') shape=['_dyn_16']
ControlFlowScanInplace_153705#
code: yobx.torch.testing._model_eval_cases.ControlFlowScanInplace_153705
forward#
def forward(self, x, y):
def loop_body_1(z, iv, x, y):
z = z.clone()
i = iv.item()
z[i, :] = ((x[i, :] - y) ** 2).sum(dim=-1)
return [z, iv]
z = torch.empty((x.shape[0], y.shape[0]))
r = torch.ops.higher_order.scan(
loop_body_1, [z], [torch.arange(x.shape[0], dtype=torch.int64)], [x, y]
)
return r[0]
yobx#
FAILED
Unexpected type <class 'str'> for dim
OnnxLightGraphBuilder(opsets={'': 21}, inputs=['arg0_1', 'arg1_1', 'arg2_1', 'arg3_1'])
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
Unable to interpret function <class 'builtin_function_or_method'>: <built-in method empty of type object at 0x7c72aca5f820>, searched for ['transformers_empty', '_VariableFunctionsClass_empty', 'empty'] and attributes ['__qualname__', '__name__'], args=((getitem, getitem_2),), kwargs={}, dispatcher=None
OnnxLightGraphBuilder(opsets={'': 21}, inputs=['x', 'y']),
new-tracing#
FAILED
empty(): argument 'size' (position 1) must be tuple of ints, but found element of type TracingInt at pos 0
ControlFlowShapeCheck#
code: yobx.torch.testing._model_eval_cases.ControlFlowShapeCheck
forward#
def forward(self, x, y):
x1 = x + 1
y1 = y + 2
cat = torch.cat([x1, y1], dim=1)
torch._check(cat.shape[0] > 2)
if cat.shape[0] > 2:
return cat / cat.shape[0]
return cat / cat.ndim
yobx#
FAILED
Constraints violated (batch)! For more information, run with TORCH_LOGS="+dynamic".
- Not all values of batch = L['x'].size()[0] in the specified range satisfy the generated guard 3 <= L['x'].size()[0] and L['x'].size()[0] <= IntInfinity()
Suggested fixes:
batch = Dim('batch', min=3)
The error above occurred when calling torch.export.export. If you would like to view some more information about this error, and get a list of all other errors that may occur in your export call, you can replace your `export()` call with `draft_export()`.
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
symbolically traced variables cannot be used as inputs to control flow
new-tracing#
inputs:
#2[(T1s3x4,T1s3x4),(T1s5x4,T1s5x2)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(batch),1:Dim(seq)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
input: name='y' type=dtype('float32') shape=['batch', 'seq']
init: name='ShapeBasedReshapeIsSqueezePattern_axes_1' type=int64 shape=(1,) -- array([0])
init: name='reshape' type=float32 shape=(1,) -- array([1.], dtype=float32)
init: name='reshape_2' type=float32 shape=(1,) -- array([2.], dtype=float32)
Add(x, reshape) -> add_tensor
Add(y, reshape_2) -> add_tensor_1
Concat(add_tensor, add_tensor_1, axis=1) -> cat_default
Shape(cat_default, start=0, end=1) -> shape
Squeeze(shape) -> sym_size_int
Cast(sym_size_int, to=1) -> cast
Unsqueeze(cast, ShapeBasedReshapeIsSqueezePattern_axes_1) -> reshape_3
Div(cat_default, reshape_3) -> output
output: name='output' type=dtype('float32') shape=['batch', 'seq+4']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
ControlFlowWhile#
code: yobx.torch.testing._model_eval_cases.ControlFlowWhile
forward#
def forward(self, ci, a, b):
def cond_fn(i, x, y):
return i > 0
def body_fn(i, x, y):
z = x + y
return i - 1, z, y - z
return torch._higher_order_ops.while_loop(cond_fn, body_fn, [ci, a, b])
yobx#
FAILED
Found the following conflicts between user-specified ranges and inferred ranges from model tracing:
- Received user-specified dim hint Dim.DYNAMIC(min=None, max=None), but tracing inferred a static shape of 3 for dimension inputs[1].shape[1].
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
Expect carried_inputs to be a tuple of possibly nested dict/list/tuple that onlyconsists of tensor or int leaves, but got [CustomProxy(ci), CustomProxy(a), CustomProxy(b)].
new-tracing#
inputs:
#1[(T7s,T1s2x3,T1s2x3)]shapes:
({},{0:DYNAMIC,1:DYNAMIC},{0:DYNAMIC})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='ci' type=dtype('int64') shape=[]
input: name='a' type=dtype('float32') shape=['_dyn_22', '_dyn_23']
input: name='b' type=dtype('float32') shape=['_dyn_24', 3]
init: name='while_loop_int64_max' type=int64 shape=() -- array([9223372036854775807])
Constant(value=0) -> init__1
Greater(ci, init__1) -> while_loop_init_cond
Loop(while_loop_int64_max, while_loop_init_cond, ci, a, b, body=G1) -> output_0, output_1, output_2
output: name='output_0' type=dtype('int64') shape=[]
output: name='output_1' type=dtype('float32') shape=['_dyn_22', '_dyn_23']
output: name='output_2' type=dtype('float32') shape=['_dyn_24', 3]
----- subgraph ---- Loop - while_loop - att.body=G1 -- level=1 -- iter,cond_in,loop_in_0_ci,loop_in_1_a,loop_in_2_b -> while_cond_out,loop_out_0,loop_out_1,loop_out_2
input: name='iter' type=dtype('int64') shape=[]
input: name='cond_in' type=dtype('bool') shape=[]
input: name='loop_in_0_ci' type='NOTENSOR' shape=None
input: name='loop_in_1_a' type='NOTENSOR' shape=None
input: name='loop_in_2_b' type='NOTENSOR' shape=None
Add(loop_in_1_a, loop_in_2_b) -> add__2_0
Sub(loop_in_2_b, add__2_0) -> loop_out_2
Constant(value=1) -> init__2
Sub(loop_in_0_ci, init__2) -> loop_out_0
Identity(add__2_0) -> loop_out_1
Constant(value=0) -> init__3
Greater(loop_out_0, init__3) -> while_cond_out
output: name='while_cond_out' type='NOTENSOR' shape=None
output: name='loop_out_0' type='NOTENSOR' shape=None
output: name='loop_out_1' type='NOTENSOR' shape=None
output: name='loop_out_2' type='NOTENSOR' shape=None
ControlFlowWhileDec#
code: yobx.torch.testing._model_eval_cases.ControlFlowWhileDec
forward#
def forward(self, ci, a, b):
def cond_fn(i, x, y):
return i > 0
def body_fn(i, x, y):
return i - 1, x + y, y - x
return torch._higher_order_ops.while_loop(cond_fn, body_fn, [ci, a, b])
yobx#
FAILED
Found the following conflicts between user-specified ranges and inferred ranges from model tracing:
- Received user-specified dim hint Dim.DYNAMIC(min=None, max=None), but tracing inferred a static shape of 3 for dimension inputs[1].shape[1].
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
Expect carried_inputs to be a tuple of possibly nested dict/list/tuple that onlyconsists of tensor or int leaves, but got [CustomProxy(ci), CustomProxy(a), CustomProxy(b)].
new-tracing#
inputs:
#1[(T7s,T1s2x3,T1s2x3)]shapes:
({},{0:DYNAMIC,1:DYNAMIC},{0:DYNAMIC})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='ci' type=dtype('int64') shape=[]
input: name='a' type=dtype('float32') shape=['_dyn_25', '_dyn_26']
input: name='b' type=dtype('float32') shape=['_dyn_27', 3]
init: name='while_loop_int64_max' type=int64 shape=() -- array([9223372036854775807])
Constant(value=0) -> init__1
Greater(ci, init__1) -> while_loop_init_cond
Loop(while_loop_int64_max, while_loop_init_cond, ci, a, b, body=G1) -> output_0, output_1, output_2
output: name='output_0' type=dtype('int64') shape=[]
output: name='output_1' type=dtype('float32') shape=['_dyn_25', '_dyn_26']
output: name='output_2' type=dtype('float32') shape=['_dyn_27', 3]
----- subgraph ---- Loop - while_loop - att.body=G1 -- level=1 -- iter,cond_in,loop_in_0_ci,loop_in_1_a,loop_in_2_b -> while_cond_out,loop_out_0,loop_out_1,loop_out_2
input: name='iter' type=dtype('int64') shape=[]
input: name='cond_in' type=dtype('bool') shape=[]
input: name='loop_in_0_ci' type='NOTENSOR' shape=None
input: name='loop_in_1_a' type='NOTENSOR' shape=None
input: name='loop_in_2_b' type='NOTENSOR' shape=None
Add(loop_in_1_a, loop_in_2_b) -> loop_out_1
Constant(value=1) -> init__2
Sub(loop_in_0_ci, init__2) -> loop_out_0
Sub(loop_in_2_b, loop_in_1_a) -> loop_out_2
Constant(value=0) -> init__3
Greater(loop_out_0, init__3) -> while_cond_out
output: name='while_cond_out' type='NOTENSOR' shape=None
output: name='loop_out_0' type='NOTENSOR' shape=None
output: name='loop_out_1' type='NOTENSOR' shape=None
output: name='loop_out_2' type='NOTENSOR' shape=None
ControlFlowWhileInc#
code: yobx.torch.testing._model_eval_cases.ControlFlowWhileInc
forward#
def forward(self, ci, a, b):
def cond_fn(i, x, y):
return i < x.size(0)
def body_fn(i, x, y):
return i + 1, x + y, y - x
return torch._higher_order_ops.while_loop(cond_fn, body_fn, [ci, a, b])
yobx#
FAILED
Found the following conflicts between user-specified ranges and inferred ranges from model tracing:
- Received user-specified dim hint Dim.DYNAMIC(min=None, max=None), but tracing inferred a static shape of 3 for dimension inputs[1].shape[1].
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
Expect carried_inputs to be a tuple of possibly nested dict/list/tuple that onlyconsists of tensor or int leaves, but got [CustomProxy(ci), CustomProxy(a), CustomProxy(b)].
new-tracing#
inputs:
#1[(T7s,T1s2x3,T1s2x3)]shapes:
({},{0:DYNAMIC,1:DYNAMIC},{0:DYNAMIC})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='ci' type=dtype('int64') shape=[]
input: name='a' type=dtype('float32') shape=['_dyn_28', '_dyn_29']
input: name='b' type=dtype('float32') shape=['_dyn_30', 3]
init: name='while_loop_int64_max' type=int64 shape=() -- array([9223372036854775807])
Constant(value=[0]) -> init__1
Shape(a, start=0, end=1) -> shape__1
Squeeze(shape__1, init__1) -> size__1
Greater(size__1, ci) -> while_loop_init_cond
Loop(while_loop_int64_max, while_loop_init_cond, ci, a, b, body=G1) -> output_0, output_1, output_2
output: name='output_0' type=dtype('int64') shape=[]
output: name='output_1' type=dtype('float32') shape=['_dyn_28', '_dyn_29']
output: name='output_2' type=dtype('float32') shape=['_dyn_30', 3]
----- subgraph ---- Loop - while_loop - att.body=G1 -- level=1 -- iter,cond_in,loop_in_0_ci,loop_in_1_a,loop_in_2_b -> while_cond_out,loop_out_0,loop_out_1,loop_out_2
input: name='iter' type=dtype('int64') shape=[]
input: name='cond_in' type=dtype('bool') shape=[]
input: name='loop_in_0_ci' type='NOTENSOR' shape=None
input: name='loop_in_1_a' type='NOTENSOR' shape=None
input: name='loop_in_2_b' type='NOTENSOR' shape=None
Add(loop_in_1_a, loop_in_2_b) -> loop_out_1
Shape(loop_out_1, start=0, end=1) -> shape__3
Constant(value=1) -> init__2
Add(loop_in_0_ci, init__2) -> loop_out_0
Sub(loop_in_2_b, loop_in_1_a) -> loop_out_2
Constant(value=[0]) -> init__3
Squeeze(shape__3, init__3) -> size__3
Greater(size__3, loop_out_0) -> while_cond_out
output: name='while_cond_out' type='NOTENSOR' shape=None
output: name='loop_out_0' type='NOTENSOR' shape=None
output: name='loop_out_1' type='NOTENSOR' shape=None
output: name='loop_out_2' type='NOTENSOR' shape=None
CreateFromShape#
code: yobx.torch.testing._model_eval_cases.CreateFromShape
forward#
def forward(self, x):
y = torch.ones((x.shape[0], x.shape[1] + 1))
return y
yobx#
inputs:
#2[(T1s4x4,),(T1s5x5,)]shapes:
dict(x:{0:Dim(dx),1:Dim(dy)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['dx', 'dy']
init: name='init' type=int64 shape=() -- array([1])
init: name='init_5' type=int64 shape=(1,) -- array([0])
Shape(x, start=0, end=1) -> shape
Shape(x, start=1, end=2) -> shape_2
Squeeze(shape_2) -> sym_size_int_3
Add(sym_size_int_3, init) -> add_3
Unsqueeze(add_3, init_5) -> unsqueeze_2
Concat(shape, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[1.0]) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's27+1']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s4x4,),(T1s5x5,)]shapes:
dict(x:{0:Dim(dx),1:Dim(dy)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['dx', 'dy']
init: name='init_8' type=int64 shape=(1,) -- array([0])
init: name='init_9' type=int64 shape=() -- array([1])
init: name='init_13' type=int64 shape=(1,) -- array([0])
init: name='GatherToSlicePattern--getitemB_index_7_starts' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--getitemB_index_7_ends' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--getitemB_index_7_axes' type=int64 shape=(1,) -- array([0])
Shape(x) -> size_1
Slice(size_1, GatherToSlicePattern--getitemB_index_7_starts, GatherToSlicePattern--getitemB_index_7_ends, GatherToSlicePattern--getitemB_index_7_axes) -> gather_4
Squeeze(gather_4, init_8) -> getitem_3
Add(getitem_3, init_9) -> add_3
Unsqueeze(add_3, init_13) -> unsqueeze_2
Shape(x, start=0, end=1) -> gather
Concat(gather, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[1.0]) -> output
output: name='output' type=dtype('float32') shape=['getitem', 'add']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#2[(T1s4x4,),(T1s5x5,)]shapes:
dict(x:{0:Dim(dx),1:Dim(dy)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['dx', 'dy']
init: name='init_3' type=int64 shape=() -- array([1])
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='GatherShapePattern--Gather_axes' type=int64 shape=(1,) -- array([0])
Shape(x, start=1, end=2) -> GatherShapePattern--Gather_1d_0
Squeeze(GatherShapePattern--Gather_1d_0, GatherShapePattern--Gather_axes) -> dy
Add(dy, init_3) -> add
Unsqueeze(add, init_4) -> unsqueeze_2
Shape(x, start=0, end=1) -> shape
Concat(shape, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[1.0]) -> output
output: name='output' type=dtype('float32') shape=['dx', 'dy+1']
CreateFromShapeThroughFunction#
code: yobx.torch.testing._model_eval_cases.CreateFromShapeThroughFunction
forward#
def forward(self, x):
def add_one(dim):
return dim + 1
dy1 = add_one(x.shape[1])
y = torch.ones((x.shape[0], dy1))
return y
yobx#
inputs:
#1[(T1s4x4,)]shapes:
dict(x:{0:Dim(dx),1:Dim(dy)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['dx', 'dy']
init: name='init' type=int64 shape=() -- array([1])
init: name='init_5' type=int64 shape=(1,) -- array([0])
Shape(x, start=0, end=1) -> shape
Shape(x, start=1, end=2) -> shape_2
Squeeze(shape_2) -> sym_size_int_3
Add(sym_size_int_3, init) -> add_3
Unsqueeze(add_3, init_5) -> unsqueeze_2
Concat(shape, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[1.0]) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's27+1']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s4x4,)]shapes:
dict(x:{0:Dim(dx),1:Dim(dy)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['dx', 'dy']
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='init_5' type=int64 shape=() -- array([1])
init: name='init_13' type=int64 shape=(1,) -- array([0])
init: name='GatherToSlicePattern--getitemB_index_3_starts' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--getitemB_index_3_ends' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--getitemB_index_3_axes' type=int64 shape=(1,) -- array([0])
Shape(x) -> size
Slice(size, GatherToSlicePattern--getitemB_index_3_starts, GatherToSlicePattern--getitemB_index_3_ends, GatherToSlicePattern--getitemB_index_3_axes) -> gather_2
Squeeze(gather_2, init_4) -> getitem_1
Add(getitem_1, init_5) -> add_3
Unsqueeze(add_3, init_13) -> unsqueeze_2
Shape(x, start=0, end=1) -> gather_3
Concat(gather_3, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[1.0]) -> output
output: name='output' type=dtype('float32') shape=['getitem_2', 'add']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#1[(T1s4x4,)]shapes:
dict(x:{0:Dim(dx),1:Dim(dy)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['dx', 'dy']
init: name='init_3' type=int64 shape=() -- array([1])
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='GatherShapePattern--Gather_axes' type=int64 shape=(1,) -- array([0])
Shape(x, start=1, end=2) -> GatherShapePattern--Gather_1d_0
Squeeze(GatherShapePattern--Gather_1d_0, GatherShapePattern--Gather_axes) -> dy
Add(dy, init_3) -> add
Unsqueeze(add, init_4) -> unsqueeze_2
Shape(x, start=0, end=1) -> shape
Concat(shape, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[1.0]) -> output
output: name='output' type=dtype('float32') shape=['dx', 'dy+1']
CropLastDimensionWithTensorContent#
code: yobx.torch.testing._model_eval_cases.CropLastDimensionWithTensorContent
forward#
def forward(self, x, shape):
return x[..., : shape.item()]
yobx#
inputs:
#2[(T1s3x4x4,T7s1),(T1s6x4x4,T7s1)]shapes:
dict(x:{0:Dim(batch)},shape:{})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4, 4]
input: name='shape' type=dtype('int64') shape=[1]
init: name='init_2' type=int64 shape=(1,) -- array([0])
init: name='init_4' type=int64 shape=(1,) -- array([2])
Slice(x, init_2, shape, init_4) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 4, 'u1']
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4x4,T7s1),(T1s6x4x4,T7s1)]shapes:
dict(x:{0:Dim(batch)},shape:{})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4, 4]
input: name='shape' type=dtype('int64') shape=[1]
init: name='getitem_axis' type=int64 shape=(1,) -- array([-1])
init: name='getitem_start' type=int64 shape=(1,) -- array([0])
init: name='getitem_step' type=int64 shape=(1,) -- array([1])
Slice(x, getitem_start, shape, getitem_axis, getitem_step) -> output
output: name='output' type=dtype('float32') shape=['Slice_getitem_dim0', 'Slice_getitem_dim1', 'Slice_getitem_dim2']
new-tracing#
inputs:
#2[(T1s3x4x4,T7s1),(T1s6x4x4,T7s1)]shapes:
dict(x:{0:Dim(batch)},shape:{})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4, 4]
input: name='shape' type=dtype('int64') shape=[1]
init: name='init_2' type=int64 shape=(1,) -- array([0])
init: name='init_4' type=int64 shape=(1,) -- array([2])
Slice(x, init_2, shape, init_4) -> output
output: name='output' type=dtype('float32') shape=['batch', 4, '_item__local_scalar_dense_default']
CropLastDimensionWithTensorShape#
code: yobx.torch.testing._model_eval_cases.CropLastDimensionWithTensorShape
forward#
def forward(self, x, y):
return x[..., : y.shape[0]]
yobx#
inputs:
#2[(T1s3x4x4,T1s2),(T1s6x4x4,T1s3)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(crop)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4, 4]
input: name='y' type=dtype('float32') shape=['crop']
init: name='init' type=int64 shape=(1,) -- array([0])
init: name='init_3' type=int64 shape=(1,) -- array([2])
Shape(y, start=0, end=1) -> shape
Slice(x, init, shape, init_3) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 4, 's17']
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4x4,T1s2),(T1s6x4x4,T1s3)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(crop)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4, 4]
input: name='y' type=dtype('float32') shape=['crop']
init: name='getitem_1_axis' type=int64 shape=(1,) -- array([-1])
init: name='getitem_1_start' type=int64 shape=(1,) -- array([0])
init: name='getitem_1_step' type=int64 shape=(1,) -- array([1])
Shape(y, start=0, end=1) -> gather
Slice(x, getitem_1_start, gather, getitem_1_axis, getitem_1_step) -> output
output: name='output' type=dtype('float32') shape=['Slice_getitem_1_dim0', 'Slice_getitem_1_dim1', 'Slice_getitem_1_dim2']
new-tracing#
inputs:
#2[(T1s3x4x4,T1s2),(T1s6x4x4,T1s3)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(crop)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4, 4]
input: name='y' type=dtype('float32') shape=['crop']
init: name='init' type=int64 shape=(1,) -- array([0])
init: name='init_3' type=int64 shape=(1,) -- array([2])
Shape(y, start=0, end=1) -> shape
Slice(x, init, shape, init_3) -> output
output: name='output' type=dtype('float32') shape=['batch', 4, 'crop']
DynamicCacheInput#
code: yobx.torch.testing._model_eval_cases.DynamicCacheInput
forward#
def forward(self, x, cache):
"""Reduces each cache layer over dim 2 and returns (x, new_cache)."""
pairs = [
(layer.keys.mean(dim=2, keepdim=True), layer.values.mean(dim=2, keepdim=True))
for layer in cache.layers
]
return x, make_dynamic_cache(pairs)
yobx#
inputs:
#2[(T1s2x4x3x7,DynamicCache(key_cache=#2[T1s2x4x3x7,T1s2x4x3x7], value_cache=#2[T1s2x4x3x7,T1s2x4x3x7])),(T1s3x4x5x7,DynamicCache(key_cache=#2[T1s3x4x5x7,T1s3x4x5x7], value_cache=#2[T1s3x4x5x7,T1s3x4x5x7]))]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC},cache:#4[{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC,2:DYNAMIC}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s77', 4, 's53', 7]
input: name='cache_key_0' type=dtype('float32') shape=['s60', 4, 's15', 7]
input: name='cache_value_0' type=dtype('float32') shape=['s81', 4, 's59', 7]
input: name='cache_key_1' type=dtype('float32') shape=['s67', 4, 's73', 7]
input: name='cache_value_1' type=dtype('float32') shape=['s50', 4, 's46', 7]
init: name='init' type=int64 shape=(1,) -- array([2])
init: name='init_2' type=int64 shape=(1,) -- array([2])
init: name='init_3' type=int64 shape=(1,) -- array([2])
init: name='init_4' type=int64 shape=(1,) -- array([2])
Identity(x) -> output_0
ReduceMean(cache_key_0, init, keepdims=1) -> output_1
ReduceMean(cache_value_0, init_2, keepdims=1) -> output_2
ReduceMean(cache_key_1, init_3, keepdims=1) -> output_3
ReduceMean(cache_value_1, init_4, keepdims=1) -> output_4
output: name='output_0' type=dtype('float32') shape=['s77', 4, 's53', 7]
output: name='output_1' type=dtype('float32') shape=['s60', 4, 1, 7]
output: name='output_2' type=dtype('float32') shape=['s81', 4, 1, 7]
output: name='output_3' type=dtype('float32') shape=['s67', 4, 1, 7]
output: name='output_4' type=dtype('float32') shape=['s50', 4, 1, 7]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s2x4x3x7,DynamicCache(key_cache=#2[T1s2x4x3x7,T1s2x4x3x7], value_cache=#2[T1s2x4x3x7,T1s2x4x3x7])),(T1s3x4x5x7,DynamicCache(key_cache=#2[T1s3x4x5x7,T1s3x4x5x7], value_cache=#2[T1s3x4x5x7,T1s3x4x5x7]))]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC},cache:#4[{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC,2:DYNAMIC}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s26', 4, 's36', 7]
input: name='cache_0' type=dtype('float32') shape=['s53', 4, 's30', 7]
input: name='cache_1' type=dtype('float32') shape=['s45', 4, 's2', 7]
input: name='cache_2' type=dtype('float32') shape=['s82', 4, 's51', 7]
input: name='cache_3' type=dtype('float32') shape=['s1', 4, 's52', 7]
init: name='init' type=int64 shape=(1,) -- array([2])
init: name='init_2' type=int64 shape=(1,) -- array([2])
init: name='init_3' type=int64 shape=(1,) -- array([2])
init: name='init_4' type=int64 shape=(1,) -- array([2])
Identity(x) -> output_0
ReduceMean(cache_0, init, keepdims=1) -> output_1
ReduceMean(cache_1, init_2, keepdims=1) -> output_2
ReduceMean(cache_2, init_3, keepdims=1) -> output_3
ReduceMean(cache_3, init_4, keepdims=1) -> output_4
output: name='output_0' type=dtype('float32') shape=['s26', 4, 's36', 7]
output: name='output_1' type=dtype('float32') shape=['s53', 4, 1, 7]
output: name='output_2' type=dtype('float32') shape=['s45', 4, 1, 7]
output: name='output_3' type=dtype('float32') shape=['s82', 4, 1, 7]
output: name='output_4' type=dtype('float32') shape=['s1', 4, 1, 7]
new-tracing#
inputs:
#2[(T1s2x4x3x7,DynamicCache(key_cache=#2[T1s2x4x3x7,T1s2x4x3x7], value_cache=#2[T1s2x4x3x7,T1s2x4x3x7])),(T1s3x4x5x7,DynamicCache(key_cache=#2[T1s3x4x5x7,T1s3x4x5x7], value_cache=#2[T1s3x4x5x7,T1s3x4x5x7]))]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC},cache:#4[{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC,2:DYNAMIC}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['_dyn_31', 4, '_dyn_32', 7]
input: name='cache_0' type=dtype('float32') shape=['_dyn_33', 4, '_dyn_34', 7]
input: name='cache_1' type=dtype('float32') shape=['_dyn_35', 4, '_dyn_36', 7]
input: name='cache_2' type=dtype('float32') shape=['_dyn_37', 4, '_dyn_38', 7]
input: name='cache_3' type=dtype('float32') shape=['_dyn_39', 4, '_dyn_40', 7]
init: name='init' type=int64 shape=(1,) -- array([2])
init: name='init_2' type=int64 shape=(1,) -- array([2])
init: name='init_3' type=int64 shape=(1,) -- array([2])
init: name='init_4' type=int64 shape=(1,) -- array([2])
Identity(x) -> output_0
ReduceMean(cache_0, init, keepdims=1) -> output_1
ReduceMean(cache_1, init_2, keepdims=1) -> output_2
ReduceMean(cache_2, init_3, keepdims=1) -> output_3
ReduceMean(cache_3, init_4, keepdims=1) -> output_4
output: name='output_0' type=dtype('float32') shape=['_dyn_31', 4, '_dyn_32', 7]
output: name='output_1' type=dtype('float32') shape=['_dyn_33', 4, 1, 7]
output: name='output_2' type=dtype('float32') shape=['_dyn_35', 4, 1, 7]
output: name='output_3' type=dtype('float32') shape=['_dyn_37', 4, 1, 7]
output: name='output_4' type=dtype('float32') shape=['_dyn_39', 4, 1, 7]
DynamicCacheInputMixedLayers#
code: yobx.torch.testing._model_eval_cases.DynamicCacheInputMixedLayers
forward#
def forward(self, x, cache):
"""Reduces each cache layer over dim 2 and returns (x, new_cache)."""
cls_layers = [type(layer) for layer in cache.layers]
pairs = [
(layer.keys.mean(dim=2, keepdim=True), layer.values.mean(dim=2, keepdim=True))
for layer in cache.layers
]
return x, make_dynamic_cache(pairs, cls_layers=cls_layers)
yobx#
inputs:
#2[(T1s2x4x3x7,DynamicCache(DynamicLayer(T1s2x4x3x7, T1s2x4x3x7), DynamicSlidingWindowLayer(T1s2x4x3x7, T1s2x4x3x7))),(T1s3x4x5x7,DynamicCache(DynamicLayer(T1s3x4x5x7, T1s3x4x5x7), DynamicSlidingWindowLayer(T1s3x4x3x7, T1s3x4x3x7)))]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC},cache:#4[{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC},{0:DYNAMIC}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s77', 4, 's53', 7]
input: name='cache_key_d_0' type=dtype('float32') shape=['s63', 4, 's13', 7]
input: name='cache_value_d_0' type=dtype('float32') shape=['s41', 4, 's1', 7]
input: name='cache_key_w_1' type=dtype('float32') shape=['s99', 4, 3, 7]
input: name='cache_value_w_1' type=dtype('float32') shape=['s44', 4, 3, 7]
init: name='init' type=int64 shape=(1,) -- array([2])
init: name='init_2' type=int64 shape=(1,) -- array([2])
init: name='init_3' type=int64 shape=(1,) -- array([2])
init: name='init_4' type=int64 shape=(1,) -- array([2])
Identity(x) -> output_0
ReduceMean(cache_key_d_0, init, keepdims=1) -> output_1
ReduceMean(cache_value_d_0, init_2, keepdims=1) -> output_2
ReduceMean(cache_key_w_1, init_3, keepdims=1) -> output_3
ReduceMean(cache_value_w_1, init_4, keepdims=1) -> output_4
output: name='output_0' type=dtype('float32') shape=['s77', 4, 's53', 7]
output: name='output_1' type=dtype('float32') shape=['s63', 4, 1, 7]
output: name='output_2' type=dtype('float32') shape=['s41', 4, 1, 7]
output: name='output_3' type=dtype('float32') shape=['s99', 4, 1, 7]
output: name='output_4' type=dtype('float32') shape=['s44', 4, 1, 7]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
`__cuda_array_interface__` must be a dict
new-tracing#
inputs:
#2[(T1s2x4x3x7,DynamicCache(DynamicLayer(T1s2x4x3x7, T1s2x4x3x7), DynamicSlidingWindowLayer(T1s2x4x3x7, T1s2x4x3x7))),(T1s3x4x5x7,DynamicCache(DynamicLayer(T1s3x4x5x7, T1s3x4x5x7), DynamicSlidingWindowLayer(T1s3x4x3x7, T1s3x4x3x7)))]shapes:
dict(x:{0:DYNAMIC,2:DYNAMIC},cache:#4[{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC,2:DYNAMIC},{0:DYNAMIC},{0:DYNAMIC}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['_dyn_41', 4, '_dyn_42', 7]
input: name='cache_0' type=dtype('float32') shape=['_dyn_43', 4, '_dyn_44', 7]
input: name='cache_1' type=dtype('float32') shape=['_dyn_45', 4, '_dyn_46', 7]
input: name='cache_2' type=dtype('float32') shape=['_dyn_47', 4, 3, 7]
input: name='cache_3' type=dtype('float32') shape=['_dyn_48', 4, 3, 7]
init: name='init' type=int64 shape=(1,) -- array([2])
init: name='init_2' type=int64 shape=(1,) -- array([2])
init: name='init_3' type=int64 shape=(1,) -- array([2])
init: name='init_4' type=int64 shape=(1,) -- array([2])
Identity(x) -> output_0
ReduceMean(cache_0, init, keepdims=1) -> output_1
ReduceMean(cache_1, init_2, keepdims=1) -> output_2
ReduceMean(cache_2, init_3, keepdims=1) -> output_3
ReduceMean(cache_3, init_4, keepdims=1) -> output_4
output: name='output_0' type=dtype('float32') shape=['_dyn_41', 4, '_dyn_42', 7]
output: name='output_1' type=dtype('float32') shape=['_dyn_43', 4, 1, 7]
output: name='output_2' type=dtype('float32') shape=['_dyn_45', 4, 1, 7]
output: name='output_3' type=dtype('float32') shape=['_dyn_47', 4, 1, 7]
output: name='output_4' type=dtype('float32') shape=['_dyn_48', 4, 1, 7]
ExportWithDimension0#
code: yobx.torch.testing._model_eval_cases.ExportWithDimension0
forward#
def forward(self, x):
return x @ torch.arange(x.shape[1], dtype=torch.float32).reshape((-1, 1))
yobx#
inputs:
#1[(T1s0x3,)]shapes:
dict(x:{0:DYNAMIC,1:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s77', 's27']
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
init: name='init_2' type=float32 shape=() -- array([1.], dtype=float32)
init: name='ShapeBasedReshapeIsSqueezePattern_axes' type=int64 shape=(1,) -- array([1])
Shape(x, start=1, end=2) -> shape
Squeeze(shape) -> sym_size_int_2
Cast(sym_size_int_2, to=1) -> cast
Range(init, cast, init_2) -> arange
Unsqueeze(arange, ShapeBasedReshapeIsSqueezePattern_axes) -> reshape
MatMul(x, reshape) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 1]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s0x3,)]shapes:
dict(x:{0:DYNAMIC,1:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s26', 's49']
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='init_5' type=float32 shape=() -- array([0.], dtype=float32)
init: name='init_6' type=float32 shape=() -- array([1.], dtype=float32)
init: name='GatherToSlicePattern--getitemB_index_3_starts' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--getitemB_index_3_ends' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--getitemB_index_3_axes' type=int64 shape=(1,) -- array([0])
init: name='ShapeBasedReshapeIsSqueezePattern_axes' type=int64 shape=(1,) -- array([1])
Shape(x) -> size
Slice(size, GatherToSlicePattern--getitemB_index_3_starts, GatherToSlicePattern--getitemB_index_3_ends, GatherToSlicePattern--getitemB_index_3_axes) -> gather_2
Squeeze(gather_2, init_4) -> getitem_1
Cast(getitem_1, to=1) -> cast
Range(init_5, cast, init_6) -> arange
Unsqueeze(arange, ShapeBasedReshapeIsSqueezePattern_axes) -> reshape
MatMul(x, reshape) -> output
output: name='output' type=dtype('float32') shape=['s26', 1]
new-tracing#
inputs:
#1[(T1s0x3,)]shapes:
dict(x:{0:DYNAMIC,1:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['_dyn_49', '_dyn_50']
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
init: name='init_2' type=float32 shape=() -- array([1.], dtype=float32)
init: name='ShapeBasedReshapeIsSqueezePattern_axes' type=int64 shape=(1,) -- array([1])
Shape(x, start=1, end=2) -> shape
Squeeze(shape) -> sym_size_int
Cast(sym_size_int, to=1) -> cast
Range(init, cast, init_2) -> arange
Unsqueeze(arange, ShapeBasedReshapeIsSqueezePattern_axes) -> view_default
MatMul(x, view_default) -> output
output: name='output' type=dtype('float32') shape=['_dyn_49', 1]
ExportWithDimension1#
code: yobx.torch.testing._model_eval_cases.ExportWithDimension1
forward#
def forward(self, x):
return x @ torch.arange(x.shape[1], dtype=torch.float32).reshape((-1, 1))
yobx#
inputs:
#1[(T1s1x3,)]shapes:
dict(x:{0:DYNAMIC,1:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s77', 's27']
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
init: name='init_2' type=float32 shape=() -- array([1.], dtype=float32)
init: name='ShapeBasedReshapeIsSqueezePattern_axes' type=int64 shape=(1,) -- array([1])
Shape(x, start=1, end=2) -> shape
Squeeze(shape) -> sym_size_int_2
Cast(sym_size_int_2, to=1) -> cast
Range(init, cast, init_2) -> arange
Unsqueeze(arange, ShapeBasedReshapeIsSqueezePattern_axes) -> reshape
MatMul(x, reshape) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 1]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s1x3,)]shapes:
dict(x:{0:DYNAMIC,1:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s26', 's49']
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='init_5' type=float32 shape=() -- array([0.], dtype=float32)
init: name='init_6' type=float32 shape=() -- array([1.], dtype=float32)
init: name='GatherToSlicePattern--getitemB_index_3_starts' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--getitemB_index_3_ends' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--getitemB_index_3_axes' type=int64 shape=(1,) -- array([0])
init: name='ShapeBasedReshapeIsSqueezePattern_axes' type=int64 shape=(1,) -- array([1])
Shape(x) -> size
Slice(size, GatherToSlicePattern--getitemB_index_3_starts, GatherToSlicePattern--getitemB_index_3_ends, GatherToSlicePattern--getitemB_index_3_axes) -> gather_2
Squeeze(gather_2, init_4) -> getitem_1
Cast(getitem_1, to=1) -> cast
Range(init_5, cast, init_6) -> arange
Unsqueeze(arange, ShapeBasedReshapeIsSqueezePattern_axes) -> reshape
MatMul(x, reshape) -> output
output: name='output' type=dtype('float32') shape=['s26', 1]
new-tracing#
inputs:
#1[(T1s1x3,)]shapes:
dict(x:{0:DYNAMIC,1:DYNAMIC})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['_dyn_51', '_dyn_52']
init: name='init' type=float32 shape=() -- array([0.], dtype=float32)
init: name='init_2' type=float32 shape=() -- array([1.], dtype=float32)
init: name='ShapeBasedReshapeIsSqueezePattern_axes' type=int64 shape=(1,) -- array([1])
Shape(x, start=1, end=2) -> shape
Squeeze(shape) -> sym_size_int
Cast(sym_size_int, to=1) -> cast
Range(init, cast, init_2) -> arange
Unsqueeze(arange, ShapeBasedReshapeIsSqueezePattern_axes) -> view_default
MatMul(x, view_default) -> output
output: name='output' type=dtype('float32') shape=['_dyn_51', 1]
ExportWithNewConstant#
code: yobx.torch.testing._model_eval_cases.ExportWithNewConstant
forward#
def forward(self, x):
new_shape = (x.shape[0], 1)
ones = torch.ones(new_shape, dtype=x.dtype, device=x.device)
return torch.cat([x, ones], dim=1)
yobx#
inputs:
#2[(T1s4x4,),(T1s5x6,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 'seq']
init: name='init_2' type=int64 shape=(1,) -- array([1])
Shape(x, start=0, end=1) -> shape
Concat(shape, init_2, axis=0) -> concat
ConstantOfShape(concat, value=[1.0]) -> ones
Concat(x, ones, axis=1) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's27+1']
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s4x4,),(T1s5x6,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 'seq']
init: name='init_6' type=int64 shape=(1,) -- array([1])
Shape(x, start=0, end=1) -> gather
Concat(gather, init_6, axis=0) -> concat
ConstantOfShape(concat, value=[1.0]) -> ones
Concat(x, ones, axis=1) -> output
output: name='output' type=dtype('float32') shape=['batch', 'seq+1']
new-tracing#
inputs:
#2[(T1s4x4,),(T1s5x6,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 'seq']
init: name='init_2' type=int64 shape=(1,) -- array([1])
Shape(x, start=0, end=1) -> shape
Concat(shape, init_2, axis=0) -> concat
ConstantOfShape(concat, value=[1.0]) -> ones
Concat(x, ones, axis=1) -> output
output: name='output' type=dtype('float32') shape=['batch', 'seq+1']
ExportWithNewConstantTo#
code: yobx.torch.testing._model_eval_cases.ExportWithNewConstantTo
forward#
def forward(self, x):
new_shape = (x.shape[0], 1)
ones = torch.ones(new_shape, dtype=x.dtype)
return torch.cat([x, ones.to(x.device)], dim=1)
yobx#
inputs:
#2[(T1s4x4,),(T1s5x6,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 'seq']
init: name='init_2' type=int64 shape=(1,) -- array([1])
Shape(x, start=0, end=1) -> shape
Concat(shape, init_2, axis=0) -> concat
ConstantOfShape(concat, value=[1.0]) -> ones
Concat(x, ones, axis=1) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's27+1']
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s4x4,),(T1s5x6,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 'seq']
init: name='init_6' type=int64 shape=(1,) -- array([1])
Shape(x, start=0, end=1) -> gather
Concat(gather, init_6, axis=0) -> concat
ConstantOfShape(concat, value=[1.0]) -> ones
Concat(x, ones, axis=1) -> output
output: name='output' type=dtype('float32') shape=['batch', 'seq+1']
new-tracing#
inputs:
#2[(T1s4x4,),(T1s5x6,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 'seq']
init: name='init_2' type=int64 shape=(1,) -- array([1])
Shape(x, start=0, end=1) -> shape
Concat(shape, init_2, axis=0) -> concat
ConstantOfShape(concat, value=[1.0]) -> ones
Concat(x, ones, axis=1) -> output
output: name='output' type=dtype('float32') shape=['batch', 'seq+1']
InplaceAdd#
code: yobx.torch.testing._model_eval_cases.InplaceAdd
forward#
def forward(self, x):
x += self.bias
return x
yobx#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='c_bias' type=float32 shape=(1, 4) -- array([1., 1., 1., 1.], dtype=float32)
Add(x, c_bias) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 4]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='bias' type=float32 shape=(1, 4) -- array([1., 1., 1., 1.], dtype=float32)
Add(x, bias) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
new-tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='bias' type=float32 shape=(1, 4) -- array([1., 1., 1., 1.], dtype=float32)
Add(x, bias) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
InplaceAdd2#
code: yobx.torch.testing._model_eval_cases.InplaceAdd2
forward#
def forward(self, x):
x.add_(self.bias)
return x
yobx#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='c_bias' type=float32 shape=(1, 4) -- array([1., 1., 1., 1.], dtype=float32)
Add(x, c_bias) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 4]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='bias' type=float32 shape=(1, 4) -- array([1., 1., 1., 1.], dtype=float32)
Add(x, bias) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
new-tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='bias' type=float32 shape=(1, 4) -- array([1., 1., 1., 1.], dtype=float32)
Add(x, bias) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
InplaceAdd_Mul#
code: yobx.torch.testing._model_eval_cases.InplaceAdd_Mul
forward#
def forward(self, x):
x.add_(self.bias)
return x * 2
yobx#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='c_bias' type=float32 shape=(1, 4) -- array([1., 1., 1., 1.], dtype=float32)
init: name='reshape' type=float32 shape=(1,) -- array([2.], dtype=float32)
Add(x, c_bias) -> add_
Mul(add_, reshape) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 4]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='bias' type=float32 shape=(1, 4) -- array([1., 1., 1., 1.], dtype=float32)
init: name='reshape' type=float32 shape=(1,) -- array([2.], dtype=float32)
Add(x, bias) -> add_
Mul(add_, reshape) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='bias' type=float32 shape=(1, 4) -- array([1., 1., 1., 1.], dtype=float32)
init: name='reshape' type=float32 shape=(1,) -- array([2.], dtype=float32)
Add(x, bias) -> add__tensor
Mul(add__tensor, reshape) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
InplaceCloneAdd#
code: yobx.torch.testing._model_eval_cases.InplaceCloneAdd_
forward#
def forward(self, x):
x = x.clone()
x.add_(self.bias)
return x
yobx#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='c_bias' type=float32 shape=(1, 4) -- array([1., 1., 1., 1.], dtype=float32)
Add(x, c_bias) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 4]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='bias' type=float32 shape=(1, 4) -- array([1., 1., 1., 1.], dtype=float32)
Add(x, bias) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
new-tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='bias' type=float32 shape=(1, 4) -- array([1., 1., 1., 1.], dtype=float32)
Add(x, bias) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
InplaceSetItemEllipsis_1#
code: yobx.torch.testing._model_eval_cases.InplaceSetItemEllipsis_1
forward#
def forward(self, index, update):
copy = update.new_zeros(self.params.shape)
copy[..., index] = update
return copy
yobx#
FAILED
L['update'].size()[0] = 8192 is not equal to L['index'].size()[0] = 4
The error above occurred when calling torch.export.export. If you would like to view some more information about this error, and get a list of all other errors that may occur in your export call, you can replace your `export()` call with `draft_export()`.
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T7s4,T1s8192x4)]shapes:
dict(index:{0:Dim(batch)},update:{0:Dim(batch),1:DYNAMIC})
opset: domain='aten' version=1
opset: domain='' version=21
input: name='index' type=dtype('int64') shape=['batch']
input: name='update' type=dtype('float32') shape=['batch', 's70']
init: name='new_zeros' type=float32 shape=(1, 8192, 4)
Constant(value=[1, 1, -1]) -> init__1
Reshape(index, init__1) -> reshape__1
Shape(new_zeros, start=0, end=2) -> shape__1
Shape(index) -> shape_2__1
Concat(shape__1, shape_2__1, axis=0) -> concat__1
Expand(reshape__1, concat__1) -> expand__1
Expand(update, concat__1) -> expand_2__1
ScatterElements(new_zeros, expand__1, expand_2__1, axis=2) -> output
output: name='output' type=dtype('float32') shape=[1, 8192, 4]
new-tracing#
inputs:
#1[(T7s4,T1s8192x4)]shapes:
dict(index:{0:Dim(batch)},update:{0:Dim(batch),1:DYNAMIC})
opset: domain='aten' version=1
opset: domain='' version=21
input: name='index' type=dtype('int64') shape=['batch']
input: name='update' type=dtype('float32') shape=['batch', '_dyn_53']
init: name='new_zeros_default' type=float32 shape=(1, 8192, 4)
Constant(value=[1, 1, -1]) -> init__1
Reshape(index, init__1) -> reshape__1
Shape(new_zeros_default, start=0, end=2) -> shape__1
Shape(index) -> shape_2__1
Concat(shape__1, shape_2__1, axis=0) -> concat__1
Expand(reshape__1, concat__1) -> expand__1
Expand(update, concat__1) -> expand_2__1
ScatterElements(new_zeros_default, expand__1, expand_2__1, axis=2) -> output
output: name='output' type=dtype('float32') shape=[1, 8192, 4]
InplaceSetItemEllipsis_2#
code: yobx.torch.testing._model_eval_cases.InplaceSetItemEllipsis_2
forward#
def forward(self, index, update):
copy = self.params.clone()
copy[..., index] = update
return copy
yobx#
FAILED
L['update'].size()[0] = 8192 is not equal to L['index'].size()[0] = 4
The error above occurred when calling torch.export.export. If you would like to view some more information about this error, and get a list of all other errors that may occur in your export call, you can replace your `export()` call with `draft_export()`.
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T7s4,T1s8192x4)]shapes:
dict(index:{0:Dim(batch)},update:{0:Dim(batch),1:DYNAMIC})
opset: domain='aten' version=1
opset: domain='' version=21
input: name='index' type=dtype('int64') shape=['batch']
input: name='update' type=dtype('float32') shape=['batch', 's70']
init: name='_tensor_constant0' type=float32 shape=(1, 8192, 6)
Constant(value=[1, 1, -1]) -> init__1
Reshape(index, init__1) -> reshape__1
Shape(_tensor_constant0, start=0, end=2) -> shape__1
Shape(index) -> shape_2__1
Concat(shape__1, shape_2__1, axis=0) -> concat__1
Expand(reshape__1, concat__1) -> expand__1
Expand(update, concat__1) -> expand_2__1
ScatterElements(_tensor_constant0, expand__1, expand_2__1, axis=2) -> output
output: name='output' type=dtype('float32') shape=[1, 8192, 6]
new-tracing#
inputs:
#1[(T7s4,T1s8192x4)]shapes:
dict(index:{0:Dim(batch)},update:{0:Dim(batch),1:DYNAMIC})
opset: domain='aten' version=1
opset: domain='' version=21
input: name='index' type=dtype('int64') shape=['batch']
input: name='update' type=dtype('float32') shape=['batch', '_dyn_54']
init: name='clone_default' type=float32 shape=(1, 8192, 6)
Constant(value=[1, 1, -1]) -> init__1
Reshape(index, init__1) -> reshape__1
Shape(clone_default, start=0, end=2) -> shape__1
Shape(index) -> shape_2__1
Concat(shape__1, shape_2__1, axis=0) -> concat__1
Expand(reshape__1, concat__1) -> expand__1
Expand(update, concat__1) -> expand_2__1
ScatterElements(clone_default, expand__1, expand_2__1, axis=2) -> output
output: name='output' type=dtype('float32') shape=[1, 8192, 6]
InplaceSetItemExp#
code: yobx.torch.testing._model_eval_cases.InplaceSetItemExp
forward#
def forward(self, x):
K_33 = x.clone()
torch.exp_(K_33[2:-2, 2:-2, :-1])
return K_33
yobx#
inputs:
#2[(T1s7x9x11,),(T1s8x9x11,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 9, 11]
init: name='init' type=int64 shape=(3,) -- array([2, 2, 0])
init: name='init_2' type=int64 shape=(3,) -- array([-2, -2, -1])
init: name='init_3' type=int64 shape=(3,) -- array([0, 1, 2])
init: name='init_4' type=int64 shape=(6,)
init: name='init_5' type=int64 shape=(6,)
init: name='init_6' type=float32 shape=() -- array([1.], dtype=float32)
Slice(x, init, init_2, init_3) -> slice
Exp(slice) -> exp
Shape(exp) -> shape
ConstantOfShape(shape, value=[0.0]) -> constantofshape
Pad(constantofshape, init_5, init_6) -> clone_mask
Mul(x, clone_mask) -> mul
Pad(exp, init_4) -> exp_padded
Add(mul, exp_padded) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 9, 11]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s7x9x11,),(T1s8x9x11,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 9, 11]
init: name='init' type=int64 shape=(3,) -- array([2, 2, 0])
init: name='init_2' type=int64 shape=(3,) -- array([-2, -2, -1])
init: name='init_3' type=int64 shape=(3,) -- array([0, 1, 2])
init: name='init_4' type=int64 shape=(6,)
init: name='init_5' type=int64 shape=(6,)
init: name='init_6' type=float32 shape=() -- array([1.], dtype=float32)
Slice(x, init, init_2, init_3) -> slice
Exp(slice) -> exp
Shape(exp) -> shape
ConstantOfShape(shape, value=[0.0]) -> constantofshape
Pad(constantofshape, init_5, init_6) -> clone_mask
Mul(x, clone_mask) -> mul
Pad(exp, init_4) -> exp_padded
Add(mul, exp_padded) -> output
output: name='output' type=dtype('float32') shape=['batch', 9, 11]
new-tracing#
inputs:
#2[(T1s7x9x11,),(T1s8x9x11,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 9, 11]
init: name='init' type=int64 shape=(3,) -- array([2, 2, 0])
init: name='init_2' type=int64 shape=(3,) -- array([-2, -2, -1])
init: name='init_3' type=int64 shape=(3,) -- array([0, 1, 2])
init: name='init_4' type=int64 shape=(6,)
init: name='init_5' type=int64 shape=(6,)
init: name='init_6' type=float32 shape=() -- array([1.], dtype=float32)
Slice(x, init, init_2, init_3) -> slice
Exp(slice) -> exp
Shape(exp) -> shape
ConstantOfShape(shape, value=[0.0]) -> constantofshape
Pad(constantofshape, init_5, init_6) -> clone_default_mask
Mul(x, clone_default_mask) -> mul
Pad(exp, init_4) -> exp_padded
Add(mul, exp_padded) -> output
output: name='output' type=dtype('float32') shape=['batch', 9, 11]
InplaceSetItemMask#
code: yobx.torch.testing._model_eval_cases.InplaceSetItemMask
forward#
def forward(self, x):
mask = x.to(bool)
x[mask] = 2
return x
yobx#
inputs:
#2[(T1s2x3x3,),(T1s3x3x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3, 3]
init: name='init' type=float32 shape=(1,) -- array([2.], dtype=float32)
Cast(x, to=9) -> to
Where(to, init, x) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 3, 3]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s2x3x3,),(T1s3x3x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='aten' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3, 3]
Cast(x, to=9) -> to
Constant(value=2.0) -> init__1
Where(to, init__1, x) -> output
output: name='output' type=dtype('float32') shape=['batch', 3, 3]
new-tracing#
inputs:
#2[(T1s2x3x3,),(T1s3x3x3,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='aten' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3, 3]
Cast(x, to=9) -> _to_copy_default
Constant(value=2.0) -> init__1
Where(_to_copy_default, init__1, x) -> output
output: name='output' type=dtype('float32') shape=['batch', 3, 3]
InplaceSetItemSquare#
code: yobx.torch.testing._model_eval_cases.InplaceSetItemSquare
forward#
def forward(self, x):
x[:2, :3] = 1
return x
yobx#
FAILED
slice_scatter not implemented for start=0
OnnxLightGraphBuilder(opsets={'': 21}, inputs=['x'])
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s5x5,),(T1s7x5,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='aten' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 5]
Constant(value=1.0) -> setitem_val__1
Constant(value=[0]) -> init__1
Constant(value=2) -> init_2__1
Constant(value=[0]) -> init_3__1
Constant(value=3) -> init_4__1
Constant(value=[0]) -> init_7__1
Constant(value=[0]) -> init_8__1
Constant(value=[0]) -> init_9__1
Constant(value=[0]) -> init_10__1
Constant(value=[0]) -> init_11__1
Constant(value=[0]) -> init_12__1
Constant(value=1.0) -> init_13__1
Constant(value=[0, 0]) -> concat__1
Shape(x, start=0, end=1) -> shape__1
Squeeze(shape__1, init__1) -> squeeze__1
Sub(squeeze__1, init_2__1) -> sub__1
Unsqueeze(sub__1, init_7__1) -> unsqueeze__1
Shape(x, start=1, end=2) -> shape_2__1
Squeeze(shape_2__1, init_3__1) -> squeeze_2__1
Sub(squeeze_2__1, init_4__1) -> sub_2__1
Unsqueeze(sub_2__1, init_8__1) -> unsqueeze_2__1
Concat(unsqueeze__1, unsqueeze_2__1, axis=0) -> concat_2__1
Add(concat__1, concat_2__1) -> add__1
Shape(x) -> shape_3__1
Sub(shape_3__1, add__1) -> sub_3__1
Expand(setitem_val__1, sub_3__1) -> expand__1
Shape(expand__1) -> shape_4__1
ConstantOfShape(shape_4__1, value=[0.0]) -> constantofshape__1
Unsqueeze(sub__1, init_9__1) -> unsqueeze_3__1
Unsqueeze(sub_2__1, init_10__1) -> unsqueeze_4__1
Concat(init_11__1, init_12__1, unsqueeze_3__1, unsqueeze_4__1, axis=0) -> concat_3__1
Pad(expand__1, concat_3__1) -> expand_padded__1
Pad(constantofshape__1, concat_3__1, init_13__1) -> x_mask__1
Mul(x, x_mask__1) -> mul__1
Add(mul__1, expand_padded__1) -> output
output: name='output' type=dtype('float32') shape=['batch', 5]
new-tracing#
inputs:
#2[(T1s5x5,),(T1s7x5,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='aten' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 5]
Constant(value=1.0) -> setitem_val__1
Constant(value=[0]) -> init__1
Constant(value=2) -> init_2__1
Constant(value=[0]) -> init_3__1
Constant(value=3) -> init_4__1
Constant(value=[0]) -> init_7__1
Constant(value=[0]) -> init_8__1
Constant(value=[0]) -> init_9__1
Constant(value=[0]) -> init_10__1
Constant(value=[0]) -> init_11__1
Constant(value=[0]) -> init_12__1
Constant(value=1.0) -> init_13__1
Constant(value=[0, 0]) -> concat__1
Shape(x, start=0, end=1) -> shape__1
Squeeze(shape__1, init__1) -> squeeze__1
Sub(squeeze__1, init_2__1) -> sub__1
Unsqueeze(sub__1, init_7__1) -> unsqueeze__1
Shape(x, start=1, end=2) -> shape_2__1
Squeeze(shape_2__1, init_3__1) -> squeeze_2__1
Sub(squeeze_2__1, init_4__1) -> sub_2__1
Unsqueeze(sub_2__1, init_8__1) -> unsqueeze_2__1
Concat(unsqueeze__1, unsqueeze_2__1, axis=0) -> concat_2__1
Add(concat__1, concat_2__1) -> add__1
Shape(x) -> shape_3__1
Sub(shape_3__1, add__1) -> sub_3__1
Expand(setitem_val__1, sub_3__1) -> expand__1
Shape(expand__1) -> shape_4__1
ConstantOfShape(shape_4__1, value=[0.0]) -> constantofshape__1
Unsqueeze(sub__1, init_9__1) -> unsqueeze_3__1
Unsqueeze(sub_2__1, init_10__1) -> unsqueeze_4__1
Concat(init_11__1, init_12__1, unsqueeze_3__1, unsqueeze_4__1, axis=0) -> concat_3__1
Pad(expand__1, concat_3__1) -> expand_padded__1
Pad(constantofshape__1, concat_3__1, init_13__1) -> x_mask__1
Mul(x, x_mask__1) -> mul__1
Add(mul__1, expand_padded__1) -> output
output: name='output' type=dtype('float32') shape=['batch', 5]
InplaceSetItemSquareAdd#
code: yobx.torch.testing._model_eval_cases.InplaceSetItemSquareAdd
forward#
def forward(self, x):
x[:2, :3] = 1
return x + 2
yobx#
FAILED
slice_scatter not implemented for start=0
OnnxLightGraphBuilder(opsets={'': 21}, inputs=['x'])
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s5x5,),(T1s7x5,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='aten' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 5]
init: name='reshape' type=float32 shape=(1,) -- array([2.], dtype=float32)
Constant(value=1.0) -> setitem_val__1
Constant(value=[0]) -> init__1
Constant(value=2) -> init_2__1
Constant(value=[0]) -> init_3__1
Constant(value=3) -> init_4__1
Constant(value=[0]) -> init_7__1
Constant(value=[0]) -> init_8__1
Constant(value=[0]) -> init_9__1
Constant(value=[0]) -> init_10__1
Constant(value=[0]) -> init_11__1
Constant(value=[0]) -> init_12__1
Constant(value=1.0) -> init_13__1
Constant(value=[0, 0]) -> concat__1
Shape(x, start=0, end=1) -> shape__1
Squeeze(shape__1, init__1) -> squeeze__1
Sub(squeeze__1, init_2__1) -> sub__1
Unsqueeze(sub__1, init_7__1) -> unsqueeze__1
Shape(x, start=1, end=2) -> shape_2__1
Squeeze(shape_2__1, init_3__1) -> squeeze_2__1
Sub(squeeze_2__1, init_4__1) -> sub_2__1
Unsqueeze(sub_2__1, init_8__1) -> unsqueeze_2__1
Concat(unsqueeze__1, unsqueeze_2__1, axis=0) -> concat_2__1
Add(concat__1, concat_2__1) -> add__1
Shape(x) -> shape_3__1
Sub(shape_3__1, add__1) -> sub_3__1
Expand(setitem_val__1, sub_3__1) -> expand__1
Shape(expand__1) -> shape_4__1
ConstantOfShape(shape_4__1, value=[0.0]) -> constantofshape__1
Unsqueeze(sub__1, init_9__1) -> unsqueeze_3__1
Unsqueeze(sub_2__1, init_10__1) -> unsqueeze_4__1
Concat(init_11__1, init_12__1, unsqueeze_3__1, unsqueeze_4__1, axis=0) -> concat_3__1
Pad(expand__1, concat_3__1) -> expand_padded__1
Pad(constantofshape__1, concat_3__1, init_13__1) -> x_mask__1
Mul(x, x_mask__1) -> mul__1
Add(mul__1, expand_padded__1) -> setitem
Add(setitem, reshape) -> output
output: name='output' type=dtype('float32') shape=['batch', 5]
----- function name=PrepareInitializer_1 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='aten' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#2[(T1s5x5,),(T1s7x5,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='aten' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 5]
init: name='reshape' type=float32 shape=(1,) -- array([2.], dtype=float32)
Constant(value=1.0) -> setitem_val__1
Constant(value=[0]) -> init__1
Constant(value=2) -> init_2__1
Constant(value=[0]) -> init_3__1
Constant(value=3) -> init_4__1
Constant(value=[0]) -> init_7__1
Constant(value=[0]) -> init_8__1
Constant(value=[0]) -> init_9__1
Constant(value=[0]) -> init_10__1
Constant(value=[0]) -> init_11__1
Constant(value=[0]) -> init_12__1
Constant(value=1.0) -> init_13__1
Constant(value=[0, 0]) -> concat__1
Shape(x, start=0, end=1) -> shape__1
Squeeze(shape__1, init__1) -> squeeze__1
Sub(squeeze__1, init_2__1) -> sub__1
Unsqueeze(sub__1, init_7__1) -> unsqueeze__1
Shape(x, start=1, end=2) -> shape_2__1
Squeeze(shape_2__1, init_3__1) -> squeeze_2__1
Sub(squeeze_2__1, init_4__1) -> sub_2__1
Unsqueeze(sub_2__1, init_8__1) -> unsqueeze_2__1
Concat(unsqueeze__1, unsqueeze_2__1, axis=0) -> concat_2__1
Add(concat__1, concat_2__1) -> add__1
Shape(x) -> shape_3__1
Sub(shape_3__1, add__1) -> sub_3__1
Expand(setitem_val__1, sub_3__1) -> expand__1
Shape(expand__1) -> shape_4__1
ConstantOfShape(shape_4__1, value=[0.0]) -> constantofshape__1
Unsqueeze(sub__1, init_9__1) -> unsqueeze_3__1
Unsqueeze(sub_2__1, init_10__1) -> unsqueeze_4__1
Concat(init_11__1, init_12__1, unsqueeze_3__1, unsqueeze_4__1, axis=0) -> concat_3__1
Pad(expand__1, concat_3__1) -> expand_padded__1
Pad(constantofshape__1, concat_3__1, init_13__1) -> x_mask__1
Mul(x, x_mask__1) -> mul__1
Add(mul__1, expand_padded__1) -> setitem
Add(setitem, reshape) -> output
output: name='output' type=dtype('float32') shape=['batch', 5]
----- function name=PrepareInitializer_1 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='aten' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
InplaceSetItemSquareAdd2#
code: yobx.torch.testing._model_eval_cases.InplaceSetItemSquareAdd2
forward#
def forward(self, x):
x[:2, :3] = 1
return x + 2, x + 3
yobx#
FAILED
slice_scatter not implemented for start=0
OnnxLightGraphBuilder(opsets={'': 21}, inputs=['x'])
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s5x5,),(T1s7x5,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='aten' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 5]
init: name='reshape' type=float32 shape=(1,) -- array([2.], dtype=float32)
init: name='reshape_2' type=float32 shape=(1,) -- array([3.], dtype=float32)
Constant(value=1.0) -> setitem_val__1
Constant(value=[0]) -> init__1
Constant(value=2) -> init_2__1
Constant(value=[0]) -> init_3__1
Constant(value=3) -> init_4__1
Constant(value=[0]) -> init_7__1
Constant(value=[0]) -> init_8__1
Constant(value=[0]) -> init_9__1
Constant(value=[0]) -> init_10__1
Constant(value=[0]) -> init_11__1
Constant(value=[0]) -> init_12__1
Constant(value=1.0) -> init_13__1
Constant(value=[0, 0]) -> concat__1
Shape(x, start=0, end=1) -> shape__1
Squeeze(shape__1, init__1) -> squeeze__1
Sub(squeeze__1, init_2__1) -> sub__1
Unsqueeze(sub__1, init_7__1) -> unsqueeze__1
Shape(x, start=1, end=2) -> shape_2__1
Squeeze(shape_2__1, init_3__1) -> squeeze_2__1
Sub(squeeze_2__1, init_4__1) -> sub_2__1
Unsqueeze(sub_2__1, init_8__1) -> unsqueeze_2__1
Concat(unsqueeze__1, unsqueeze_2__1, axis=0) -> concat_2__1
Add(concat__1, concat_2__1) -> add__1
Shape(x) -> shape_3__1
Sub(shape_3__1, add__1) -> sub_3__1
Expand(setitem_val__1, sub_3__1) -> expand__1
Shape(expand__1) -> shape_4__1
ConstantOfShape(shape_4__1, value=[0.0]) -> constantofshape__1
Unsqueeze(sub__1, init_9__1) -> unsqueeze_3__1
Unsqueeze(sub_2__1, init_10__1) -> unsqueeze_4__1
Concat(init_11__1, init_12__1, unsqueeze_3__1, unsqueeze_4__1, axis=0) -> concat_3__1
Pad(expand__1, concat_3__1) -> expand_padded__1
Pad(constantofshape__1, concat_3__1, init_13__1) -> x_mask__1
Mul(x, x_mask__1) -> mul__1
Add(mul__1, expand_padded__1) -> setitem
Add(setitem, reshape) -> output_0
Add(setitem, reshape_2) -> output_1
output: name='output_0' type=dtype('float32') shape=['batch', 5]
output: name='output_1' type=dtype('float32') shape=['batch', 5]
----- function name=PrepareInitializer_1 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='aten' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#2[(T1s5x5,),(T1s7x5,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='aten' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 5]
init: name='reshape' type=float32 shape=(1,) -- array([2.], dtype=float32)
init: name='reshape_2' type=float32 shape=(1,) -- array([3.], dtype=float32)
Constant(value=1.0) -> setitem_val__1
Constant(value=[0]) -> init__1
Constant(value=2) -> init_2__1
Constant(value=[0]) -> init_3__1
Constant(value=3) -> init_4__1
Constant(value=[0]) -> init_7__1
Constant(value=[0]) -> init_8__1
Constant(value=[0]) -> init_9__1
Constant(value=[0]) -> init_10__1
Constant(value=[0]) -> init_11__1
Constant(value=[0]) -> init_12__1
Constant(value=1.0) -> init_13__1
Constant(value=[0, 0]) -> concat__1
Shape(x, start=0, end=1) -> shape__1
Squeeze(shape__1, init__1) -> squeeze__1
Sub(squeeze__1, init_2__1) -> sub__1
Unsqueeze(sub__1, init_7__1) -> unsqueeze__1
Shape(x, start=1, end=2) -> shape_2__1
Squeeze(shape_2__1, init_3__1) -> squeeze_2__1
Sub(squeeze_2__1, init_4__1) -> sub_2__1
Unsqueeze(sub_2__1, init_8__1) -> unsqueeze_2__1
Concat(unsqueeze__1, unsqueeze_2__1, axis=0) -> concat_2__1
Add(concat__1, concat_2__1) -> add__1
Shape(x) -> shape_3__1
Sub(shape_3__1, add__1) -> sub_3__1
Expand(setitem_val__1, sub_3__1) -> expand__1
Shape(expand__1) -> shape_4__1
ConstantOfShape(shape_4__1, value=[0.0]) -> constantofshape__1
Unsqueeze(sub__1, init_9__1) -> unsqueeze_3__1
Unsqueeze(sub_2__1, init_10__1) -> unsqueeze_4__1
Concat(init_11__1, init_12__1, unsqueeze_3__1, unsqueeze_4__1, axis=0) -> concat_3__1
Pad(expand__1, concat_3__1) -> expand_padded__1
Pad(constantofshape__1, concat_3__1, init_13__1) -> x_mask__1
Mul(x, x_mask__1) -> mul__1
Add(mul__1, expand_padded__1) -> setitem
Add(setitem, reshape) -> output_0
Add(setitem, reshape_2) -> output_1
output: name='output_0' type=dtype('float32') shape=['batch', 5]
output: name='output_1' type=dtype('float32') shape=['batch', 5]
----- function name=PrepareInitializer_1 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='aten' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
LayerNorm#
code: yobx.torch.testing._model_eval_cases.LayerNorm
forward#
def forward(self, x):
return self.layer_norm(x)
yobx#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='LayerNormalizationScalePattern_LayerNormalizationPattern.scale_0' type=float32 shape=(4,) -- array([1., 1., 1., 1.], dtype=float32)
init: name='LayerNormalizationScalePattern_LayerNormalizationPattern.scale_2' type=float32 shape=(4,) -- array([0., 0., 0., 0.], dtype=float32)
LayerNormalization(x, LayerNormalizationScalePattern_LayerNormalizationPattern.scale_0, LayerNormalizationScalePattern_LayerNormalizationPattern.scale_2, axis=-1, epsilon=0.00, stash_type=1) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 4]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='LayerNormalizationScalePattern_LayerNormalizationPattern.scale_0' type=float32 shape=(4,) -- array([1., 1., 1., 1.], dtype=float32)
init: name='LayerNormalizationScalePattern_LayerNormalizationPattern.scale_2' type=float32 shape=(4,) -- array([0., 0., 0., 0.], dtype=float32)
LayerNormalization(x, LayerNormalizationScalePattern_LayerNormalizationPattern.scale_0, LayerNormalizationScalePattern_LayerNormalizationPattern.scale_2, axis=-1, epsilon=0.00, stash_type=1) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
new-tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
init: name='layer_norm_weight' type=float32 shape=(4,) -- array([1., 1., 1., 1.], dtype=float32)
init: name='layer_norm_bias' type=float32 shape=(4,) -- array([0., 0., 0., 0.], dtype=float32)
LayerNormalization(x, layer_norm_weight, layer_norm_bias, axis=-1, epsilon=0.00) -> output, native_layer_norm_default#1, native_layer_norm_default#2
output: name='output' type=dtype('float32') shape=['batch', 4]
ShapeAndTypeAndDeviceBased#
code: yobx.torch.testing._model_eval_cases.ShapeAndTypeAndDeviceBased
forward#
def forward(self, x):
shape = x.shape
new_shape = (shape[0], shape[1] + 1)
dtype = x.dtype
if dtype == torch.float64 or dtype == torch.float16:
dtype = torch.float32
device = x.device
return torch.zeros(new_shape, dtype=dtype, device=device)
yobx#
inputs:
#2[(T10s3x4,),(T10s5x4,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float16') shape=['batch', 'seq']
init: name='init' type=int64 shape=() -- array([1])
init: name='init_5' type=int64 shape=(1,) -- array([0])
Shape(x, start=0, end=1) -> shape
Shape(x, start=1, end=2) -> shape_2
Squeeze(shape_2) -> sym_size_int_3
Add(sym_size_int_3, init) -> add_3
Unsqueeze(add_3, init_5) -> unsqueeze_2
Concat(shape, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[0.0]) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's27+1']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T10s3x4,),(T10s5x4,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float16') shape=['batch', 'seq']
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='init_5' type=int64 shape=() -- array([1])
init: name='init_9' type=int64 shape=(1,) -- array([0])
init: name='GatherToSlicePattern--getitemB_index_3_starts' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--getitemB_index_3_ends' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--getitemB_index_3_axes' type=int64 shape=(1,) -- array([0])
Shape(x) -> size
Slice(size, GatherToSlicePattern--getitemB_index_3_starts, GatherToSlicePattern--getitemB_index_3_ends, GatherToSlicePattern--getitemB_index_3_axes) -> gather_2
Squeeze(gather_2, init_4) -> getitem_1
Add(getitem_1, init_5) -> add_3
Unsqueeze(add_3, init_9) -> unsqueeze_2
Shape(x, start=0, end=1) -> gather
Concat(gather, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[0.0]) -> output
output: name='output' type=dtype('float32') shape=['getitem', 'add']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#2[(T10s3x4,),(T10s5x4,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='' version=21
input: name='x' type=dtype('float16') shape=['batch', 'seq']
init: name='init_3' type=int64 shape=() -- array([1])
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='GatherShapePattern--Gather_axes' type=int64 shape=(1,) -- array([0])
Shape(x, start=1, end=2) -> GatherShapePattern--Gather_1d_0
Squeeze(GatherShapePattern--Gather_1d_0, GatherShapePattern--Gather_axes) -> seq
Add(seq, init_3) -> add
Unsqueeze(add, init_4) -> unsqueeze_2
Shape(x, start=0, end=1) -> shape
Concat(shape, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[0.0]) -> output
output: name='output' type=dtype('float32') shape=['batch', 'seq+1']
ShapeAndTypeBased#
code: yobx.torch.testing._model_eval_cases.ShapeAndTypeBased
forward#
def forward(self, x):
shape = x.shape
new_shape = (shape[0], shape[1] + 1)
dtype = x.dtype
if dtype == torch.float64 or dtype == torch.float16:
dtype = torch.float32
return torch.zeros(new_shape, dtype=dtype)
yobx#
inputs:
#2[(T10s3x4,),(T10s5x4,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float16') shape=['batch', 'seq']
init: name='init' type=int64 shape=() -- array([1])
init: name='init_5' type=int64 shape=(1,) -- array([0])
Shape(x, start=0, end=1) -> shape
Shape(x, start=1, end=2) -> shape_2
Squeeze(shape_2) -> sym_size_int_3
Add(sym_size_int_3, init) -> add_3
Unsqueeze(add_3, init_5) -> unsqueeze_2
Concat(shape, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[0.0]) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's27+1']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T10s3x4,),(T10s5x4,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float16') shape=['batch', 'seq']
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='init_5' type=int64 shape=() -- array([1])
init: name='init_9' type=int64 shape=(1,) -- array([0])
init: name='GatherToSlicePattern--getitemB_index_3_starts' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--getitemB_index_3_ends' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--getitemB_index_3_axes' type=int64 shape=(1,) -- array([0])
Shape(x) -> size
Slice(size, GatherToSlicePattern--getitemB_index_3_starts, GatherToSlicePattern--getitemB_index_3_ends, GatherToSlicePattern--getitemB_index_3_axes) -> gather_2
Squeeze(gather_2, init_4) -> getitem_1
Add(getitem_1, init_5) -> add_3
Unsqueeze(add_3, init_9) -> unsqueeze_2
Shape(x, start=0, end=1) -> gather
Concat(gather, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[0.0]) -> output
output: name='output' type=dtype('float32') shape=['getitem', 'add']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#2[(T10s3x4,),(T10s5x4,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='' version=21
input: name='x' type=dtype('float16') shape=['batch', 'seq']
init: name='init_3' type=int64 shape=() -- array([1])
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='GatherShapePattern--Gather_axes' type=int64 shape=(1,) -- array([0])
Shape(x, start=1, end=2) -> GatherShapePattern--Gather_1d_0
Squeeze(GatherShapePattern--Gather_1d_0, GatherShapePattern--Gather_axes) -> seq
Add(seq, init_3) -> add
Unsqueeze(add, init_4) -> unsqueeze_2
Shape(x, start=0, end=1) -> shape
Concat(shape, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[0.0]) -> output
output: name='output' type=dtype('float32') shape=['batch', 'seq+1']
ShapeBased#
code: yobx.torch.testing._model_eval_cases.ShapeBased
forward#
def forward(self, x):
shape = x.shape
new_shape = (shape[0], shape[1] + 1)
return torch.zeros(new_shape, dtype=torch.float32)
yobx#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 'seq']
init: name='init' type=int64 shape=() -- array([1])
init: name='init_5' type=int64 shape=(1,) -- array([0])
Shape(x, start=0, end=1) -> shape
Shape(x, start=1, end=2) -> shape_2
Squeeze(shape_2) -> sym_size_int_3
Add(sym_size_int_3, init) -> add_3
Unsqueeze(add_3, init_5) -> unsqueeze_2
Concat(shape, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[0.0]) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's27+1']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 'seq']
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='init_5' type=int64 shape=() -- array([1])
init: name='init_9' type=int64 shape=(1,) -- array([0])
init: name='GatherToSlicePattern--getitemB_index_3_starts' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--getitemB_index_3_ends' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--getitemB_index_3_axes' type=int64 shape=(1,) -- array([0])
Shape(x) -> size
Slice(size, GatherToSlicePattern--getitemB_index_3_starts, GatherToSlicePattern--getitemB_index_3_ends, GatherToSlicePattern--getitemB_index_3_axes) -> gather_2
Squeeze(gather_2, init_4) -> getitem_1
Add(getitem_1, init_5) -> add_3
Unsqueeze(add_3, init_9) -> unsqueeze_2
Shape(x, start=0, end=1) -> gather
Concat(gather, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[0.0]) -> output
output: name='output' type=dtype('float32') shape=['getitem', 'add']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#2[(T1s3x4,),(T1s5x4,)]shapes:
dict(x:{0:Dim(batch),1:Dim(seq)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 'seq']
init: name='init_3' type=int64 shape=() -- array([1])
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='GatherShapePattern--Gather_axes' type=int64 shape=(1,) -- array([0])
Shape(x, start=1, end=2) -> GatherShapePattern--Gather_1d_0
Squeeze(GatherShapePattern--Gather_1d_0, GatherShapePattern--Gather_axes) -> seq
Add(seq, init_3) -> add
Unsqueeze(add, init_4) -> unsqueeze_2
Shape(x, start=0, end=1) -> shape
Concat(shape, unsqueeze_2, axis=0) -> concat
ConstantOfShape(concat, value=[0.0]) -> output
output: name='output' type=dtype('float32') shape=['batch', 'seq+1']
SignatureFloat1#
code: yobx.torch.testing._model_eval_cases.SignatureFloat1
forward#
def forward(self, x, alpha: float = 2.0):
return torch.sigmoid(self.linear(x)) - self.buff * alpha
yobx#
inputs:
#2[(T1s4x3,float),(T1s8x3,float)]shapes:
({0:Dim(batch)},None)
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='p_linear_bias' type=float32 shape=(1,) -- array([0.5253242], dtype=float32)
init: name='transpose' type=float32 shape=(3, 1) -- array([ 0.48314863, -0.52029175, 0.3521125 ], dtype=float32)
init: name='mul' type=float32 shape=(1,) -- array([0.75], dtype=float32)
Gemm(x, transpose, p_linear_bias) -> add
Sigmoid(add) -> sigmoid
Sub(sigmoid, mul) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 1]
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
FAILED
diff.1
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
Unable to interpret method 'aten_meth_mul', args=(buff, alpha), kwargs={}, dispatcher=None
OnnxLightGraphBuilder(opsets={'': 21}, inputs=['x', 'alpha'])
new-tracing#
inputs:
#2[(T1s4x3,float),(T1s8x3,float)]shapes:
({0:Dim(batch)},None)
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='param_1' type=float32 shape=(3, 1) -- array([-0.19209008, 0.0347902 , 0.28976443], dtype=float32)
init: name='param_2' type=float32 shape=(1,) -- array([0.75], dtype=float32)
init: name='linear_bias' type=float32 shape=(1,) -- array([0.01834778], dtype=float32)
Gemm(x, param_1, linear_bias, alpha=1.00, beta=1.00) -> addmm_default
Sigmoid(addmm_default) -> sigmoid_default
Sub(sigmoid_default, param_2) -> output
output: name='output' type=dtype('float32') shape=['batch', 1]
FAILED
diff.1
SignatureInt1#
code: yobx.torch.testing._model_eval_cases.SignatureInt1
forward#
def forward(self, x, i: int = 2):
return torch.sigmoid(self.linear(x)) - self.buff + x[:, i : i + 1]
yobx#
inputs:
#2[(T1s4x3,int),(T1s8x3,int)]shapes:
({0:Dim(batch)},None)
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='b_buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='init_2' type=int64 shape=(1,) -- array([2])
init: name='init_3' type=int64 shape=(1,) -- array([1])
init: name='p_linear_bias' type=float32 shape=(1,) -- array([0.42117906], dtype=float32)
init: name='transpose' type=float32 shape=(3, 1) -- array([ 0.04187103, -0.20054054, -0.44319838], dtype=float32)
Gemm(x, transpose, p_linear_bias) -> add_2
Sigmoid(add_2) -> sigmoid
Sub(sigmoid, b_buff) -> sub
Slice(x, init, init_2, init_3) -> slice_1
Add(sub, slice_1) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 1]
FAILED
diff.1
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
[ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running Concat node. Name:'_getitem_slicenSD' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/concatbase.h:120 onnxruntime::common::Status onnxruntime::ConcatBase::PrepareForComputeImpl(KernelContextType*, const InlinedTensorsVector&, onnxruntime::Prepare&) const [with KernelContextType = onnxruntime::OpKernelContext; InlinedTensorsVector = absl::lts_20250814::InlinedVector<const onnxruntime::Tensor*, 5, std::allocator<const onnxruntime::Tensor*> >] input_rank == reference_rank was false. Ranks of input data are different, cannot concatenate them. expected rank: 1 got: 2
new-tracing#
inputs:
#2[(T1s4x3,int),(T1s8x3,int)]shapes:
({0:Dim(batch)},None)
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='param_1' type=float32 shape=(3, 1) -- array([ 0.25395203, -0.5098907 , 0.26325256], dtype=float32)
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='init_2' type=int64 shape=(1,) -- array([2])
init: name='init_3' type=int64 shape=(1,) -- array([1])
init: name='linear_bias' type=float32 shape=(1,) -- array([-0.04788198], dtype=float32)
Gemm(x, param_1, linear_bias, alpha=1.00, beta=1.00) -> addmm_default
Sigmoid(addmm_default) -> sigmoid_default
Sub(sigmoid_default, buff) -> sub_tensor
Slice(x, init, init_2, init_3) -> slice_tensor
Add(sub_tensor, slice_tensor) -> output
output: name='output' type=dtype('float32') shape=['batch', 1]
FAILED
diff.1
SignatureInt2#
code: yobx.torch.testing._model_eval_cases.SignatureInt2
forward#
def forward(self, x, i: int = 2):
return torch.sigmoid(self.linear(x)) - self.buff + x[:, i]
yobx#
inputs:
#1[(T1s4x3,int)]shapes:
dict(x:{0:Dim(batch)},i:None)
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='b_buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='GatherToSlicePattern--select_int_starts' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--select_int_ends' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--select_int_axes' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--select_int_sq_axes' type=int64 shape=(1,) -- array([1])
init: name='p_linear_bias' type=float32 shape=(1,) -- array([0.5647114], dtype=float32)
init: name='transpose' type=float32 shape=(3, 1) -- array([-0.04619782, -0.11210258, 0.43280333], dtype=float32)
Gemm(x, transpose, p_linear_bias) -> add_2
Sigmoid(add_2) -> sigmoid
Sub(sigmoid, b_buff) -> sub
Slice(x, GatherToSlicePattern--select_int_starts, GatherToSlicePattern--select_int_ends, GatherToSlicePattern--select_int_axes) -> GatherToSlicePattern--select_int_sliced_0
Squeeze(GatherToSlicePattern--select_int_sliced_0, GatherToSlicePattern--select_int_sq_axes) -> select
Add(sub, select) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's77']
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s4x3,int)]shapes:
dict(x:{0:Dim(batch)},i:None)
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='i' type=dtype('int64') shape=[]
init: name='buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='getitem_axis' type=int64 shape=(2,) -- array([0, 1])
init: name='getitem_axis_0' type=int64 shape=(1,) -- array([0])
init: name='init' type=int64 shape=() -- array([1])
init: name='init_2' type=int64 shape=(1,) -- array([0])
init: name='init_3' type=int64 shape=(1,) -- array([0])
init: name='init_4' type=int64 shape=(1,) -- array([0])
init: name='getitem_step' type=int64 shape=(2,) -- array([1, 1])
init: name='init_5' type=int64 shape=(1,) -- array([1])
init: name='linearbias' type=float32 shape=(1,) -- array([-0.56464416], dtype=float32)
init: name='lineartranspose' type=float32 shape=(3, 1) -- array([-0.00741271, -0.46090135, 0.06690528], dtype=float32)
Add(i, init) -> getitem_slice_end_1
Unsqueeze(getitem_slice_end_1, init_2) -> unsqueeze
Gemm(x, lineartranspose, linearbias) -> linearadd
Sigmoid(linearadd) -> sigmoid
Sub(sigmoid, buff) -> sub
Shape(x) -> getitem_shape
GatherElements(getitem_shape, getitem_axis_0) -> getitem_end
Concat(getitem_end, unsqueeze, axis=0) -> concat
Unsqueeze(i, init_3) -> unsqueeze_2
Concat(init_4, unsqueeze_2, axis=0) -> concat_2
Slice(x, concat_2, concat, getitem_axis, getitem_step) -> getitem_sliced
Squeeze(getitem_sliced, init_5) -> getitem
Add(sub, getitem) -> output
output: name='output' type=dtype('float32') shape=['batch', 'Slice_getitem_sliced_dim0']
FAILED
[ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running Concat node. Name:'_getitem_slicenSD' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/concatbase.h:120 onnxruntime::common::Status onnxruntime::ConcatBase::PrepareForComputeImpl(KernelContextType*, const InlinedTensorsVector&, onnxruntime::Prepare&) const [with KernelContextType = onnxruntime::OpKernelContext; InlinedTensorsVector = absl::lts_20250814::InlinedVector<const onnxruntime::Tensor*, 5, std::allocator<const onnxruntime::Tensor*> >] input_rank == reference_rank was false. Ranks of input data are different, cannot concatenate them. expected rank: 1 got: 2
new-tracing#
inputs:
#1[(T1s4x3,int)]shapes:
dict(x:{0:Dim(batch)},i:None)
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
init: name='buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='param_1' type=float32 shape=(3, 1) -- array([-0.10565942, -0.51434773, -0.34781903], dtype=float32)
init: name='GatherToSlicePattern--select_int_starts' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--select_int_ends' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--select_int_axes' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--select_int_sq_axes' type=int64 shape=(1,) -- array([1])
init: name='linear_bias' type=float32 shape=(1,) -- array([0.06053032], dtype=float32)
Gemm(x, param_1, linear_bias, alpha=1.00, beta=1.00) -> addmm_default
Sigmoid(addmm_default) -> sigmoid_default
Sub(sigmoid_default, buff) -> sub_tensor
Slice(x, GatherToSlicePattern--select_int_starts, GatherToSlicePattern--select_int_ends, GatherToSlicePattern--select_int_axes) -> GatherToSlicePattern--select_int_sliced_0
Squeeze(GatherToSlicePattern--select_int_sliced_0, GatherToSlicePattern--select_int_sq_axes) -> select_int
Add(sub_tensor, select_int) -> output
output: name='output' type=dtype('float32') shape=['batch', 'batch']
SignatureListFixedLength#
code: yobx.torch.testing._model_eval_cases.SignatureListFixedLength
forward#
def forward(self, x, lx: list):
return torch.sigmoid(self.linear(x)) - self.buff + lx[0] * lx[1].sum(axis=1, keepdim=True)
yobx#
inputs:
#2[(T1s4x3,#2[T1s4x1,T1s4x2]),(T1s8x3,#2[T1s8x1,T1s8x2])]shapes:
dict(x:{0:Dim(batch)},lx:#2[{0:Dim(batch)},{0:Dim(batch)}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='lx_0' type=dtype('float32') shape=['batch', 1]
input: name='lx_1' type=dtype('float32') shape=['batch', 2]
init: name='b_buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='p_linear_bias' type=float32 shape=(1,) -- array([0.29857025], dtype=float32)
init: name='transpose' type=float32 shape=(3, 1) -- array([0.39444727, 0.19120781, 0.3342032 ], dtype=float32)
Gemm(x, transpose, p_linear_bias) -> add_2
Sigmoid(add_2) -> sigmoid
Sub(sigmoid, b_buff) -> sub
ReduceSum(lx_1, init, keepdims=1) -> sum_1
Mul(lx_0, sum_1) -> mul
Add(sub, mul) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 1]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s4x3,#2[T1s4x1,T1s4x2]),(T1s8x3,#2[T1s8x1,T1s8x2])]shapes:
dict(x:{0:Dim(batch)},lx:#2[{0:Dim(batch)},{0:Dim(batch)}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='lx_0' type=dtype('float32') shape=['batch', 1]
input: name='lx_1' type=dtype('float32') shape=['batch', 2]
init: name='_traced_m2_buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='_traced_m2_linearbias' type=float32 shape=(1,) -- array([-0.50655365], dtype=float32)
init: name='_traced_m2_lineartranspose' type=float32 shape=(3, 1) -- array([ 0.5770819 , 0.12869565, -0.2773152 ], dtype=float32)
Gemm(x, _traced_m2_lineartranspose, _traced_m2_linearbias) -> _traced_m2_linearadd
Sigmoid(_traced_m2_linearadd) -> sigmoid
Sub(sigmoid, _traced_m2_buff) -> sub
ReduceSum(lx_1, init, keepdims=1) -> sum_1
Mul(lx_0, sum_1) -> mul
Add(sub, mul) -> output
output: name='output' type=dtype('float32') shape=['batch', 1]
new-tracing#
inputs:
#2[(T1s4x3,#2[T1s4x1,T1s4x2]),(T1s8x3,#2[T1s8x1,T1s8x2])]shapes:
dict(x:{0:Dim(batch)},lx:#2[{0:Dim(batch)},{0:Dim(batch)}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='lx_0' type=dtype('float32') shape=['batch', 1]
input: name='lx_1' type=dtype('float32') shape=['batch', 2]
init: name='buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='param_1' type=float32 shape=(3, 1) -- array([-0.51822174, -0.26688215, 0.45284477], dtype=float32)
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='linear_bias' type=float32 shape=(1,) -- array([-0.26061574], dtype=float32)
Gemm(x, param_1, linear_bias, alpha=1.00, beta=1.00) -> addmm_default
Sigmoid(addmm_default) -> sigmoid_default
Sub(sigmoid_default, buff) -> sub_tensor
ReduceSum(lx_1, init, keepdims=1) -> sum_dim_int_list
Mul(lx_0, sum_dim_int_list) -> mul_tensor
Add(sub_tensor, mul_tensor) -> output
output: name='output' type=dtype('float32') shape=['batch', 1]
SignatureListFixedWithNone#
code: yobx.torch.testing._model_eval_cases.SignatureListFixedWithNone
forward#
def forward(self, lx):
x = lx[0]
if lx[1] is not None:
x += lx[1]
if lx[2] is not None:
x += lx[2]
return x
yobx#
FAILED
Detected mismatch between the structure of `inputs` and `dynamic_shapes`: `inputs['lx']` has 3 elements, but `dynamic_shapes['lx']` has 2 elements
For more information about this error, see: https://pytorch.org/docs/main/generated/exportdb/index.html#dynamic-shapes-validation
The error above occurred when calling torch.export.export. If you would like to view some more information about this error, and get a list of all other errors that may occur in your export call, you can replace your `export()` call with `draft_export()`.
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
Length mismatch between x (len=3) and dynamic_shapes (len=2); dynamic_shapes must have one entry per element of x, or be None to use no dynamic dimensions, dynamic_shapes=[{0: Dim('batch', min=0)}, {0: Dim('batch', min=0)}]
new-tracing#
FAILED
Length mismatch between arg (3) and the dynamic_shapes (2), name='lx'
SignatureListVariableLength#
code: yobx.torch.testing._model_eval_cases.SignatureListVariableLength
forward#
def forward(self, x, lx: list):
t = torch.cat(lx, dim=1).sum(dim=1, keepdim=True)
return torch.sigmoid(self.linear(x)) - self.buff + t
yobx#
inputs:
#2[(T1s4x3,#2[T1s4x1,T1s4x2]),(T1s8x3,#3[T1s8x1,T1s8x2,T1s8x3])]shapes:
dict(x:{0:Dim(batch)},lx:#2[{0:Dim(batch)},{0:Dim(batch)}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='lx_0' type=dtype('float32') shape=['batch', 1]
input: name='lx_1' type=dtype('float32') shape=['batch', 2]
init: name='b_buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='p_linear_bias' type=float32 shape=(1,) -- array([0.25664717], dtype=float32)
init: name='transpose' type=float32 shape=(3, 1) -- array([-0.55474925, -0.48772657, -0.25109455], dtype=float32)
Concat(lx_0, lx_1, axis=1) -> cat
ReduceSum(cat, init, keepdims=1) -> sum_1
Gemm(x, transpose, p_linear_bias) -> add_2
Sigmoid(add_2) -> sigmoid
Sub(sigmoid, b_buff) -> sub
Add(sub, sum_1) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 1]
FAILED
diff.1
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#2[(T1s4x3,#2[T1s4x1,T1s4x2]),(T1s8x3,#3[T1s8x1,T1s8x2,T1s8x3])]shapes:
dict(x:{0:Dim(batch)},lx:#2[{0:Dim(batch)},{0:Dim(batch)}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='lx_0' type=dtype('float32') shape=['batch', 1]
input: name='lx_1' type=dtype('float32') shape=['batch', 2]
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='_traced_m2_buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='_traced_m2_linearbias' type=float32 shape=(1,) -- array([0.38088936], dtype=float32)
init: name='_traced_m2_lineartranspose' type=float32 shape=(3, 1) -- array([ 0.475609 , -0.4283424, -0.5023286], dtype=float32)
Concat(lx_0, lx_1, axis=1) -> cat
ReduceSum(cat, init, keepdims=1) -> sum_1
Gemm(x, _traced_m2_lineartranspose, _traced_m2_linearbias) -> _traced_m2_linearadd
Sigmoid(_traced_m2_linearadd) -> sigmoid
Sub(sigmoid, _traced_m2_buff) -> sub
Add(sub, sum_1) -> output
output: name='output' type=dtype('float32') shape=['batch', 1]
FAILED
diff.1
new-tracing#
inputs:
#2[(T1s4x3,#2[T1s4x1,T1s4x2]),(T1s8x3,#3[T1s8x1,T1s8x2,T1s8x3])]shapes:
dict(x:{0:Dim(batch)},lx:#2[{0:Dim(batch)},{0:Dim(batch)}])
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='lx_0' type=dtype('float32') shape=['batch', 1]
input: name='lx_1' type=dtype('float32') shape=['batch', 2]
init: name='buff' type=float32 shape=(1,) -- array([0.5], dtype=float32)
init: name='init' type=int64 shape=(1,) -- array([1])
init: name='param_1' type=float32 shape=(3, 1) -- array([-0.13994993, 0.1759408 , 0.20445782], dtype=float32)
init: name='linear_bias' type=float32 shape=(1,) -- array([0.06620608], dtype=float32)
Concat(lx_0, lx_1, axis=1) -> cat_default
ReduceSum(cat_default, init, keepdims=1) -> sum_dim_int_list
Gemm(x, param_1, linear_bias, alpha=1.00, beta=1.00) -> addmm_default
Sigmoid(addmm_default) -> sigmoid_default
Sub(sigmoid_default, buff) -> sub_tensor
Add(sub_tensor, sum_dim_int_list) -> output
output: name='output' type=dtype('float32') shape=['batch', 1]
FAILED
diff.1
SignatureShapeAsIndex#
code: yobx.torch.testing._model_eval_cases.SignatureShapeAsIndex
forward#
def forward(self, x, y):
t = torch.sigmoid(self.linear(x)) + x
return t[:, : y.shape[1]]
yobx#
inputs:
#1[(T1s4x3,T1s4x2)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(batch),1:Dim(length)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='y' type=dtype('float32') shape=['batch', 'length']
init: name='init' type=int64 shape=(1,) -- array([0])
init: name='init_3' type=int64 shape=(1,) -- array([1])
init: name='p_linear_bias' type=float32 shape=(1,) -- array([-0.45025384], dtype=float32)
init: name='transpose' type=float32 shape=(3, 1) -- array([-0.10076524, 0.35315204, 0.27868503], dtype=float32)
Gemm(x, transpose, p_linear_bias) -> add_2
Sigmoid(add_2) -> sigmoid
Add(sigmoid, x) -> add
Shape(y, start=1, end=2) -> shape
Slice(add, init, shape, init_3) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 's94']
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s4x3,T1s4x2)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(batch),1:Dim(length)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='y' type=dtype('float32') shape=['batch', 'length']
init: name='getitem_2_axis' type=int64 shape=(2,) -- array([0, 1])
init: name='getitem_2_axis_0' type=int64 shape=(1,) -- array([0])
init: name='getitem_2_start' type=int64 shape=(2,) -- array([0, 0])
init: name='getitem_2_step' type=int64 shape=(2,) -- array([1, 1])
init: name='GatherToSlicePattern--getitemB_index_3_starts' type=int64 shape=(1,) -- array([1])
init: name='GatherToSlicePattern--getitemB_index_3_ends' type=int64 shape=(1,) -- array([2])
init: name='GatherToSlicePattern--getitemB_index_3_axes' type=int64 shape=(1,) -- array([0])
init: name='linearbias' type=float32 shape=(1,) -- array([-0.04907589], dtype=float32)
init: name='lineartranspose' type=float32 shape=(3, 1) -- array([ 0.14392179, -0.33045352, -0.02833422], dtype=float32)
Gemm(x, lineartranspose, linearbias) -> linearadd
Sigmoid(linearadd) -> sigmoid
Add(sigmoid, x) -> add
Shape(add) -> getitem_2_shape
GatherElements(getitem_2_shape, getitem_2_axis_0) -> getitem_2_end
Shape(y) -> size
Slice(size, GatherToSlicePattern--getitemB_index_3_starts, GatherToSlicePattern--getitemB_index_3_ends, GatherToSlicePattern--getitemB_index_3_axes) -> gather_2
Concat(getitem_2_end, gather_2, axis=0) -> concat
Slice(add, getitem_2_start, concat, getitem_2_axis, getitem_2_step) -> output
output: name='output' type=dtype('float32') shape=['Slice_getitem_2_dim0', 'Slice_getitem_2_dim1']
new-tracing#
inputs:
#1[(T1s4x3,T1s4x2)]shapes:
dict(x:{0:Dim(batch)},y:{0:Dim(batch),1:Dim(length)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 3]
input: name='y' type=dtype('float32') shape=['batch', 'length']
init: name='param_1' type=float32 shape=(3, 1) -- array([-0.10841278, 0.13507777, 0.16682905], dtype=float32)
init: name='init' type=int64 shape=(1,) -- array([0])
init: name='init_3' type=int64 shape=(1,) -- array([1])
init: name='linear_bias' type=float32 shape=(1,) -- array([0.15570782], dtype=float32)
Gemm(x, param_1, linear_bias, alpha=1.00, beta=1.00) -> addmm_default
Sigmoid(addmm_default) -> sigmoid_default
Add(sigmoid_default, x) -> add_tensor
Shape(y, start=1, end=2) -> shape
Slice(add_tensor, init, shape, init_3) -> output
output: name='output' type=dtype('float32') shape=['batch', 'length']
TinyLLM#
code: yobx.torch.testing._model_eval_cases.TinyLLM
forward#
def forward(self, input_ids, attention_mask, position_ids, past_key_0, past_value_0):
"""Performs the forward pass and returns the logits tensor."""
past_key_values = make_dynamic_cache([(past_key_0, past_value_0)])
return self._model(
input_ids=input_ids,
attention_mask=attention_mask,
position_ids=position_ids,
past_key_values=past_key_values,
).logits
yobx#
inputs:
#1[(T7s2x3,T7s2x33,T7s2x3,T1s2x1x30x96,T1s2x1x30x96)]shapes:
dict(input_ids:{0:DYNAMIC,1:DYNAMIC},attention_mask:{0:DYNAMIC,1:DYNAMIC},position_ids:{0:DYNAMIC,1:DYNAMIC},past_key_0:{0:DYNAMIC,2:DYNAMIC},past_value_0:{0:DYNAMIC,2:DYNAMIC})
opset: domain='intermediate' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='input_ids' type=dtype('int64') shape=['s72', 's70']
input: name='attention_mask' type=dtype('int64') shape=['s43', 's53']
input: name='position_ids' type=dtype('int64') shape=['s44', 's9']
input: name='past_key_0' type=dtype('float32') shape=['s2', 1, 's15', 96]
input: name='past_value_0' type=dtype('float32') shape=['s4', 1, 's95', 96]
init: name='b__model_model_rotary_emb_inv_freq' type=float32 shape=(48,)
init: name='init_3' type=int64 shape=() -- array([0])
init: name='init_4' type=int64 shape=() -- array([1])
init: name='init_6' type=int64 shape=() -- array([1])
init: name='init_9' type=int64 shape=() -- array([1])
init: name='init_23' type=int64 shape=(1,) -- array([-1])
init: name='init_24' type=int64 shape=(1,) -- array([-1])
init: name='init_29' type=float32 shape=() -- array([2.], dtype=float32)
init: name='init_30' type=int64 shape=(1,) -- array([-1])
init: name='init_37' type=int64 shape=(1,) -- array([1])
init: name='init_38' type=int64 shape=(1,) -- array([1])
init: name='init_51' type=int64 shape=(1,) -- array([2])
init: name='init_61' type=int64 shape=(1,) -- array([2])
init: name='init_66' type=int64 shape=(1,) -- array([1])
init: name='init_67' type=int64 shape=(1,) -- array([2])
init: name='init_68' type=int64 shape=(1,) -- array([96])
init: name='init_73' type=float32 shape=(1,) -- array([0.31947157], dtype=float32)
init: name='init_85' type=float32 shape=() -- array([2.], dtype=float32)
init: name='init_86' type=int64 shape=(1,) -- array([-1])
init: name='init_89' type=float32 shape=() -- array([2.], dtype=float32)
init: name='init_90' type=int64 shape=(1,) -- array([-1])
init: name='ShapeBasedEditDistanceReshapePattern_shape' type=int64 shape=(4,) -- array([ 0, 0, 2, 96])
init: name='ShapeBasedEditDistanceReshapePattern_shape_4' type=int64 shape=(4,) -- array([ 0, 2, 0, 96])
init: name='ShapeBasedEditDistanceReshapePattern_shape_5' type=int64 shape=(3,) -- array([ 0, 0, 192])
init: name='SwapRangeAddScalarPattern--reshape_7_4' type=int64 shape=() -- array([0])
init: name='reshape_11' type=float32 shape=(1,) -- array([1.e-05], dtype=float32)
init: name='ShapeBasedConcatExpandPattern--expand_B_neg_2_shape_0' type=int64 shape=(5,)
init: name='reshape_14' type=float32 shape=(1,) -- array([1.e-05], dtype=float32)
init: name='reshape_15' type=float32 shape=(1,) -- array([1.e-05], dtype=float32)
init: name='ShapeBasedReshapeIsSqueezePattern_axes_11' type=int64 shape=(1,) -- array([1])
init: name='ShapeBasedReshapeIsSqueezePattern_axes_12' type=int64 shape=(1,) -- array([1])
init: name='UnsqueezeUnsqueezePattern--UnsqueezeUnsqueezePattern--unsqueeze_axes' type=int64 shape=(3,) -- array([1, 2, 3])
init: name='UnsqueezeUnsqueezePattern--UnsqueezeUnsqueezePattern--unsqueeze_4_axes' type=int64 shape=(3,) -- array([0, 1, 3])
init: name='UnsqueezeUnsqueezePattern--UnsqueezeUnsqueezePattern--unsqueeze_7_axes' type=int64 shape=(3,) -- array([0, 1, 2])
init: name='UnsqueezeReshapePattern_axes' type=int64 shape=(1,) -- array([1])
init: name='UnsqueezeReshapePattern_axes_0' type=int64 shape=(1,) -- array([1])
init: name='p__model_model_embed_tokens_weight' type=float32 shape=(32000, 192)
init: name='p__model_model_layers_0_input_layernorm_weight' type=float32 shape=(192,)
init: name='p__model_model_layers_0_post_attention_layernorm_weight' type=float32 shape=(192,)
init: name='p__model_model_norm_weight' type=float32 shape=(192,)
init: name='reshape_8' type=bool shape=(1,) -- array([ True])
init: name='transpose_4' type=float32 shape=(192, 192)
init: name='transpose_5' type=float32 shape=(192, 96)
init: name='transpose_6' type=float32 shape=(192, 96)
init: name='transpose_8' type=float32 shape=(192, 192)
init: name='transpose_9' type=float32 shape=(192, 1024)
init: name='transpose_10' type=float32 shape=(192, 1024)
init: name='transpose_11' type=float32 shape=(1024, 192)
init: name='transpose_12' type=float32 shape=(192, 32000)
Cast(attention_mask, to=9) -> to
Reshape(to, init_23) -> reshape_9
Shape(input_ids, start=1, end=2) -> shape
Shape(past_key_0, start=0, end=1) -> shape_2
Squeeze(shape_2) -> sym_size_int_18
Range(init_3, sym_size_int_18, init_4) -> arange
Unsqueeze(arange, UnsqueezeUnsqueezePattern--UnsqueezeUnsqueezePattern--unsqueeze_axes) -> unsqueeze_2
Shape(past_key_0, start=2, end=3) -> shape_3
Add(shape_3, shape) -> SqueezeAddPattern_add_11_1
Squeeze(SqueezeAddPattern_add_11_1) -> add_11
Range(SwapRangeAddScalarPattern--reshape_7_4, add_11, init_9) -> add_3
Unsqueeze(add_3, UnsqueezeUnsqueezePattern--UnsqueezeUnsqueezePattern--unsqueeze_7_axes) -> unsqueeze_11
Shape(past_value_0, start=2, end=3) -> shape_4
Add(shape, shape_4) -> SqueezeAddPattern_add_12_7
Concat(shape_2, init_66, init_67, SqueezeAddPattern_add_12_7, init_68, axis=0) -> concat_5
Gather(p__model_model_embed_tokens_weight, input_ids) -> embedding
Pow(embedding, init_29) -> pow_1
ReduceMean(pow_1, init_30, keepdims=1) -> mean
Add(mean, reshape_11) -> add_4
Sqrt(add_4) -> sqrt
Reciprocal(sqrt) -> rsqrt
Mul(embedding, rsqrt) -> mul_3
Mul(p__model_model_layers_0_input_layernorm_weight, mul_3) -> mul_4
MatMul(mul_4, transpose_4) -> matmul
Reshape(matmul, ShapeBasedEditDistanceReshapePattern_shape) -> view
Transpose(view, perm=[0,2,1,3]) -> transpose
Shape(attention_mask, start=-1) -> shape_5
Mul(unsqueeze_2, shape_5) -> mul
Add(unsqueeze_11, mul) -> add_13
Shape(add_13) -> shape_6
Squeeze(shape_3) -> SwapRangeAddScalarPattern--reshape_6_2
Add(shape, shape_3) -> SqueezeAddPattern_SwapRangeAddScalarPattern--sym_size_int_13_3_6
Squeeze(SqueezeAddPattern_SwapRangeAddScalarPattern--sym_size_int_13_3_6) -> SwapRangeAddScalarPattern--sym_size_int_13_3
Range(SwapRangeAddScalarPattern--reshape_6_2, SwapRangeAddScalarPattern--sym_size_int_13_3, init_6) -> add_2
Unsqueeze(add_2, UnsqueezeUnsqueezePattern--UnsqueezeUnsqueezePattern--unsqueeze_4_axes) -> unsqueeze_8
LessOrEqual(unsqueeze_11, unsqueeze_8) -> le_3
And(reshape_8, le_3) -> and_1
Reshape(add_13, init_24) -> reshape_10
Gather(reshape_9, reshape_10) -> gather
Reshape(gather, shape_6) -> index
And(and_1, index) -> and_2
Constant(value=[2]) -> init__1
Unsqueeze(position_ids, init__1) -> unsqueeze_12__1
Cast(unsqueeze_12__1, to=1) -> to_3__1
Mul(to_3__1, b__model_model_rotary_emb_inv_freq) -> mul__1
Sin(mul__1) -> usin_1__1
Concat(usin_1__1, usin_1__1, axis=-1) -> wrap_with_set_grad_enabled#1
Unsqueeze(wrap_with_set_grad_enabled#1, init_38) -> unsqueeze_14
Cos(mul__1) -> ucos_0__1
Concat(ucos_0__1, ucos_0__1, axis=-1) -> wrap_with_set_grad_enabled#0
Unsqueeze(wrap_with_set_grad_enabled#0, init_37) -> unsqueeze_13
HalfRotaryEmbedding[intermediate](transpose, unsqueeze_13, unsqueeze_14) -> add_5
MatMul(mul_4, transpose_5) -> matmul_2
Unsqueeze(matmul_2, UnsqueezeReshapePattern_axes) -> transpose_1
HalfRotaryEmbedding[intermediate](transpose_1, unsqueeze_13, unsqueeze_14) -> add_6
Concat(past_key_0, add_6, axis=-2) -> cat_3
Unsqueeze(cat_3, init_51) -> unsqueeze_15
Expand(unsqueeze_15, ShapeBasedConcatExpandPattern--expand_B_neg_2_shape_0) -> expand_1
Squeeze(expand_1, ShapeBasedReshapeIsSqueezePattern_axes_11) -> reshape
MatMul(mul_4, transpose_6) -> matmul_3
Unsqueeze(matmul_3, UnsqueezeReshapePattern_axes_0) -> transpose_2
Concat(past_value_0, transpose_2, axis=-2) -> cat_4
Unsqueeze(cat_4, init_61) -> unsqueeze_16
Expand(unsqueeze_16, concat_5) -> expand_2
Squeeze(expand_2, ShapeBasedReshapeIsSqueezePattern_axes_12) -> reshape_1
LocalAttention_to1[intermediate](add_5, reshape, reshape_1, and_2, init_73) -> scaled_dot_product_attention
Reshape(scaled_dot_product_attention, ShapeBasedEditDistanceReshapePattern_shape_4) -> reshape_2
Transpose(reshape_2, perm=[0,2,1,3]) -> transpose_3
Reshape(transpose_3, ShapeBasedEditDistanceReshapePattern_shape_5) -> reshape_3
MatMul(reshape_3, transpose_8) -> matmul_5
Add(embedding, matmul_5) -> add_7
Pow(add_7, init_85) -> pow_2
ReduceMean(pow_2, init_86, keepdims=1) -> mean_1
Add(mean_1, reshape_14) -> add_8
Sqrt(add_8) -> sqrt_2
Reciprocal(sqrt_2) -> rsqrt_1
Mul(add_7, rsqrt_1) -> mul_17
Mul(p__model_model_layers_0_post_attention_layernorm_weight, mul_17) -> mul_18
MatMul(mul_18, transpose_9) -> matmul_6
Sigmoid(matmul_6) -> sigmoid
Mul(matmul_6, sigmoid) -> silu
MatMul(mul_18, transpose_10) -> matmul_7
Mul(silu, matmul_7) -> mul_19
MatMul(mul_19, transpose_11) -> matmul_8
Add(add_7, matmul_8) -> add_9
Pow(add_9, init_89) -> pow_3
ReduceMean(pow_3, init_90, keepdims=1) -> mean_2
Add(mean_2, reshape_15) -> add_10
Sqrt(add_10) -> sqrt_3
Reciprocal(sqrt_3) -> rsqrt_2
Mul(add_9, rsqrt_2) -> mul_20
Mul(p__model_model_norm_weight, mul_20) -> mul_21
MatMul(mul_21, transpose_12) -> output_0
output: name='output_0' type=dtype('float32') shape=['s2', 's70', 32000]
----- function name=LocalAttention_to1 domain=intermediate
opset: domain='' version=21
opset: domain='intermediate' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'query'
input: 'keys'
input: 'values'
input: 'mask'
input: 'scale_sqrt'
Constant(value=[0.0]) -> zero
Constant(value=[-inf]) -> minfty
Mul(keys, scale_sqrt) -> scaled_keys
Transpose(scaled_keys, perm=[0,1,3,2]) -> scaled_keys_t
Mul(query, scale_sqrt) -> scaled_query
MatMul(scaled_query, scaled_keys_t) -> qk
Where(mask, qk, minfty) -> masked_qk
Softmax(masked_qk, axis=-1) -> softmax
IsNaN(softmax) -> isnan
Where(isnan, zero, softmax) -> filtered
MatMul(filtered, values) -> Y
output: name='Y' type=? shape=?
----- function name=HalfRotaryEmbedding domain=intermediate
opset: domain='' version=21
opset: domain='intermediate' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'X'
input: 'cos_cache'
input: 'sin_cache'
Mul(X, cos_cache) -> x_cos
Split(X, num_outputs=2, axis=-1) -> left, right
Neg(right) -> right_neg
Concat(right_neg, left, axis=-1) -> rotated
Mul(rotated, sin_cache) -> rotated_sin
Add(x_cos, rotated_sin) -> Y
output: name='Y' type=? shape=?
----- function name=PrepareInitializer_1 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='intermediate' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
----- function name=PrepareInitializer_2 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='intermediate' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
Squeeze(input_0) -> output_0
output: name='output_0' type=? shape=?
----- function name=PrepareInitializer_3 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='intermediate' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
Identity(input_0) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
symbolically traced variables cannot be used as inputs to control flow
new-tracing#
FAILED
TracingBool('96*_dyn_61*_dyn_62==0') cannot be converted to a Python bool; the result depends on a symbolic/dynamic dimension. Use torch._check(condition) to assert the condition holds.
TinyLLMfp16#
code: yobx.torch.testing._model_eval_cases.TinyLLMfp16
forward#
def forward(self, input_ids, attention_mask, position_ids, past_key_0, past_value_0):
"""Performs the forward pass and returns the logits tensor."""
past_key_values = make_dynamic_cache([(past_key_0, past_value_0)])
return self._model(
input_ids=input_ids,
attention_mask=attention_mask,
position_ids=position_ids,
past_key_values=past_key_values,
).logits
yobx#
inputs:
#1[(T7s2x3,T7s2x33,T7s2x3,T10s2x1x30x96,T10s2x1x30x96)]shapes:
dict(input_ids:{0:DYNAMIC,1:DYNAMIC},attention_mask:{0:DYNAMIC,1:DYNAMIC},position_ids:{0:DYNAMIC,1:DYNAMIC},past_key_0:{0:DYNAMIC,2:DYNAMIC},past_value_0:{0:DYNAMIC,2:DYNAMIC})
opset: domain='intermediate' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='input_ids' type=dtype('int64') shape=['s72', 's70']
input: name='attention_mask' type=dtype('int64') shape=['s43', 's53']
input: name='position_ids' type=dtype('int64') shape=['s44', 's9']
input: name='past_key_0' type=dtype('float16') shape=['s2', 1, 's15', 96]
input: name='past_value_0' type=dtype('float16') shape=['s4', 1, 's95', 96]
init: name='b__model_model_rotary_emb_inv_freq' type=float16 shape=(48,)
init: name='init_3' type=int64 shape=() -- array([0])
init: name='init_4' type=int64 shape=() -- array([1])
init: name='init_6' type=int64 shape=() -- array([1])
init: name='init_9' type=int64 shape=() -- array([1])
init: name='init_23' type=int64 shape=(1,) -- array([-1])
init: name='init_24' type=int64 shape=(1,) -- array([-1])
init: name='init_29' type=float32 shape=() -- array([2.], dtype=float32)
init: name='init_30' type=int64 shape=(1,) -- array([-1])
init: name='init_37' type=int64 shape=(1,) -- array([1])
init: name='init_38' type=int64 shape=(1,) -- array([1])
init: name='init_51' type=int64 shape=(1,) -- array([2])
init: name='init_61' type=int64 shape=(1,) -- array([2])
init: name='init_66' type=int64 shape=(1,) -- array([1])
init: name='init_67' type=int64 shape=(1,) -- array([2])
init: name='init_68' type=int64 shape=(1,) -- array([96])
init: name='init_73' type=float16 shape=(1,) -- array([0.3193], dtype=float16)
init: name='init_85' type=float32 shape=() -- array([2.], dtype=float32)
init: name='init_86' type=int64 shape=(1,) -- array([-1])
init: name='init_89' type=float32 shape=() -- array([2.], dtype=float32)
init: name='init_90' type=int64 shape=(1,) -- array([-1])
init: name='ShapeBasedEditDistanceReshapePattern_shape' type=int64 shape=(4,) -- array([ 0, 0, 2, 96])
init: name='ShapeBasedEditDistanceReshapePattern_shape_4' type=int64 shape=(4,) -- array([ 0, 2, 0, 96])
init: name='ShapeBasedEditDistanceReshapePattern_shape_5' type=int64 shape=(3,) -- array([ 0, 0, 192])
init: name='SwapRangeAddScalarPattern--reshape_7_4' type=int64 shape=() -- array([0])
init: name='reshape_11' type=float32 shape=(1,) -- array([1.e-05], dtype=float32)
init: name='ShapeBasedConcatExpandPattern--expand_B_neg_2_shape_0' type=int64 shape=(5,)
init: name='reshape_14' type=float32 shape=(1,) -- array([1.e-05], dtype=float32)
init: name='reshape_15' type=float32 shape=(1,) -- array([1.e-05], dtype=float32)
init: name='ShapeBasedReshapeIsSqueezePattern_axes_11' type=int64 shape=(1,) -- array([1])
init: name='ShapeBasedReshapeIsSqueezePattern_axes_12' type=int64 shape=(1,) -- array([1])
init: name='UnsqueezeUnsqueezePattern--UnsqueezeUnsqueezePattern--unsqueeze_axes' type=int64 shape=(3,) -- array([1, 2, 3])
init: name='UnsqueezeUnsqueezePattern--UnsqueezeUnsqueezePattern--unsqueeze_4_axes' type=int64 shape=(3,) -- array([0, 1, 3])
init: name='UnsqueezeUnsqueezePattern--UnsqueezeUnsqueezePattern--unsqueeze_7_axes' type=int64 shape=(3,) -- array([0, 1, 2])
init: name='UnsqueezeReshapePattern_axes' type=int64 shape=(1,) -- array([1])
init: name='UnsqueezeReshapePattern_axes_0' type=int64 shape=(1,) -- array([1])
init: name='p__model_model_embed_tokens_weight' type=float16 shape=(32000, 192)
init: name='p__model_model_layers_0_input_layernorm_weight' type=float16 shape=(192,)
init: name='p__model_model_layers_0_post_attention_layernorm_weight' type=float16 shape=(192,)
init: name='p__model_model_norm_weight' type=float16 shape=(192,)
init: name='reshape_8' type=bool shape=(1,) -- array([ True])
init: name='transpose_4' type=float16 shape=(192, 192)
init: name='transpose_5' type=float16 shape=(192, 96)
init: name='transpose_6' type=float16 shape=(192, 96)
init: name='transpose_8' type=float16 shape=(192, 192)
init: name='transpose_9' type=float16 shape=(192, 1024)
init: name='transpose_10' type=float16 shape=(192, 1024)
init: name='transpose_11' type=float16 shape=(1024, 192)
init: name='transpose_12' type=float16 shape=(192, 32000)
Cast(attention_mask, to=9) -> to
Reshape(to, init_23) -> reshape_9
Shape(input_ids, start=1, end=2) -> shape
Shape(past_key_0, start=0, end=1) -> shape_2
Squeeze(shape_2) -> sym_size_int_18
Range(init_3, sym_size_int_18, init_4) -> arange
Unsqueeze(arange, UnsqueezeUnsqueezePattern--UnsqueezeUnsqueezePattern--unsqueeze_axes) -> unsqueeze_2
Shape(past_key_0, start=2, end=3) -> shape_3
Add(shape_3, shape) -> SqueezeAddPattern_add_11_1
Squeeze(SqueezeAddPattern_add_11_1) -> add_11
Range(SwapRangeAddScalarPattern--reshape_7_4, add_11, init_9) -> add_3
Unsqueeze(add_3, UnsqueezeUnsqueezePattern--UnsqueezeUnsqueezePattern--unsqueeze_7_axes) -> unsqueeze_11
Shape(past_value_0, start=2, end=3) -> shape_4
Add(shape, shape_4) -> SqueezeAddPattern_add_12_7
Concat(shape_2, init_66, init_67, SqueezeAddPattern_add_12_7, init_68, axis=0) -> concat_5
Gather(p__model_model_embed_tokens_weight, input_ids) -> embedding
Cast(embedding, to=1) -> to_7
Pow(to_7, init_29) -> pow_1
ReduceMean(pow_1, init_30, keepdims=1) -> mean
Add(mean, reshape_11) -> add_4
Sqrt(add_4) -> sqrt
Reciprocal(sqrt) -> rsqrt
Mul(to_7, rsqrt) -> mul_3
Cast(mul_3, to=10) -> to_8
Mul(p__model_model_layers_0_input_layernorm_weight, to_8) -> mul_4
MatMul(mul_4, transpose_4) -> matmul
Reshape(matmul, ShapeBasedEditDistanceReshapePattern_shape) -> view
Transpose(view, perm=[0,2,1,3]) -> transpose
Shape(attention_mask, start=-1) -> shape_5
Mul(unsqueeze_2, shape_5) -> mul
Add(unsqueeze_11, mul) -> add_13
Shape(add_13) -> shape_6
Squeeze(shape_3) -> SwapRangeAddScalarPattern--reshape_6_2
Add(shape, shape_3) -> SqueezeAddPattern_SwapRangeAddScalarPattern--sym_size_int_13_3_6
Squeeze(SqueezeAddPattern_SwapRangeAddScalarPattern--sym_size_int_13_3_6) -> SwapRangeAddScalarPattern--sym_size_int_13_3
Range(SwapRangeAddScalarPattern--reshape_6_2, SwapRangeAddScalarPattern--sym_size_int_13_3, init_6) -> add_2
Unsqueeze(add_2, UnsqueezeUnsqueezePattern--UnsqueezeUnsqueezePattern--unsqueeze_4_axes) -> unsqueeze_8
LessOrEqual(unsqueeze_11, unsqueeze_8) -> le_3
And(reshape_8, le_3) -> and_1
Reshape(add_13, init_24) -> reshape_10
Gather(reshape_9, reshape_10) -> gather
Reshape(gather, shape_6) -> index
And(and_1, index) -> and_2
Constant(value=[2]) -> init__1
Unsqueeze(position_ids, init__1) -> unsqueeze_12__1
Cast(unsqueeze_12__1, to=1) -> to_3__1
Cast(b__model_model_rotary_emb_inv_freq, to=1) -> to_4__1
Mul(to_3__1, to_4__1) -> mul__1
Sin(mul__1) -> usin_1__1
Concat(usin_1__1, usin_1__1, axis=-1) -> sin__1
Cast(sin__1, to=10) -> wrap_with_set_grad_enabled#1
Unsqueeze(wrap_with_set_grad_enabled#1, init_38) -> unsqueeze_14
Cos(mul__1) -> ucos_0__1
Concat(ucos_0__1, ucos_0__1, axis=-1) -> mul_3__1
Cast(mul_3__1, to=10) -> wrap_with_set_grad_enabled#0
Unsqueeze(wrap_with_set_grad_enabled#0, init_37) -> unsqueeze_13
HalfRotaryEmbedding[intermediate](transpose, unsqueeze_13, unsqueeze_14) -> add_5
MatMul(mul_4, transpose_5) -> matmul_2
Unsqueeze(matmul_2, UnsqueezeReshapePattern_axes) -> transpose_1
HalfRotaryEmbedding[intermediate](transpose_1, unsqueeze_13, unsqueeze_14) -> add_6
Concat(past_key_0, add_6, axis=-2) -> cat_3
Unsqueeze(cat_3, init_51) -> unsqueeze_15
Expand(unsqueeze_15, ShapeBasedConcatExpandPattern--expand_B_neg_2_shape_0) -> expand_1
Squeeze(expand_1, ShapeBasedReshapeIsSqueezePattern_axes_11) -> reshape
MatMul(mul_4, transpose_6) -> matmul_3
Unsqueeze(matmul_3, UnsqueezeReshapePattern_axes_0) -> transpose_2
Concat(past_value_0, transpose_2, axis=-2) -> cat_4
Unsqueeze(cat_4, init_61) -> unsqueeze_16
Expand(unsqueeze_16, concat_5) -> expand_2
Squeeze(expand_2, ShapeBasedReshapeIsSqueezePattern_axes_12) -> reshape_1
LocalAttention_to10[intermediate](add_5, reshape, reshape_1, and_2, init_73) -> scaled_dot_product_attention
Reshape(scaled_dot_product_attention, ShapeBasedEditDistanceReshapePattern_shape_4) -> reshape_2
Transpose(reshape_2, perm=[0,2,1,3]) -> transpose_3
Reshape(transpose_3, ShapeBasedEditDistanceReshapePattern_shape_5) -> reshape_3
MatMul(reshape_3, transpose_8) -> matmul_5
Add(embedding, matmul_5) -> add_7
Cast(add_7, to=1) -> to_9
Pow(to_9, init_85) -> pow_2
ReduceMean(pow_2, init_86, keepdims=1) -> mean_1
Add(mean_1, reshape_14) -> add_8
Sqrt(add_8) -> sqrt_2
Reciprocal(sqrt_2) -> rsqrt_1
Mul(to_9, rsqrt_1) -> mul_17
Cast(mul_17, to=10) -> to_10
Mul(p__model_model_layers_0_post_attention_layernorm_weight, to_10) -> mul_18
MatMul(mul_18, transpose_9) -> matmul_6
Sigmoid(matmul_6) -> sigmoid
Mul(matmul_6, sigmoid) -> silu
MatMul(mul_18, transpose_10) -> matmul_7
Mul(silu, matmul_7) -> mul_19
MatMul(mul_19, transpose_11) -> matmul_8
Add(add_7, matmul_8) -> add_9
Cast(add_9, to=1) -> to_11
Pow(to_11, init_89) -> pow_3
ReduceMean(pow_3, init_90, keepdims=1) -> mean_2
Add(mean_2, reshape_15) -> add_10
Sqrt(add_10) -> sqrt_3
Reciprocal(sqrt_3) -> rsqrt_2
Mul(to_11, rsqrt_2) -> mul_20
Cast(mul_20, to=10) -> to_12
Mul(p__model_model_norm_weight, to_12) -> mul_21
MatMul(mul_21, transpose_12) -> output_0
output: name='output_0' type=dtype('float16') shape=['s2', 's70', 32000]
----- function name=LocalAttention_to10 domain=intermediate
opset: domain='' version=21
opset: domain='intermediate' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'query'
input: 'keys'
input: 'values'
input: 'mask'
input: 'scale_sqrt'
Constant(value=[0.0]) -> zero
Constant(value=[-inf]) -> minfty
Mul(keys, scale_sqrt) -> scaled_keys
Transpose(scaled_keys, perm=[0,1,3,2]) -> scaled_keys_t
Mul(query, scale_sqrt) -> scaled_query
MatMul(scaled_query, scaled_keys_t) -> qk
Where(mask, qk, minfty) -> masked_qk
Softmax(masked_qk, axis=-1) -> softmax
IsNaN(softmax) -> isnan
Where(isnan, zero, softmax) -> filtered
MatMul(filtered, values) -> Y
output: name='Y' type=? shape=?
----- function name=HalfRotaryEmbedding domain=intermediate
opset: domain='' version=21
opset: domain='intermediate' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'X'
input: 'cos_cache'
input: 'sin_cache'
Mul(X, cos_cache) -> x_cos
Split(X, num_outputs=2, axis=-1) -> left, right
Neg(right) -> right_neg
Concat(right_neg, left, axis=-1) -> rotated
Mul(rotated, sin_cache) -> rotated_sin
Add(x_cos, rotated_sin) -> Y
output: name='Y' type=? shape=?
----- function name=PrepareInitializer_1 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='intermediate' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
----- function name=PrepareInitializer_2 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='intermediate' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
Squeeze(input_0) -> output_0
output: name='output_0' type=? shape=?
----- function name=PrepareInitializer_3 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='intermediate' version=1
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
Identity(input_0) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
symbolically traced variables cannot be used as inputs to control flow
new-tracing#
FAILED
TracingBool('96*_dyn_71*_dyn_72==0') cannot be converted to a Python bool; the result depends on a symbolic/dynamic dimension. Use torch._check(condition) to assert the condition holds.
TypeBFloat16#
code: yobx.torch.testing._model_eval_cases.TypeBFloat16
forward#
def forward(self, x):
xb = x.to(torch.bfloat16)
return (xb + xb).to(torch.float32)
yobx#
inputs:
#1[(T1s4x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
Cast(x, to=16) -> to
Add(to, to) -> add
Cast(add, to=1) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77', 4]
FAILED
[ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for Add(14) node with name 'add_Tensor'
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s4x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
Cast(x, to=16) -> to
Add(to, to) -> add
Cast(add, to=1) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
FAILED
[ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for Add(14) node with name 'add'
new-tracing#
inputs:
#1[(T1s4x4,)]shapes:
dict(x:{0:Dim(batch)})
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['batch', 4]
Cast(x, to=16) -> _to_copy_default
Add(_to_copy_default, _to_copy_default) -> add_tensor
Cast(add_tensor, to=1) -> output
output: name='output' type=dtype('float32') shape=['batch', 4]
FAILED
[ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for Add(14) node with name 'add_Tensor'
Vmap#
code: yobx.torch.testing._model_eval_cases.Vmap
forward#
def forward(self, x, y):
f = lambda x, y: x * y + 1 # noqa: E731
return torch.vmap(f)(x, y)
yobx#
inputs:
#1[(T1s3,T1s3)]shapes:
dict(x:{0:DYNAMIC},y:{0:DYNAMIC})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s77']
input: name='y' type=dtype('float32') shape=['s17']
init: name='init_3' type=float32 shape=() -- array([1.], dtype=float32)
Shape(y, start=0, end=1) -> shape
Squeeze(x) -> squeeze_default
Squeeze(y) -> squeeze_default_1
Mul(squeeze_default, squeeze_default_1) -> mul
Add(mul, init_3) -> add
Expand(add, shape) -> output_0
output: name='output_0' type=dtype('float32') shape=['s77']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
inputs:
#1[(T1s3,T1s3)]shapes:
dict(x:{0:DYNAMIC},y:{0:DYNAMIC})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s26']
input: name='y' type=dtype('float32') shape=['s93']
init: name='reshape' type=float32 shape=(1,) -- array([1.], dtype=float32)
Mul(x, y) -> mul
Add(mul, reshape) -> output
output: name='output' type=dtype('float32') shape=['s26^s93']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
new-tracing#
inputs:
#1[(T1s3,T1s3)]shapes:
dict(x:{0:DYNAMIC},y:{0:DYNAMIC})
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['_dyn_75']
input: name='y' type=dtype('float32') shape=['_dyn_76']
init: name='reshape' type=float32 shape=(1,) -- array([1.], dtype=float32)
Mul(x, y) -> mul_tensor
Add(mul_tensor, reshape) -> output
output: name='output' type=dtype('float32') shape=['_dyn_75']
----- function name=PrepareInitializer_0 domain=onnx.light.rewriting
opset: domain='' version=21
opset: domain='onnx.light.rewriting' version=1
input: 'input_0'
input: 'input_1'
Unsqueeze(input_0, input_1) -> output_0
output: name='output_0' type=? shape=?
VmapPython#
code: yobx.torch.testing._model_eval_cases.VmapPython
forward#
def forward(self, x, y):
f = lambda x, y: x * y + 1 # noqa: E731
return patched_vmap(f)(x, y)
yobx#
inputs:
#1[(T1s3,T1s3)]shapes:
dict(x:{0:DYNAMIC},y:{0:DYNAMIC})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['s77']
input: name='y' type=dtype('float32') shape=['s17']
Scan(x, y, body=G1, num_scan_inputs=2, scan_input_directions=[0,0], scan_output_axes=[0], scan_output_directions=[0]) -> output_0
output: name='output_0' type=dtype('float32') shape=['d_output_0_0']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- scan_0_movedim,scan_1_movedim_1 -> output_0
input: name='scan_0_movedim' type=dtype('float32') shape=None
input: name='scan_1_movedim_1' type=dtype('float32') shape=None
Constant(value=1.0) -> init_3__1
Mul(scan_0_movedim, scan_1_movedim_1) -> mul__1
Add(mul__1, init_3__1) -> output_0
output: name='output_0' type=dtype('float32') shape=[]
dynamo-ir#
FAILED
No module named 'onnxscript'
tracing#
FAILED
'CustomProxyInt' object cannot be interpreted as an integer
new-tracing#
inputs:
#1[(T1s3,T1s3)]shapes:
dict(x:{0:DYNAMIC},y:{0:DYNAMIC})
opset: domain='local_functions' version=1
opset: domain='onnx.light.rewriting' version=1
opset: domain='' version=21
input: name='x' type=dtype('float32') shape=['_dyn_77']
input: name='y' type=dtype('float32') shape=['_dyn_78']
Scan(x, y, body=G1, num_scan_inputs=2, scan_input_directions=[0,0], scan_output_axes=[0], scan_output_directions=[0]) -> output
output: name='output' type=dtype('float32') shape=['d_output_0']
----- subgraph ---- Scan - scan - att.body=G1 -- level=1 -- scan_0_permute_default,scan_1_permute_default_1 -> output_0
input: name='scan_0_permute_default' type=dtype('float32') shape=None
input: name='scan_1_permute_default_1' type=dtype('float32') shape=None
Constant(value=1.0) -> init_3__1
Mul(scan_0_permute_default, scan_1_permute_default_1) -> mul_tensor__1
Add(mul_tensor__1, init_3__1) -> output_0
output: name='output_0' type=dtype('float32') shape=[]
Summary#
case |
dynamo-ir |
new-tracing |
tracing |
yobx |
|---|---|---|---|---|
FAIL |
3 |
3 |
3 |
|
FAIL |
12 |
12 |
12 |
|
FAIL |
3 |
3 |
3 |
|
FAIL |
6 |
6 |
6 |
|
FAIL |
5 |
5 |
5 |
|
FAIL |
2 |
2 |
2 |
|
FAIL |
5 |
4 |
4 |
|
FAIL |
3 |
3 |
3 |
|
FAIL |
4 |
4 |
4 |
|
FAIL |
6 |
6 |
6 |
|
FAIL |
FAIL |
FAIL |
FAIL |
|
FAIL |
FAIL |
FAIL |
FAIL |
|
FAIL |
3 |
3 |
3 |
|
FAIL |
3 |
3 |
3 |
|
FAIL |
3 |
3 |
3 |
|
FAIL |
3 |
3 |
3 |
|
FAIL |
FAIL |
FAIL |
FAIL |
|
FAIL |
3 |
3 |
3 |
|
FAIL |
7 |
3 |
FAIL |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
3 |
3 |
3 |
|
FAIL |
3 |
3 |
3 |
|
FAIL |
3 |
4 |
3 |
|
FAIL |
3 |
4 |
3 |
|
FAIL |
3 |
4 |
3 |
|
FAIL |
3 |
4 |
3 |
|
FAIL |
0 |
0 |
0 |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
2 |
2 |
2 |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
FAIL |
FAIL |
FAIL |
|
FAIL |
8 |
FAIL |
FAIL |
|
FAIL |
3 |
FAIL |
FAIL |
|
FAIL |
3 |
FAIL |
FAIL |
|
FAIL |
5 |
FAIL |
FAIL |
|
FAIL |
7 |
8 |
7 |
|
FAIL |
7 |
8 |
7 |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
2 |
2 |
2 |
|
FAIL |
5 |
5 |
5 |
|
FAIL |
5 |
FAIL |
5 |
|
FAIL |
6 |
7 |
6 |
|
FAIL |
6 |
7 |
6 |
|
FAIL |
4 |
4 |
4 |
|
FAIL |
4 |
4 |
4 |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
2 |
2 |
2 |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
8 |
8 |
FAIL |
|
FAIL |
8 |
8 |
FAIL |
|
FAIL |
8 |
8 |
8 |
|
FAIL |
3 |
3 |
2 |
|
FAIL |
35 |
35 |
FAIL |
|
FAIL |
36 |
36 |
FAIL |
|
FAIL |
37 |
37 |
FAIL |
|
FAIL |
1 |
1 |
1 |
|
FAIL |
7 |
8 |
7 |
|
FAIL |
7 |
8 |
7 |
|
FAIL |
7 |
8 |
7 |
|
FAIL |
FAIL |
FAIL |
FAIL |
|
FAIL |
FAIL |
FAIL |
FAIL |
|
FAIL |
6 |
FAIL |
6 |
|
FAIL |
6 |
6 |
6 |
|
FAIL |
FAIL |
FAIL |
FAIL |
|
FAIL |
FAIL |
FAIL |
FAIL |
|
FAIL |
5 |
9 |
5 |
|
FAIL |
FAIL |
FAIL |
93 |
|
FAIL |
FAIL |
FAIL |
102 |
|
FAIL |
FAIL |
FAIL |
FAIL |
|
FAIL |
2 |
2 |
6 |
|
FAIL |
1 |
FAIL |
1 |
FAIL indicates an export or numerical validation failure; see each case above.
[runpythonerror]
[0;93m2026-11-18 17:22:17.261266243 [W:onnxruntime:Default, device_discovery.cc:95 GetPciBusId] Skipping pci_bus_id for PCI path at “/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0004:00/MSFT1000:00/5620e0c7-8062-4dce-aeb7-520c7ef76171” because filename “5620e0c7-8062-4dce-aeb7-520c7ef76171” did not match expected pattern of [0-9a-f]+:[0-9a-f]+:[0-9a-f]+[.][0-9a-f]+[m
[1;31m2026-11-18 17:22:33.301891417 [E:onnxruntime:, sequential_executor.cc:677 ExecuteKernel] Non-zero status code returned while running Concat node. Name:’_getitem_slicenSD’ Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/concatbase.h:120 onnxruntime::common::Status onnxruntime::ConcatBase::PrepareForComputeImpl(KernelContextType*, const InlinedTensorsVector&, onnxruntime::Prepare&) const [with KernelContextType = onnxruntime::OpKernelContext; InlinedTensorsVector = absl::lts_20250814::InlinedVector<const onnxruntime::Tensor*, 5, std::allocator<const onnxruntime::Tensor*> >] input_rank == reference_rank was false. Ranks of input data are different, cannot concatenate them. expected rank: 1 got: 2
[m
[1;31m2026-11-18 17:22:33.302178220 [E:onnxruntime:, sequential_executor.cc:677 ExecuteKernel] Non-zero status code returned while running Concat node. Name:’_getitem_slicenSD’ Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/concatbase.h:120 onnxruntime::common::Status onnxruntime::ConcatBase::PrepareForComputeImpl(KernelContextType*, const InlinedTensorsVector&, onnxruntime::Prepare&) const [with KernelContextType = onnxruntime::OpKernelContext; InlinedTensorsVector = absl::lts_20250814::InlinedVector<const onnxruntime::Tensor*, 5, std::allocator<const onnxruntime::Tensor*> >] input_rank == reference_rank was false. Ranks of input data are different, cannot concatenate them. expected rank: 1 got: 2
[m
[1;31m2026-11-18 17:22:33.510518693 [E:onnxruntime:, sequential_executor.cc:677 ExecuteKernel] Non-zero status code returned while running Concat node. Name:’_getitem_slicenSD’ Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/concatbase.h:120 onnxruntime::common::Status onnxruntime::ConcatBase::PrepareForComputeImpl(KernelContextType*, const InlinedTensorsVector&, onnxruntime::Prepare&) const [with KernelContextType = onnxruntime::OpKernelContext; InlinedTensorsVector = absl::lts_20250814::InlinedVector<const onnxruntime::Tensor*, 5, std::allocator<const onnxruntime::Tensor*> >] input_rank == reference_rank was false. Ranks of input data are different, cannot concatenate them. expected rank: 1 got: 2
[m
[transformers] loss_type=None was set in the config but it is unrecognized. Using the default loss: ForCausalLMLoss.
nanobind: leaked 587 instances!
leaked instance 0x7c72769aca68 of type “onnx_light.onnx_py._onnxpyprotoop.FunctionProto”
leaked instance 0x592516b1f700 of type “onnx_light.onnx_py._onnxpypatterns.ShapeTransposePattern”
leaked instance 0x59251c063788 of type “onnx_light.onnx_py._onnxpycore.shape_inference.ShapesContext”
leaked instance 0x592516b1b520 of type “onnx_light.onnx_py._onnxpypatterns.IdentityPattern”
leaked instance 0x59251c85a0e8 of type “onnx_light.onnx_core.graph_builder.GraphBuilder”
leaked instance 0x59251ad89e88 of type “onnx_light.onnx_py._onnxpycore.shape_inference.ShapesContext”
leaked instance 0x592516b1ea60 of type “onnx_light.onnx_py._onnxpypatterns.ShapeBasedMatMulToMulPattern”
leaked instance 0x59251bb46428 of type “onnx_light.onnx_py._onnxpycore.shape_inference.ShapesContext”
leaked instance 0x59251ad0eaf8 of type “onnx_light.onnx_py._onnxpycore.shape_inference.ShapesContext”
leaked instance 0x59251b119d28 of type “onnx_light.onnx_core.graph_builder.GraphBuilder”
leaked instance 0x59251c8e2690 of type “onnx_light.onnx_py._onnxpyprotoop.FunctionProto”
leaked instance 0x59251aa33c18 of type “onnx_light.onnx_py._onnxpycore.shape_inference.ShapesContext”
leaked instance 0x59251b45f3b0 of type “onnx_light.onnx_py._onnxpyprotoop.FunctionProto”
leaked instance 0x59251b0f93c8 of type “onnx_light.onnx_core.graph_builder.GraphBuilder”
leaked instance 0x59251ba529b8 of type “onnx_light.onnx_core.graph_builder.GraphBuilder”
leaked instance 0x59251ab655a8 of type “onnx_light.onnx_py._onnxpycore.shape_inference.ShapesContext”
leaked instance 0x592516b18880 of type “onnx_light.onnx_py._onnxpypatterns.CastCastPattern”
leaked instance 0x59251abe0288 of type “onnx_light.onnx_core.graph_builder.GraphBuilder”
leaked instance 0x592516b1e8e0 of type “onnx_light.onnx_py._onnxpypatterns.ReduceArgTopKPattern”
leaked instance 0x59251af85ff8 of type “onnx_light.onnx_py._onnxpycore.shape_inference.ShapesContext”
… skipped remainder
nanobind: leaked 168 keep_alive records! nanobind: leaked 177 types!
leaked type “onnx_light.onnx_py._onnxpypatterns.ExpandUnsqueezeExpandPattern”
leaked type “onnx_light.onnx_py._onnxpypatterns.ConcatEmptyPattern”
leaked type “onnx_light.onnx_py._onnxpypatterns.PartitionGroupPattern”
leaked type “onnx_light.onnx_py._onnxpypatterns.ConvMulFusionPattern”
leaked type “onnx_light.onnx_py._onnxpypatterns.UnsqueezeEqualPattern”
leaked type “DifferentiationCategory”
leaked type “onnx_light.onnx_py._onnxpypatterns.ConcatSliceEliminationPattern”
leaked type “onnx_light.onnx_py._onnxpypatterns.LeakyReluPattern”
leaked type “onnx_light.onnx_py._onnxpyprotoop.GraphProto”
leaked type “onnx_light.onnx_py._onnxpypatterns.LinearAttentionPattern”
… skipped remainder
- nanobind: leaked 1226 functions!
leaked function “has_metadata_props”
leaked function “has_denotation”
leaked function “ParseFromFile”
leaked function “”
leaked function “make_local_function”
leaked function “”
leaked function “”
leaked function “__eq__”
leaked function “add_constraint”
leaked function “ParseFromString”
… skipped remainder
nanobind: this is likely caused by a reference counting issue in the binding code. See https://nanobind.readthedocs.io/en/latest/refleaks.html