Skip to content

Conversation

@jroesch
Copy link
Member

@jroesch jroesch commented May 6, 2019

The final PR for the runtime series, adds the VM compiler and its associated test cases.

Blocked on: #2889.

@jroesch jroesch force-pushed the runtime-compiler branch from c8fddcc to 156013d Compare May 9, 2019 06:59
@jroesch
Copy link
Member Author

jroesch commented May 9, 2019

@tqchen @wweic @MarisaKirisame @weberlo @icemelon9 @zhiics final bit of VM to review tests are green.


bool IsClosure(const Function& func);
Module LambdaLift(const Module& module);
Module InlinePrimitives(const Module& module);
Copy link
Contributor

Choose a reason for hiding this comment

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

Add comments and an example?


if __name__ == '__main__':
test_resnet()
# test_vgg()
Copy link
Contributor

Choose a reason for hiding this comment

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

enable all the tests here.


inline std::string GenerateName(const Function& func) {
size_t hash = StructuralHash()(func);
return std::string("lifted_name") + std::to_string(hash);
Copy link
Contributor

Choose a reason for hiding this comment

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

what if hash collision? just do a unique binder

Copy link
Member Author

Choose a reason for hiding this comment

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

Hash collision is low, I will just prefix function name too

Copy link
Member

@icemelon icemelon left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@tqchen tqchen left a comment

Choose a reason for hiding this comment

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

some minor nits

using ConstTensorShapeMap = NodeMap<TensorType, std::pair<Index, NDArray>>;

struct VMCompilerContext {
Module module;
Copy link
Member

Choose a reason for hiding this comment

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

document the fields.

@jroesch jroesch merged commit 6a4d71f into apache:master May 11, 2019
wweic pushed a commit to wweic/tvm that referenced this pull request May 13, 2019
* Implement the VM compiler

* Fix issues

* Fix ASF headers

* Fix test issue

* Apply typo fixes.

* Update src/relay/backend/vm/compiler.cc

Co-Authored-By: 雾雨魔理沙 <[email protected]>

* Refactor compiler

* Fix

* Fix

* Fix in benchmark

* Fix

* Address comments
wweic pushed a commit to neo-ai/tvm that referenced this pull request May 13, 2019
* Implement the VM compiler

* Fix issues

* Fix ASF headers

* Fix test issue

* Apply typo fixes.

* Update src/relay/backend/vm/compiler.cc

Co-Authored-By: 雾雨魔理沙 <[email protected]>

* Refactor compiler

* Fix

* Fix

* Fix in benchmark

* Fix

* Address comments
@jroesch jroesch deleted the runtime-compiler branch February 4, 2021 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants