[REFACTOR] Separate ArgTypeCode from DLDataTypeCode (#5730)
authorTianqi Chen <tqchen@users.noreply.github.com>
Thu, 4 Jun 2020 22:04:17 +0000 (15:04 -0700)
committerGitHub <noreply@github.com>
Thu, 4 Jun 2020 22:04:17 +0000 (15:04 -0700)
commit8a98782cdfe6a5dbe6e61fc19d5526c16827aba6
treeaf30d510cd837955c991f258da5cb94fbd1ac82d
parent34c95a89eae13043aa3a269ad7d27d28837ffb56
[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
38 files changed:
3rdparty/dlpack
include/tvm/runtime/c_runtime_api.h
include/tvm/runtime/data_type.h
include/tvm/runtime/packed_func.h
include/tvm/tir/op.h
jvm/core/src/main/java/org/apache/tvm/ArgTypeCode.java [moved from jvm/core/src/main/java/org/apache/tvm/TypeCode.java with 95% similarity]
jvm/core/src/main/java/org/apache/tvm/Function.java
jvm/core/src/main/java/org/apache/tvm/Module.java
jvm/core/src/main/java/org/apache/tvm/NDArrayBase.java
jvm/core/src/main/java/org/apache/tvm/TVMValue.java
jvm/core/src/main/java/org/apache/tvm/TVMValueBytes.java
jvm/core/src/main/java/org/apache/tvm/TVMValueDouble.java
jvm/core/src/main/java/org/apache/tvm/TVMValueHandle.java
jvm/core/src/main/java/org/apache/tvm/TVMValueLong.java
jvm/core/src/main/java/org/apache/tvm/TVMValueNull.java
jvm/core/src/main/java/org/apache/tvm/TVMValueString.java
python/tvm/__init__.py
python/tvm/_ffi/_ctypes/object.py
python/tvm/_ffi/_ctypes/packed_func.py
python/tvm/_ffi/_ctypes/types.py
python/tvm/_ffi/_cython/base.pxi
python/tvm/_ffi/registry.py
python/tvm/_ffi/runtime_ctypes.py
python/tvm/runtime/__init__.py
python/tvm/runtime/ndarray.py
python/tvm/tir/expr.py
rust/common/src/packed_func.rs
rust/frontend/src/function.rs
rust/tvm-sys/src/packed_func.rs
src/runtime/micro/standalone/utvm_graph_runtime.cc
src/runtime/rpc/rpc_module.cc
src/target/datatype/registry.cc
src/target/datatype/registry.h
tests/python/unittest/test_runtime_extension.py
tests/python/unittest/test_runtime_ndarray.py
web/src/ctypes.ts
web/src/rpc_server.ts
web/src/runtime.ts