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

[REFACTOR][PY][API-CHANGE] establish tvm.ir, migrate corresponding files #4862

Merged
merged 10 commits into from
Feb 12, 2020

Conversation

tqchen
Copy link
Member

@tqchen tqchen commented Feb 11, 2020

This PR establishes tvm.ir and migrates the corresponding relay files into the new folder.

API Change:

  • relay.Module -> tvm.IRModule

@tqchen tqchen changed the title [WIP][REFACTOR][PY] establish tvm.ir, migrate base, expr, type [REFACTOR][PY] establish tvm.ir, migrate base, expr, type, adt Feb 11, 2020
@tqchen
Copy link
Member Author

tqchen commented Feb 11, 2020

Copy link
Member

@zhiics zhiics left a comment

Choose a reason for hiding this comment

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

some small nits.

class Constructor(RelayExpr):
"""Relay ADT constructor.


Copy link
Member

Choose a reason for hiding this comment

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

extra line?

# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
"""Span data structures."""
Copy link
Member

Choose a reason for hiding this comment

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

The file description seems not quite accurate as there are more data structures

if there is meta data.

annotate: Optional[Object->str]
Optional annotate function to provide additional
Copy link
Member

Choose a reason for hiding this comment

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

Optionally

Copy link
Member Author

Choose a reason for hiding this comment

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

Optional is a type annotation in python3

Copy link
Member

Choose a reason for hiding this comment

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

yeah, I was talking about "Optional annotate function to ..." where "Optional" should be an adverb.

Copy link
Member Author

Choose a reason for hiding this comment

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

ah i see, thanks for the catch!

class FuncType(Type):
"""Function type.


Copy link
Member

Choose a reason for hiding this comment

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

extra line?

@tqchen tqchen changed the title [REFACTOR][PY] establish tvm.ir, migrate base, expr, type, adt [REFACTOR][PY] establish tvm.ir, migrate base, expr, type, adt, transform Feb 11, 2020
…lay files.

This PR establishes tvm.ir and migrates the corresponding relay
files into the new folder.

API Change:
- relay.Module -> tvm.IRModule
@tqchen tqchen changed the title [REFACTOR][PY] establish tvm.ir, migrate base, expr, type, adt, transform [REFACTOR][PY][API-CHANGE] establish tvm.ir, migrate corresponding relay files Feb 11, 2020
@tqchen
Copy link
Member Author

tqchen commented Feb 11, 2020

Updated the PR and comment, @zhiics please help to take another look

Copy link
Contributor

@MarisaKirisame MarisaKirisame left a comment

Choose a reason for hiding this comment

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

Why the change of Expr to ExprWithOp?

@tqchen
Copy link
Member Author

tqchen commented Feb 12, 2020

@MarisaKirisame The Base class has been moved to tvm.ir.RelayExpr to reflect the changes in the C++ side, so now ExprWithOp is just a temporary class to add the additional ops. RelayExpr is the real Expr class

@tqchen tqchen changed the title [REFACTOR][PY][API-CHANGE] establish tvm.ir, migrate corresponding relay files [REFACTOR][PY][API-CHANGE] establish tvm.ir, migrate corresponding files Feb 12, 2020
@tqchen tqchen merged commit a566161 into apache:master Feb 12, 2020
@tqchen
Copy link
Member Author

tqchen commented Feb 12, 2020

Thanks @MarisaKirisame @zhiics

alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 26, 2020
…les (apache#4862)

* [REFACTOR][PY][API-CHANGE] establish tvm.ir, migrate corresponding relay files.

This PR establishes tvm.ir and migrates the corresponding relay
files into the new folder.

API Change:
- relay.Module -> tvm.IRModule

* Update with ADT

* Migrate transform

* address comments

* Migrate module

* Migrate json_compact

* Migrate attrs

* Move LoweredFunc to stmt temporarily

* temp migrate container

* Finish migrate container
alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 28, 2020
…les (apache#4862)

* [REFACTOR][PY][API-CHANGE] establish tvm.ir, migrate corresponding relay files.

This PR establishes tvm.ir and migrates the corresponding relay
files into the new folder.

API Change:
- relay.Module -> tvm.IRModule

* Update with ADT

* Migrate transform

* address comments

* Migrate module

* Migrate json_compact

* Migrate attrs

* Move LoweredFunc to stmt temporarily

* temp migrate container

* Finish migrate container
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Mar 2, 2020
…les (apache#4862)

* [REFACTOR][PY][API-CHANGE] establish tvm.ir, migrate corresponding relay files.

This PR establishes tvm.ir and migrates the corresponding relay
files into the new folder.

API Change:
- relay.Module -> tvm.IRModule

* Update with ADT

* Migrate transform

* address comments

* Migrate module

* Migrate json_compact

* Migrate attrs

* Move LoweredFunc to stmt temporarily

* temp migrate container

* Finish migrate container
tqchen added a commit to tqchen/tvm that referenced this pull request Mar 29, 2020
…les (apache#4862)

* [REFACTOR][PY][API-CHANGE] establish tvm.ir, migrate corresponding relay files.

This PR establishes tvm.ir and migrates the corresponding relay
files into the new folder.

API Change:
- relay.Module -> tvm.IRModule

* Update with ADT

* Migrate transform

* address comments

* Migrate module

* Migrate json_compact

* Migrate attrs

* Move LoweredFunc to stmt temporarily

* temp migrate container

* Finish migrate container
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.

3 participants