Commit Graph

55 Commits

Author SHA1 Message Date
Haichen Shen 720e7b1ebd [Refactor] Rename asnumpy -> numpy in NDArray (#8083) 2021-05-21 08:32:27 -04:00
XuanAnyvision 365484e054 allow module exits without del (#8063) 2021-05-18 08:58:56 -04:00
Yuchen Jin 43c2ea72bc Rename gpu to cuda, and bump dlpack to v0.5 (#8032) 2021-05-13 09:11:40 -04:00
Yuchen Jin 8d9a1dfe77 [DLPACK] Support the new python array api with DLPack (#7993)
* [DLPACK] Support the new python array api with dlpack

* Fix lint
2021-05-06 22:51:49 -07:00
Mehrdad Hessar 8c56ce3b90 [Graph Executor Debugger] Fix parameter dump (#7903)
* remove debug mode

* reformat

* format

* address comments

* add single call for all layers

* fix test

* revert

* address comments

* address comments

* fix rerun node

* fix error

* format

* raise error on array()

* fix java

* Revert "fix java"

This reverts commit c4cf952dbc5c9c32d65ef0ca05d6ecbb5c06d5aa.

* bring back for java api

* fix error

* cleanup

* format

* rm redundancy

* add last execution track

* trigger build

* address comments

* format

* fix name overlap

* Trigger Build

* trigger build

* trigger

* trigger
2021-05-03 10:17:05 -07:00
Andrew Liu dc1f189207 [AutoTVM] [TOPI] Support AutoTVM for int4 tensorcore (#7831)
* initial

* int4 asnumpy

* remove

* random test

* format

* random

* remove unused import

* change dist range

* add fuse_pack in

* random engine

* reformat

* remove import

* add cuda context

* refactor code
2021-05-01 16:27:36 +08:00
Y 82fecbfa66 [CodeGenC] Fix bugs when calling extern functions (#7911) 2021-04-26 08:28:35 -04:00
Tristan Konolige bd2520fdae [PROFILER] Add CSV output to profiler (#7797)
* [PROFILER] Add CSV output to profiler

This patch changes the profiler output from a string to a Report object.
A Report can either output CSV or the usual human-readable table.

* no spaces after commas

* Update src/runtime/profiling.cc

Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>

* fix gcc

* fix test

* overall percent fix

* rename overall -> device_metrics

Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
2021-04-20 10:21:54 -07:00
Tristan Konolige f57830bd8b [FIX] Fix RPC for the VM (#7810)
* [FIX] Fix RPC for the VM
2021-04-15 11:03:27 -04:00
Tristan Konolige b95803faf6 [Profiling,VM] Profiling interface for VM and Graph Runtime (#7624)
* [Profiling,VM] Profiling interface for VM and Graph Runtime

* lint

* fix test

* make profiling test actually run

* Try to better match the graph runtime function names to vm

* formatting

* DurationNode.value -> microseconds; PercentNode.value -> percent; make frame sorting optional.

* renaming for the tvmcontext -> device change

* formatting

* remove old vm profiler get_stat api

* fix tests
2021-04-01 09:34:33 -07:00
Jared Roesch fd18751e68 Add support for using the VM across the RPC boundary. (#7746)
* Get basic verison of VM RPC working

* Test case passes

* Clean up PR

* Lint

* Format

* Address Andrew R and TK feedback

* Add comment for Andrew

* Address Zhi's comment

* Format

* Fix broken test
2021-03-30 02:01:40 -07:00
Matt Welsh (OctoML) c39a6e25d5 Clean up uTVM demo runtime, add ONNX model test and tutorial (#7557)
* Some docstring fixes.

* Couple of small fixes:

- Use `west attach` instead of `west debug` in commandline to prevent
  debugger from resetting device.

- Fix warning on use of led_pin in zephyr-runtime/src/main.c.

* Adding Zephyr demo runtime.

* Cleanup of uTVM tests and demo runtime.

* Working on QEMU support.

Need to add board-specific prj.conf files.

* Adding board-specific prj.conf files.

* Some cleanup.

* Lots of hacking to get ONNX model to run on QEMU and nRF5340.

Added test_onnx unit test.

Still need to clean up tutorial.

* Adding data for unit tests.

* Cleanup demo_runtime code.

* Fix up tutorial.

* Couple of small fixes:

- Use `west attach` instead of `west debug` in commandline to prevent
  debugger from resetting device.

- Fix warning on use of led_pin in zephyr-runtime/src/main.c.

* Adding Zephyr demo runtime.

* Cleanup of uTVM tests and demo runtime.

* Working on QEMU support.

Need to add board-specific prj.conf files.

* Adding board-specific prj.conf files.

* Some cleanup.

* Lots of hacking to get ONNX model to run on QEMU and nRF5340.

Added test_onnx unit test.

Still need to clean up tutorial.

* Lots of hacking to get ONNX model to run on QEMU and nRF5340.

Added test_onnx unit test.

Still need to clean up tutorial.

* Adding data for unit tests.

* Cleanup demo_runtime code.

* Fix up tutorial.

* Fix tutorial.

* Fix tutorial and runtime.

* Fix merge conflicts.

* Fix merge conflict.

* Remove redundant files.

* Revert dep.

* Fixup

* Add new files to check_file_type.py.

* Adding missing ONNX file.

* Fixup docs.

* Fix linting rule.

* small fixes

* Add missing file to check_file_type.py.

* clang-format this file.

* Fix formatting.

* Black formatting.

* Lint comments.

* Fix path for test.

* Bump CI.

* Update from_onnx.

* fix path

* Fixing

* Revert dmlc-core to 21cc7de0dc9fd6acb796e1be6181fa8e6b6c8f41

* Fix path again.

* Fix tutorial to not use actual Zephyr.

* Revert submodule version change

* Fix bad merge.

* Trying to fix this mess.

* Fix formatting.

* context -> device

* Removing tutorial since I can't get it to pass CI.

Co-authored-by: Mehrdad Hessar <mehrdad.hessar@gmail.com>
Co-authored-by: Andrew Reusch <areusch@octoml.ai>
2021-03-28 21:06:15 -07:00
Haichen Shen fbfeee4ccb [Refactor] Rename TVMContext to Device (#7721) 2021-03-26 07:56:57 -04:00
Leyuan Wang b8b63cd1a4 add nvcc support (#7668) 2021-03-16 18:29:59 -04:00
Andrew Reusch ee052dd642 Introduce Model Library Format export format (#7533)
* Introduce Model Library Format export format.

 * This function produces a stable on-disk representation of TVM's
   compiler output.
 * It's intended just for use with the C runtime for microTVM right
   now. It could be expanded for other use cases.
 * This PR implements the Model Library Format RFC, which ultimately
   is intended to support the Project Generator API (RFC
   forthcoming).
 * There may be some changes to the format without revving the version
   number until downstream consumers are known. The Project Generator
   API is the first such known downstream consumer.
 * There are no plans currently to support generating old Model
   Library Format from TVM. The version number is intended as a
   compatibility check between the generator and downstream consumers.
2021-03-10 10:22:20 -05:00
Tristan Konolige 89bafd58c2 [RUNTIME] Unify load params interface (#7559) 2021-03-08 21:40:38 -08:00
Huang, Guangtai 8aa2a7cdbc [CUDA] BF16 support (#7014) 2021-03-06 18:24:49 +08:00
Tristan Konolige 73a0b96c64 [RUNTIME] Move Map into runtime (#7570)
* [RUNTIME] Move Map into runtime

This allows us to use Map to store parameters needed at runtime.

* node.{Array|Map} -> runtime.{Array|Map}

* missed some renames
2021-03-03 14:52:54 -08:00
ziheng 26733095f5 [Runtime] Special Memory Scope Support (#7488) 2021-02-28 10:52:16 -05:00
Yanming Wang 485dfd6a3c Fix typo in relay.vm.Executable (#7543)
Co-authored-by: Yanming Wang <yanmwang@amazon.com>
2021-02-28 05:31:29 +09:00
Andrew Reusch 929717a03a Fix stack overflow when partially-__init__ Node raises exception. (#7481)
* Fix stack overflow when partially-__init__ Node raises exception.

 * If a Node subclass raises an exception and ctypes is in use before
   __init_handle_by_constructor__ is called (or self.handle is
   otherwise set), a Python stack overflow could result. This is
   because the unset handle slot causes self.handle accesses to
   fallback on the getattr(self, 'handle') method, invoking
   NodeGetAttr.
 * Then I believe this causes an infinite loop.
 * The fix is to make Node.__getattr__ raise AttributeError for all
   attributes in __slots__, then make __del__ tolerant to missing
   self.handle.
 * I don't believe cython is affected because it implements a
   descriptor to access its underlying chandle and that shouldn't be unset.

* black format

* actually use handle instead of self.handle
2021-02-23 18:29:07 -05:00
manupa-arm 9713d675c6 Created CSourceMetaData module for model metadata (#7002)
* Created CSourceMetaData module for model metadata

* Currently, there is a MetaData module to capture constants
  conditionaly if the runtime modules implement const init
  PackedFuncs. However, this one relies on a load process
  in which the metadata is created on volatile memory that
  may be not usable in uTVM environments.
* There is a need for model level metadata that is valid
  across all runtime modules such as the func registry
  when creating a system-lib.
* This commit implements a CSoureMetaData module to hold
  func registry that collects function names from the
  runtime module and generates a c source file to be
  linked with final artifact.
* Modified and added export_library for utvm

Change-Id: Ie2e8e2aea1a66520f03fe8af7cc5bdf27339ea10

* Created CSourceMetaData module for model metadata

* fixed llvm_module to return null pfs for
  get_symbol and get_const_vars

Change-Id: I84810e0695d4d6fb314af2469117f965eed71b51

* Created CSourceMetaData module for model metadata

*fixed bundle_deploy tests

Change-Id: I0d1332a4abbb6830531784c59264021bbbd7148a

* Created CSourceMetaData module for model metadata

*fixed export_library not to insert "options" when targeting tar
*fixed unit tests

Change-Id: Ia1686889498b71af66f1a0311a059154ad3c2c3e

* Created CSourceMetaData module for model metadata

* enable wasm to support csource metadata module
* disabled non DSOExportables from using csource metadata module

Change-Id: Ie09beaad35cbc2ef738d1d24d91e249b5e099569

* Created CSourceMetaData module for model metadata

* changed const pfs to be called only on external modules
  or DSOExportable modules

Change-Id: I6ad28f166c0fc27a2548c851bf9287ec805550d1

* Created CSourceMetaData module for model metadata

* CSourceMetadata module wrapper is only created for c/llvm targets

Change-Id: I13cb4140c17e2e1f91d495b15a1ff7eeab9fb14d

* Created CSourceMetaData module for model metadata

*target should be defined to use csourcemetdata module

Change-Id: Id8e55b23d0007a79c550334de2c0fec63d40171f

* Created CSourceMetaData module for model metadata

* reinstate llvm func registry

Change-Id: I53e0754b6fb533637f08b25e98064d8c04092de4

* Created CSourceMetaData module for model metadata

* addressed comments and fixed bugs

Change-Id: I26401685dc803aeaf7642c865df88d683419e859

* Created CSourceMetaData module for model metadata

* addressed a missed comment

Change-Id: I65e65c30bc780a946f3f1b8372c40a49a5c20582

* Created CSourceMetaData module for model metadata

* te build interface should only include c-source metadata if
  targetting "c"

Change-Id: Ie23cb8c6231c1f2de6d2827084774e3510288098

* Created CSourceMetaData module for model metadata

* c_source modules should be created only if they are
  non-DSO exportable

Change-Id: I53f2f8e9caa41f133446f8881b9dc541ebeee8cc

* Created CSourceMetaData module for model metadata

* documetation misalignment in source_module.cc

Change-Id: I83e2c29b1f2980ca65a694304720dc58a5cb7879

* Created CSourceMetaData module for model metadata

* typo : same object file written as a dependency in the Makefile

Change-Id: I8becc4196d286cfb6372768687b3c836799dcb78

* Created CSourceMetaData module for model metadata

* removed unused param from a brief

Change-Id: Ie4db2aca3b7ea147bd8c65ef5d1cc2146f530e76

* Created CSourceMetaData module for model metadata

* made export library use c as the format for c source modules

Change-Id: Ie2fd6204414f0fa43988a8082d18af7a3225e237

* Created CSourceMetaData module for model metadata

*addressed a nit

Change-Id: I6084b8c06ddfaaece295439dbab589e6e202b664
2020-12-21 14:07:33 -08:00
Tristan Konolige fdfc7eb887 [TVMSCRIPT] Attach span information to tir nodes in tvmscript (#6910) 2020-12-04 20:03:08 -05:00
Tianqi Chen c8064b3ca6 [REFACTOR] Remainings of util => utils (#6778) 2020-10-29 13:46:31 -04:00
Tianqi Chen c6f18250e1 [CI] Introduce all platform test for windows/mac/linux. (#6756)
This PR introduces a minimal set of test cases that
are supposed to run in all platforms during CI.

The set of testcases are supposed to help on
platform dependent regression.

See tests/python/all-platform-minimal-test/README.md for guidelines.

- Enable windows mac LLVM build via conda with cython support.
- Test on all platform test cases.
- Update implementation to improve MSVC support.
2020-10-25 19:27:29 -04:00
iiahim f9abf56bf1 Updated runtime to run under FreeBSD. (#6600)
* Updated runtime to run under FreeBSD.
setenv CXX to proper binary - c++ or g++9 for FreeBSD 12.0.

* Update python/tvm/runtime/module.py

Co-authored-by: Junru Shao <junrushao1994@gmail.com>

* Update python/tvm/rpc/server.py

Co-authored-by: Junru Shao <junrushao1994@gmail.com>

* Changed to use os.environ.get

* Fixed format.

* Yet another lint fix.

Co-authored-by: Junru Shao <junrushao1994@gmail.com>
2020-10-02 09:37:18 -04:00
Jared Roesch f13fed55cf [Format] Convert all Python code w/o CI (#6448)
* Add black setup

* Tweak pyproject.toml

* Fix syntax issues

* Fix

* Tweak

* Black all Python code
2020-09-11 22:17:24 +09:00
Zhi 1224d56ca9 [RELAY][VM] Enable heterogeneous execution for Relay VM (#6337)
* vm heterogeneous execution

* context analysis on module

* fix profiler

* fix memory plan

* add more unification

* add serialization

* add gpu tests for test_adt

* cache visited functions

* path compression

* C++ context analysis

* remove python context analysis

* add tests

* clean

* lint

* fix

* enable gpu test for dynamic namespace

* remove GetParamsContext

* fix comments and add doc for context analysis

* cache context

* cache allocator

* rebase and fix comments
2020-09-03 09:47:03 -07:00
Haichen Shen 922e0a05c8 [Relay][VM] Allow to config allocator type and refactor vm code structure (#6105)
* [Relay][VM] Allow to config allocator type and refactor vm code structure

* fix doc

* fix

* update

* trigger ci

* trigger ci

* trigger ci

* trigger ci

* fix doc warning
2020-07-24 15:49:45 -07:00
Zhao Wu ae4480a379 [clflush] Enable x86 cpu cache flush (#5914) 2020-07-15 15:23:40 -07:00
Leon Wang 5d445ca4c6 Fix some typo errors in license header (#5956)
Signed-off-by: leonwanghui <wanghui71leon@gmail.com>
2020-06-29 20:28:30 -07:00
Zhi eacfe89066 [RUNTIME] Introduce MetadataModule to separate code compilation/interpretation and weight initialization (#5770) 2020-06-18 15:18:29 -07:00
Thomas Viehmann 9ba98beea5 ffi (Object): make class dict visible in instances (#5843) 2020-06-18 11:14:21 -07:00
Jared Roesch 60cfb79ce7 [Rust] Second stage of Rust Refactor (#5527)
* Add tvm-rt crate

* Backport changes from frontend branch

* Format

* Add ASF headers

* Address self-code review

* Replace with helper

* Fix lint

* Fix

* Clean up repro debugging

* WIP

* Remove global resgistry to fix one memory issue

* Fix

* Format

* Format

* Update rust/tvm-rt/README.md

Co-authored-by: Jason Knight <binarybana@gmail.com>

* Format

* Duplicate TVM macros

* Split macros

* Restore old macro for old crates

* Repair macros

* Fix format

* Format

Co-authored-by: Jason Knight <binarybana@gmail.com>
2020-06-10 02:07:19 -07:00
Tianqi Chen 8a98782cdf [REFACTOR] Separate ArgTypeCode from DLDataTypeCode (#5730)
We use a single enum(TypeCode) to represent ArgTypeCode and DLDataTypeCode.
However, as we start to expand more data types, it is clear that argument
type code(in the FFI convention) and data type code needs to evolve separately.
So that we can add first class for data types without having changing the FFI ABI.

This PR makes the distinction clear and refactored the code to separate the two.

- [PY] Separate ArgTypeCode from DataTypeCode
- [WEB] Separate ArgTypeCode from DataTypeCode
- [JAVA] Separate ArgTypeCode from DataTypeCode
2020-06-04 15:04:17 -07:00
Junru Shao 4347b41a5e [Object] Unify StrMapNode and MapNode (#5687)
* Pass cpptest and py unittest

* fix graph runtime

* right fix

* fix a bug that runtime::String's operator < is actually compare by address

* Update container.py

* Renaming

* Address comments

* lint

* Replace ObjectHash in object.py
2020-06-02 16:33:09 -07:00
Tianqi Chen f272e06095 Remove deprecated opengl files (#5711) 2020-06-01 17:53:33 -07:00
Tianqi Chen cdc7ae492e [WEB] WebGPU support (#5545)
This PR introduces WebGPU support to tvm.
The WebGPU runtime is directly built in javascript(as WebGPU uses JS as the first class citizen API)
and exposes back to the tvm's runtime via PackedFuncs.

One important note is that `ctx.sync` is not async.
This is due to the fact that WebGPU is a purely async API and we cannot block in the web environment.

So the current best way to use the js api is to wrap things in an async function.
When copy a GPU array to CPU, `await ctx.sync()` need to be called to wait for copy completion.

We use a AsyncIO rpc server to serve the async functions to the clients.
2020-05-09 16:59:18 -07:00
Tianqi Chen 95e06b3ec9 [REFACTOR][RPC][PROCOTOL-CHANGE] Modularize the RPC infra (#5484)
* Update dmlc-core which was mistakenly overriden

* [REFACTOR][RPC][PROCOTOL-CHANGE] Modularize the RPC infra.

This PR refactors the RPC protocol to make it more modularized.

- RPCSession: represent a set of features that need to be implemented
- RPCEndPont: End point that forwards the RPCSession requests over a communication channel.
- RPCModule: Exposes an RPCSession as an rpc device in the TVM Runtime API.

In the new design, the local machine is presented as a special case of RPCSession.
The remote is just another client session that calls into RPCEndPoint.
The RPC communication path is as follows.

```
client -> ClientSession -> EndPoint[client@n0]
-> networking[between n0 <=> n1]
-> EndPoint[server@n1] -> LocalSession[@n1]

```

Because of the new modular design, we can now chain more sessions together.
For example, we can now run the following proxy setup (testcase in test_runtime_rpc.test_session_constructor).

```
client -> ClientSession -> Endpoint[client@n0]
-> networking[between n0 <=> n1]
-> Endpoint[server@n1] -> ClientSession -> Endpoint[client@n1]
-> networking[between n1 <=> n2]
-> Endpoint[server@n2] -> LocalSession[@n2]
```

We can also implement other types of Sessions.
As an example, We introduced a PopenSession that communicates with
the another process via a pipe.

We also add more comments about the internal of the RPC.
The communication protocol is simplfied using a similar convention as PackedFunc.
This allows us to further reduce the amount of special remote syscalls.

Due to the major improvement and simplification, we are making a non-compatible update to the RPC protocol.
It means that the client and server needs to be upgraded to together in order for it to function correctly.

This PR also introduces a versioning mechanism to the current RPC procotol,
so that future upgrade will be produce more user friendly with error messages.

* Address review comments

* Remove ld library path
2020-05-04 17:05:33 -07:00
Andrew Reusch 8d72496887 [RUNTIME][uTVM] AutoTVM + uTVM for Cortex-M7 (#5417)
* Prototype for micro TVM.

* Cleanup and sync micro tvm prototype.

* Use /std:c++14 with MSVC.

 * Per tqchen: project has already moved to C++14
 * Presubmit failed for code that built locally on gcc.

* fix ASF lint, and fix add_asf_header too

* Compiles with USE_MICRO=OFF.

* Cleanup TargetPtr and word size representations.

* fix compile warning

* address logan's comments

* address logan and liangfu comments

* address thierry's comments

* address u99127, liangfu, tmoreau89 comments

Co-authored-by: Logan Weber <weberlo@cs.washington.edu>
2020-04-30 10:59:33 -07:00
Tianqi Chen 3cc4971990 [RUNTIME][OBJECT] Introduce static slots for common objects. (#5423)
The _type_child_slots can be used to enable quick type checking optimization
by checking the whether the type index is within the bound.

This PR enables these static slots:

- Introduce a static assert to avoid the scenario when a developer forget to
  _type_child_slots when the field is set for the type's parent.
- Revamp and assign static type index to common runtime objects
- Add a DumpTypeTable call to allow developer monitor the current situation
  of type table and offers suggestions for the slots(ideally the slots equals
  the number of children so there is no overflow.
2020-04-24 12:49:05 -07:00
Tianqi Chen e68450dacf [PY][FFI] Introduce PyNativeObject, enable runtime.String to subclass str (#5426)
To make runtime.String to work as naturally as possible in the python side,
we make it sub-class the python's str object. Note that however, we cannot
sub-class Object at the same time due to python's type layout constraint.

We introduce a PyNativeObject class to handle this kind of object sub-classing
and updated the FFI to handle PyNativeObject classes.
2020-04-23 22:06:05 -07:00
Tianqi Chen b8c23d660d [TIR][REFACTOR] Remove ir_pass in favor of analysis/transform. (#5415)
This PR removes ir_pass(old style pass functions) in favor
of analysis/transform(new style pass manager).
2020-04-22 20:44:25 -07:00
Tianqi Chen b72dd9d935 [RUNTIME] Introduce RValue reference(move) support to TypedPackedFunc (#5271)
* [RUNTIME] Introduce RValue reference(move) support to TypedPackedFunc

This PR introduces RValue reference support the PackedFunc calling convention to address the above issue.
Specifically, when an argument is a r-value reference, we will use a assign a different type code(`kObjectRValueRefArg`),
and pass `Object**`  (the address to the Object pointer) instead through the values array.
The callee can choose to move out this Object pointer and set the original Object pointer from the caller side to be nullptr.

We also add an experimental move support to the python side(marked as _move so to indicate the dev nature).
This enhancement will enable copy on write optimizations through out the TVM stack.

* Address review comments

* fix compilation
2020-04-10 17:07:20 -07:00
Zhi 5da361d3ad [REFACTOR][IR] Move to runtime::String (#5276)
* Use runtime::String

* move string to tvm namespace

* add const char* constructor

* implicit cast from std::string
2020-04-10 07:46:23 -07:00
Krzysztof Parzyszek 02d3a59b96 [RUNTIME] Initial implementation of Hexagon runtime support (#5252)
* [RUNTIME] Initial implementation of Hexagon runtime support

This is only the TVM runtime. The FastRPC libraries, simulator driver,
etc. will be provided in subsequent commits.

* Fix pylint complaints

* Fix some more pylint complaints

* Add link to the Hexagon SDK website

* Extract VTCM marker into a common variable

* Implement device->device memory copy

* Disable unsigned PDs by default

* Ensure that --hvx_length is present in sim_args if HVX is enabled

* Remove the line about clang from README.md

Apparently things work with libstdc++.

* Mention to set USE_RPC=OFF when building libtvm_runtime.so for Hexagon

* Remember to use codegen_hvx in validate_hvx_length

* Add a line about minimum version of LLVM
2020-04-10 21:47:59 +08:00
Tianqi Chen e63e08febd [REFACTOR][TIR] Migrate all low-level passes to the Pass Manager. (#5233)
* [REFACTOR][TIR] Migrate all low-level passes to the Pass Manager.

This PR migrates the tvm.lower to return IRModule of PrimFuncs
instead of the LoweredFuncs.

* Remove LoweredFunc.
2020-04-04 17:36:49 -07:00
Zhi d2f9af78ff [REFACTOR][IR] kExternalSymbol -> kGlobalSymbol (#5211)
* expose runtime::String to Python

* kExternalSymbol -> kGlobalSymbol
2020-04-02 08:30:46 -07:00
Tianqi Chen 9816efc2df [REFACTOR][PY][API-CHANGE] Remove legacy python files. (#4943)
* [REFACTOR][PY][API-CHANGE] Remove legacy python files.

Remove legacy python files.
Use the te namespace for most of the tensor expression primitives.

- tvm.create_schedule -> tvm.te.create_schedule
- tvm.placeholder -> tvm.te.placeholder
- tvm.compute -> tvm.te.compute

* Remove top-level exposures.
2020-02-26 21:10:47 -08:00
Tianqi Chen a566161147 [REFACTOR][PY][API-CHANGE] establish tvm.ir, migrate corresponding files (#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
2020-02-11 20:01:36 -08:00