[Relay] Move prelude to text format (#3939)
authorLogan Weber <36520469+weberlo@users.noreply.github.com>
Sun, 29 Sep 2019 23:48:10 +0000 (16:48 -0700)
committerJared Roesch <roeschinc@gmail.com>
Sun, 29 Sep 2019 23:48:10 +0000 (16:48 -0700)
commit2dac17d8b694758845ddc1aa00a3289b04af4b15
tree4c2b4296f35e11c262f5639ba30f2ad6413365e6
parent9b46ace16a4ebd30eaa81ede0e230caa78b5d51b
[Relay] Move prelude to text format (#3939)

* Fix parser

* Doc fix

* Add module utility functions necessary for prelude

* Implement prelude in text format

* Remove programmatically constructed prelude defs

* Fix 0-arity type conses in pretty printer and test

* Make prelude loading backwards-compatible

* Fix patterns

* Improve some prelude defs

* Fix `ImportFromStd`

It needs to also follow the "add unchecked, add checked" pattern

* Lint roller

* Woops

* Address feedback

* Fix `test_list_constructor` VM test

* Fix `test_adt.py` failures
15 files changed:
include/tvm/expr.h
include/tvm/relay/expr_functor.h
include/tvm/relay/module.h
include/tvm/relay/pattern_functor.h
python/tvm/relay/_parser.py
python/tvm/relay/grammar/Relay.g4
python/tvm/relay/grammar/py3/RelayParser.py
python/tvm/relay/grammar/py3/RelayVisitor.py
python/tvm/relay/module.py
python/tvm/relay/prelude.py
python/tvm/relay/std/prelude.rly
src/relay/ir/base.cc
src/relay/ir/module.cc
src/relay/ir/pretty_printer.cc
tests/python/relay/test_ir_parser.py