Skip to content

[Unity] Minor updates to DataFlowBlockRewrite#14431

Merged
tqchen merged 1 commit intoapache:unityfrom
masahi:dfb-rewrite-update
Mar 30, 2023
Merged

[Unity] Minor updates to DataFlowBlockRewrite#14431
tqchen merged 1 commit intoapache:unityfrom
masahi:dfb-rewrite-update

Conversation

@masahi
Copy link
Copy Markdown
Member

@masahi masahi commented Mar 29, 2023

  • relax/binding_rewrite.py is not imported by default, so we get errors like AttributeError: <class 'tvm.runtime.object.Object'> has no attribute add if we try to pass the C++ object to python

  • DataflowBlock member variable shouldn't be optional, but it is declared with Optional<DataflowBlock> dfb_ and accessed via dfb_.value() all over the places.

  • root_fn_ should be optional (e.g. when DataFlowBlockRewrite is used inside another ExprMutator) , but it's always updated via root_fn_.value() without checking

  • Other minor style updates that hopefully improve readability.

@ganler @tqchen

@tvm-bot
Copy link
Copy Markdown
Collaborator

tvm-bot commented Mar 29, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

@masahi
Copy link
Copy Markdown
Member Author

masahi commented Mar 30, 2023

I just realized that I didn't need to use DataflowBlockRewrite for my purpose. But keeping this PR for now.

@tqchen tqchen merged commit 5d145fd into apache:unity Mar 30, 2023
tqchen pushed a commit that referenced this pull request Apr 1, 2023
tqchen pushed a commit that referenced this pull request Apr 1, 2023
tqchen pushed a commit that referenced this pull request Apr 1, 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.

4 participants