- 15 Jan, 2020 3 commits
-
-
This reverts commit dcf7fbf1.
Haichen Shen committed -
Zhi committed
-
* [REFACTOR][IR] Unify IntImm and UIntImm This PR unifies UIntImm and IntImm to simplify the codebase. Unsigned integer constants will also be stored as IntImm. For uint constant that does not fit into int64(rare case), we introduced an intrinsic tvm_big_uint_imm to construct such intgers by its lower and higher 32bits. * [REFACTOR][IR] Remove UIntImm to use IntImm * rename big->large
Tianqi Chen committed
-
- 14 Jan, 2020 7 commits
-
-
- Use consistent constructor style to construct objects. - Move env_func to ir as it is mainly used to construct IRs. - Make docs consistent.
Tianqi Chen committed -
* [relay] Relay annotation and partitioning for codegen * Add fusion unit test * fix comments * Update include/tvm/relay/attrs/annotation.h Co-Authored-By: 雾雨魔理沙 <lolisa@marisa.moe> * rebase * remove annotation helper * rebase again Co-authored-by: Cody Yu <comaniac0422@gmail.com> Co-authored-by: 雾雨魔理沙 <lolisa@marisa.moe>
Zhi committed -
Move the relay's pass Infra to ir. Keep FunctionPass in relay as it is local to the dialect.
Tianqi Chen committed -
We will use a single ErrorReporter to report errors during program transformations.
Tianqi Chen committed -
Zhi Chen committed
-
Liangfu Chen committed
-
This PR brings relay::Module as the unified IRModule structure. IRModule will be used as the basic unit for transformations through out the stack. - Rename relay::Module -> IRModule - Move relay/module.h -> ir/module.h - ModuleNode::FromExpr -> IRModule::FromExpr - FromText -> IRModule::FromText
Tianqi Chen committed
-
- 12 Jan, 2020 1 commit
-
-
* GitHub Action lint Python code for syntax errors https://flake8.pycqa.org/en/latest/user/error-codes.html On the flake8 test selection, this PR does _not_ focus on "_style violations_" (the majority of flake8 error codes that [__psf/black__](https://github.com/psf/black) can autocorrect). Instead these tests are focus on runtime safety and correctness: * E9 tests are about Python syntax errors usually raised because flake8 can not build an Abstract Syntax Tree (AST). Often these issues are a sign of unused code or code that has not been ported to Python 3. These would be compile-time errors in a compiled language but in a dynamic language like Python they result in the script halting/crashing on the user. * F63 tests are usually about the confusion between identity and equality in Python. Use ==/!= to compare str, bytes, and int literals is the classic case. These are areas where __a == b__ is True but __a is b__ is False (or vice versa). Python >= 3.8 will raise SyntaxWarnings on these instances. * F7 tests logic errors and syntax errors in type hints * F82 tests are almost always _undefined names_ which are usually a sign of a typo, missing imports, or code that has not been ported to Python 3. These also would be compile-time errors in a compiled language but in Python a __NameError__ is raised which will halt/crash the script on the user. * Force a retest * Rename start_rpc_server_to_tracker.py to start_rpc_server_to_tracker.sh This is a bash file, not a Python file.
Christian Clauss committed
-
- 11 Jan, 2020 12 commits
-
-
* added conv1d operators to topi. * Started to add python testing. * Added python conv1d implementation for testing. * Wrote test but need to add cuda schedule :( * Cuda schedules working for both conv1d layouts. * All topi tests passing. * Formatting topi. * Removed pad_method option as its probably overkill. * Added relay op definition of conv1d. * End2end conv1d working with onnx. * Lint fixes. * Formatting fixes. * Rebase fix. * Switched to array based attributes for consistency across convs. * Improved onnx parsing and testing for convolutions. * lint fix * Tiny tweak. * Bug fix * Rebase fix. * Add group ignore to onnx conv1d frontend. * Unified MakeConv and fixed documentation. * improved autopadding * Addressed feedback and simplified onnx frontend. * Format fix. * Basic X86 NCW schedule working. * Added nwc schedule. * fixed name * Added more tests and basic x86 schedules. * Format fix. * Added non power of two shape tests.
Josh Fromm committed -
This PR migrates relay's Op into the ir folder. Op and its registry provides an useful mechanism to store any attribute meta-data of an operator include function signatures, lowering rules, side effect etc. These features are not only useful for Relay, but also needed in the low-level IR. At the current moment, intrinsic functions in the low-level IR are simply represented by a string. This means we cannot type-check the low-level IR when the type does not meet the constraint, nor can we obtain further information such as side-effect and read write relation of these intrinsics wrt to arguments. Op will be used as the way to handle primitive ops(in DL terminology) (builtin intrinsics or in compiler terminology). We will perform follow-up refactors to make low-level CallNode take Op as the function argument.
Tianqi Chen committed -
* [Tutorial] Deploy Quantized Model on CUDA * update * update * address comments
Wuwei Lin committed -
This is a shell file, not a Python file.
Christian Clauss committed -
Under the unified IR. We will allow a single IRModule to store different function variants, such as relay::Function, ExternFunc, and low-level function. This PR changes relay::Function -> BaseFunc in the module file to support multiple function variants.
Tianqi Chen committed -
Identity is not the same thing as equality in Python so use ==/!= to compare str, bytes, and int literals. In Python >= 3.8, these instances will raise __SyntaxWarnings__ so it is best to fix them now. https://docs.python.org/3.8/whatsnew/3.8.html#porting-to-python-3-8 % __python__ ``` >>> dtype = "float" >>> dtype += "16" >>> dtype == "float16" True >>> dtype is "float16" False >>> 0 == 0.0 True >>> 0 is 0.0 False ```
Christian Clauss committed -
#4682 Tried to fix a Python syntax error but did not go far enough because there are _three sets_ of embedded quotes. This PR solves the syntax error by using Python's triple quoted strings on the outside and then double quotes in the middle and then single quotes on the inside.
Christian Clauss committed -
* [TOPI][RELAY][OP] add op crop_and_resize * fix pylint * incorporate comments * fix ci
Yong Wu committed -
This PR moves a few base types from relay and low-level Expr into the ir sub-folder. These classes will serve as a common type system across the stack. Rationale: - PrimExpr for low-level expressions - RelayExpr for advanced features, including Function definition. - Introduce BaseFunc to host all functions, including future PrimFunc(low-level expr functions, subject to discussion). This is a minimum change we can do to unify the classes into a common hierarchy. The main data structure that are variant specific will still be kept in the sub-namespaces. We only include classes that is needed to allow a common Module class. - BaseFunc - GlobalVar - Type definition part of ADT We will only need the BaseFunc and their checked_type to decide the calling convention across the function variants.
Tianqi Chen committed -
* replace TensorObj and TensorValue with NDArray * NodeBase to Object in Python * rebase
Zhi committed -
* Add output_padding to generic * Add output_padding to the reference impl * Add output_padding to arm_cpu * Add output_padding to the test * Add output_padding for cuda * Add output_padding for x86 * Make use of the new output_padding argument in Relay * Adjust conv2d_transpose Relay test * Fix lint errors * Fix the VTA declaration of conv2d_transpose * support for output padding in conv2d transpose * some output padding will break IR pass * Fix new conv2d_transpose test * Update tophub * Fix conv1d output_padding too. * Fix the conv1d_transpose reference function. * Fix the cuda impl * fix the topi test for conv1d * Update the versions in tophub.py Co-authored-by: Thierry Moreau <tmoreau@octoml.ai>
abergeron committed -
* 'fskip' will not always return false fskip returns false at the end of PackedFunc, discards return true in 'cast' case * Update build_module.cc
yuliujq committed
-
- 10 Jan, 2020 12 commits
-
-
[flake8](http://flake8.pycqa.org) testing of https://github.com/apache/incubator-tvm on Python 3.8.0 $ __flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics__ ``` ./apps/vta_rpc/start_rpc_server_to_tracker.py:18:18: E999 SyntaxError: invalid syntax PROJROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../" && pwd )" ^ ```
Christian Clauss committed -
* [Relay][Frontend][TFlite] Add parses support for SLICE * TFlite 1.13: convertor gives nonsense output when size[i]==-1 * TF parser: SLICE need fixing for size[i]==-1 -> gives wrong output bcs of indices * Set end[i] = input_tensor_shape[i] as suggested in PR review * Add another test to cover size=-1 case
Ina Dobreva committed -
Christian Clauss committed
-
abergeron committed
-
Tianqi Chen committed
-
* Update topi.cc fix topi.nn.global_pool layout="NHWC" * add topi.nn.global_pool layout=NHWC test
戚海涛 committed -
Tianqi Chen committed
-
Zhao Wu committed
-
Liangfu Chen committed
-
Josh Fromm committed
-
Xingyu Zhou committed
-
- 09 Jan, 2020 5 commits
-
-
* [REFACTOR][IR] tvm::Expr -> PrimExpr(Primitive Expr) As part of unified IR, we will need to unify relay::Expr and the current tvm::Expr under the same base type. From the techinical point of view. tvm::Expr is a "primitive" expression that only contains POD types and handles and does not do life-cycle management. This PR renames Expr->PrimExpr to clarify that. We will send a subsequent PR to introduce the base expr class. * Remove legacy VarExpr and ExprHash/Equal
Tianqi Chen committed -
Trevor Morris committed
-
* [Relay][Frontend][Tflite] Add parses support for unary elemwise ops * Add generic method to convert unary functions: abs, exp, ceil, floor log, sin, cos, sqrt, rsqrt, neg * Add relevant tests * Delete excessive underscores as requested in PR review * Change parameter name as suggested in PR review
Ina Dobreva committed -
* [REFACTOR] relay::Module Def -> TypeDef The term Def was not very clear about what is the object of interest(could be function def or type def). Changes the term to TypeDef to be more explicit. * Update include/tvm/relay/module.h Co-Authored-By: Wei Chen <ipondering.weic@gmail.com> Co-authored-by: Wei Chen <ipondering.weic@gmail.com>
Tianqi Chen committed -
* Added 1D pooling to Topi * Added 1D pooling relay op and tests. * Added onnx parsing and tests for maxpool1d and averagepool1d * formatting * moved partial import. * Fixed typo.
Josh Fromm committed
-