-
Notifications
You must be signed in to change notification settings - Fork 53
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
[WIP] Use IR in onnxscript #1409
base: main
Are you sure you want to change the base?
Conversation
self.callee.name, | ||
[_opt_var_to_str(x) for x in self.args], | ||
[str(x) for x in self.result], | ||
def to_node(self, node_name: str, values: Mapping[str, ir.Value]) -> ir.Node: |
Check warning
Code scanning / lintrunner
PYLINT/W0621 Warning
See redefined-outer-name. To disable, use # pylint: disable=redefined-outer-name
@@ -8,18 +8,18 @@ | |||
import io | |||
import logging | |||
import warnings | |||
from typing import Any, Optional, Protocol, Sequence, Union | |||
from typing import Any, Mapping, Optional, Protocol, Sequence, Union |
Check warning
Code scanning / lintrunner
RUFF/F401 Warning
See https://docs.astral.sh/ruff/rules/unused-import
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1409 +/- ##
===========================================
- Coverage 77.04% 51.25% -25.80%
===========================================
Files 209 200 -9
Lines 22488 20898 -1590
Branches 3813 3607 -206
===========================================
- Hits 17326 10711 -6615
- Misses 4451 9648 +5197
+ Partials 711 539 -172 ☔ View full report in Codecov by Sentry. |
self.name, | ||
inputs=[x.name for x in self.inputs], | ||
outputs=[y.name for y in self.outputs], | ||
values = {} |
Check warning
Code scanning / lintrunner
PYLINT/W0621 Warning
See redefined-outer-name. To disable, use # pylint: disable=redefined-outer-name
self.name, | ||
inputs=[x.name for x in self.inputs], | ||
outputs=[y.name for y in self.outputs], | ||
values = {} |
Check failure
Code scanning / lintrunner
MYPY/var-annotated Error
nodes.append(node) | ||
if node.domain not in opsets: | ||
# FIXME(justinchuby): Node version | ||
assert s.version is not None |
Check failure
Code scanning / lintrunner
MYPY/attr-defined Error
if node.domain not in opsets: | ||
# FIXME(justinchuby): Node version | ||
assert s.version is not None | ||
opsets[node.domain] = s.version |
Check failure
Code scanning / lintrunner
MYPY/attr-defined Error
if output.name in function_outputs: | ||
function_outputs[output.name] = output | ||
inputs = [ir.Input(input.name) for input in self.inputs] | ||
for name, output in function_outputs.items(): |
Check failure
Code scanning / lintrunner
MYPY/assignment Error
return IRAttributeValue(proto) | ||
def make_attr_ref(self, attrname: str, refname: str, pytype: type) -> ir.RefAttr: | ||
return ir.RefAttr( | ||
attrname, refname, ta.pytype_to_attrtype(pytype) |
Check failure
Code scanning / lintrunner
MYPY/arg-type Error
Should stmt subclass node or own a node? |
Test Results 30 files + 2 30 suites +2 15m 37s ⏱️ - 3h 27m 15s For more details on these failures and errors, see this check. Results for commit 060009e. ± Comparison against base commit c979aae. This pull request removes 5451 and adds 18 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
default_value: int | float | str | None, | ||
) -> None: | ||
fn.add_attr_parameter(IRAttributeParameter(varname, attribute_type, default_value)) | ||
fn.add_attr_parameter(ir_convenience.convert_attribute(varname, default_value, attribute_type)) |
Check failure
Code scanning / lintrunner
MYPY/arg-type Error
I think this is outdated and can be closed, right @justinchuby ? |
I will come back to this after exporter. I think some of the code is still relevant |
Fixes #1410