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

[RFC][Frontend] Add a OneFlow Frontend #24

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

hhhfccz
Copy link

@hhhfccz hhhfccz commented Aug 20, 2021

Add a OneFlow frontend for TVM, also I have created a RFC topic in forum where we can discuss at same time.
The related pull request is apache/tvm#8790 .

@tqchen @comaniac @junrushao1994

Comment on lines +76 to +78
res50_module = resnet50()
pretrain_models = flow.load(model_path)
res50_module.load_state_dict(pretrain_models)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does OneFlow support any input model from a file? If so, I'd like also to suggest that you also cover tvmc on your plans/implementation at some point.

Example implementation - https://github.com/apache/tvm/blob/e691c7f83892d7242d0992c78cec1e2f8953a9e3/python/tvm/driver/tvmc/frontends.py#L174-L198

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for your suggestions! We have added this task to Future possibilities.

Copy link

Choose a reason for hiding this comment

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

Thank you for your suggestions! We can't support this feature yet, but it is in our future development plan. After OneFlow supports this feature, we will add it to tvmc .

Copy link
Contributor

@hogepodge hogepodge left a comment

Choose a reason for hiding this comment

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

Perhaps this isn't an issue that is covered in the scope of this RFC, but I'm wondering how independent the importers are from one another, and if it's worthwhile to look at a more general framework for third-party importers.

Are we aiming to support all operators? What does the mapping from OneFlow operators to TVM look like? Will there be gaps that a user will have to be concerned with? What is the plain for maintenance of the new format to import?

- Handle large models easily
- Almost zero runtime overhead & linear speedup
- Support automatic mixed precision
- ...
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this just a placeholder? We should fill out the rest of the motivations or remove the ellipses.

Copy link

Choose a reason for hiding this comment

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

Yes,I will delete it。

Copy link

Choose a reason for hiding this comment

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

Perhaps this isn't an issue that is covered in the scope of this RFC, but I'm wondering how independent the importers are from one another, and if it's worthwhile to look at a more general framework for third-party importers.

Are we aiming to support all operators? What does the mapping from OneFlow operators to TVM look like? Will there be gaps that a user will have to be concerned with? What is the plain for maintenance of the new format to import?

Yes, we will support all commonly used operators. OneFlow will release version 1.0 soon, and our operator interface is aligned with the Pytorch API.

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