Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ONNX: Function definition in nested calls are not displayed #1225

Closed
justinchuby opened this issue Feb 9, 2024 · 0 comments
Closed

ONNX: Function definition in nested calls are not displayed #1225

justinchuby opened this issue Feb 9, 2024 · 0 comments
Labels

Comments

@justinchuby
Copy link

  • Netron app and version: 7.4.2

Steps to Reproduce:

  1. Click into torch_nn_modules_container_Sequential_class_layers_1-> torch_nn_modules_pooling_AdaptiveAvgPool2d_class_layers_pool_1-> aten_mean_dim.
  2. Observe that the model local function IsScalar does not have a definition associated with it
    image
  3. The function is defined in a different domain:
import onnx
m = onnx.load("Clara_DenseNet_dynamo.onnx")
print(m.functions[-1])

yields

name: "IsScalar"
input: "input"
output: "return_val"
node {
  input: "input"
  output: "tmp"
  name: "n0"
  op_type: "Shape"
  domain: ""
}
node {
  input: "tmp"
  output: "tmp_0"
  name: "n1"
  op_type: "Size"
  domain: ""
}
node {
  output: "tmp_1"
  name: "n2"
  op_type: "Constant"
  attribute {
    name: "value_int"
    i: 0
    type: INT
  }
  domain: ""
}
node {
  input: "tmp_0"
  input: "tmp_1"
  output: "return_val"
  name: "n3"
  op_type: "Equal"
  domain: ""
}
doc_string: "Return whether the input has rank 0, or is a scalar."
opset_import {
  domain: ""
  version: 18
}
domain: "pkg.onnxscript.torch_lib.common"

Please attach or link model files to reproduce the issue.

Clara_DenseNet_dynamo.zip

Discovered from microsoft/onnxscript#1263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants