Skip to content

[Unity][Frontend][NN] Make effects optional in nn module.#15650

Merged
junrushao merged 6 commits intoapache:unityfrom
jwfromm:nn_debug
Sep 2, 2023
Merged

[Unity][Frontend][NN] Make effects optional in nn module.#15650
junrushao merged 6 commits intoapache:unityfrom
jwfromm:nn_debug

Conversation

@jwfromm
Copy link
Copy Markdown
Contributor

@jwfromm jwfromm commented Aug 31, 2023

This PR adds the debug argument to export_tvm. When debug is False, effects are not included in the output graph. This can make deploying models less cumbersome since its not often theyll use effects. I also added automatic annotation of the num_inputs function attribute since it is useful for a few passes.

@jwfromm jwfromm requested a review from junrushao August 31, 2023 16:30
Copy link
Copy Markdown
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. A minor comment. Feel free to skip as a follow-up PR

def export_tvm(
self,
spec: "_spec.ModuleSpecType",
debug: bool = False,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we also add this debug flag to the jit method?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh actually you will need the debug flag in line 405

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, now added.

@junrushao junrushao merged commit 11d5f67 into apache:unity Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants