platform/upstream/tvm.git
4 years agoAuto TensorCore CodeGen (#4234)
Minmin Sun (孙敏敏) [Sat, 9 Nov 2019 21:01:36 +0000 (05:01 +0800)]
Auto TensorCore CodeGen (#4234)

* Add Auto TensorCore TensorCore Unit Test

* Rebase to tvm master branch & Add auto tensor core

* Code Refine

* Add tensor core switch by pragma

* Add pragma in tensor core example code

* Get real tile size to replace hard coded 16

* support more than 2 dimensions (e.g. batchmatmul) for buffer bind scope

* support batch matmul

* Move cuda env check to tensor_core.cc

* Coderefine for tensor_core.cc

* Refine comments

* Some refinements of code and comment

* Update TensorCore UT to pass the CPU test

* remove redundant code

* matmul's storage align for different layout

* Add support for differenct position of type cast

* Add formal tutorial for auto tensorcore codegen

* move tensorcore check up to tutorial code

* code and doc refine

* comment out tune_and_evaluate in tutorial

* fix cpplint error

4 years agoUpdate tvm_runtime.h (#4278)
peike [Fri, 8 Nov 2019 08:23:15 +0000 (19:23 +1100)]
Update tvm_runtime.h (#4278)

fix the problem that android_rpc compilation failed

4 years ago[TOPI][CUDA] Fix Winograd Kernel Size Support (#4276)
Cody Hao Yu [Fri, 8 Nov 2019 05:44:35 +0000 (21:44 -0800)]
[TOPI][CUDA] Fix Winograd Kernel Size Support (#4276)

* fix_winograd_cuda_kernel_size

* add unit test

4 years ago[Relay][Frontend][ONNX] Add support for broadcasting to Where and MatMul (#4267)
Jon Soifer [Thu, 7 Nov 2019 22:10:30 +0000 (14:10 -0800)]
[Relay][Frontend][ONNX] Add support for broadcasting to Where and MatMul (#4267)

4 years ago[AutoTVM] Add batch_matmul to tunable operations (#4242)
Josh Fromm [Thu, 7 Nov 2019 00:07:09 +0000 (16:07 -0800)]
[AutoTVM] Add batch_matmul to tunable operations (#4242)

* Batch matmul tuning running but with errors.

* Default x86 schedule as good as before.

* Code Cleanup

* Remove unused argument.

* improved template documentation.

* Silly lint fix

* Removed leftover comment.

* Moved cfg declaration to schedule for batch_matmul

* Moved x86 dense cfg declaration to schedule.

* lint fix

* Removed duplicate cfg declaration in dense.

* Reverted changes to dense.

4 years ago[TOPI] Fix bug in Winograd on CUDA (#4260)
Cody Hao Yu [Wed, 6 Nov 2019 23:02:54 +0000 (15:02 -0800)]
[TOPI] Fix bug in Winograd on CUDA (#4260)

* fix winograd

* move get padding after kernel transform

4 years ago[Contrib] Fix error message at callback_get_section_size() (#4221)
Neo Chien [Wed, 6 Nov 2019 18:39:40 +0000 (02:39 +0800)]
[Contrib] Fix error message at callback_get_section_size() (#4221)

* [Contrib] Fix error message at callback_get_section_size()

* Trigger notification

4 years ago[VTA] Hotfix for padded load test in Chisel VTA (#4264)
Liangfu Chen [Wed, 6 Nov 2019 17:19:22 +0000 (01:19 +0800)]
[VTA] Hotfix for padded load test in Chisel VTA (#4264)

* Update TensorUtil.scala

* Update test_vta_insn.py

4 years ago[DOCS] Update link loc (#4257)
Tianqi Chen [Wed, 6 Nov 2019 00:03:04 +0000 (16:03 -0800)]
[DOCS] Update link loc (#4257)

4 years agoworkaround typing.Deque import error for Python 3.5 (#4254)
zhuochen [Tue, 5 Nov 2019 17:51:36 +0000 (01:51 +0800)]
workaround typing.Deque import error for Python 3.5 (#4254)

4 years agoRequire LLVM >= 9 for AMDGPU backend (#4253)
Thomas Viehmann [Tue, 5 Nov 2019 10:25:18 +0000 (11:25 +0100)]
Require LLVM >= 9 for AMDGPU backend (#4253)

LLVM 8 will crash when loading the bitcodes

This is a runtime check as the file will be compiled in even when
USE_ROCM OFF is used in the configuration if ROCM is installed
in the default location.

Fixes: #4087

4 years agoCI trigger after repo move (#4252)
Tianqi Chen [Mon, 4 Nov 2019 22:03:33 +0000 (14:03 -0800)]
CI trigger after repo move (#4252)

4 years ago[Relay][Frontend][Tensorflow] Fix GatherV2, Add StopGradient (#4238)
Trevor Morris [Mon, 4 Nov 2019 18:37:41 +0000 (10:37 -0800)]
[Relay][Frontend][Tensorflow] Fix GatherV2, Add StopGradient (#4238)

* Add StopGradient. Add batch_dims attr to ignore list for GatherV2

* Trigger CI

4 years agoremove PEP498 f-string new feature for support python3.5 (#4250)
Kim [Mon, 4 Nov 2019 16:04:02 +0000 (00:04 +0800)]
remove PEP498  f-string new feature for support  python3.5 (#4250)

4 years agoFix typo in err msg (#4251)
XFPlus [Mon, 4 Nov 2019 16:03:42 +0000 (00:03 +0800)]
Fix typo in err msg (#4251)

4 years ago[VTA] Performance optimize, remove unnecessary contigious memory use. (#4246)
Hua Jiang [Sat, 2 Nov 2019 03:29:54 +0000 (20:29 -0700)]
[VTA] Performance optimize, remove unnecessary contigious memory use. (#4246)

* [VTA] Performance optimize, remove unnecessary contigious memory use.

Issue:
Uop maintain a cache vector to copy uop data into contigious DRAM memory for
FPGA/Simulator use, but this cache vector not get clear after FPGA/Simulator
core run, in Resnet18 case, if we printf the cache size in UopQueue::ReadBarrier
function, we can saw such cache size keep increase, this would cause
no use data copy and unnecessary contigous DRAM memory malloc.

Analysis:
This issue caused by not clear cache_ vector when do
uop_queue_.Reset().

Solution:
Override BaseQueue Reset function in UopQueue and add cache_ clear
logic.

* address review comments, remove spacing.

4 years agoSupport reshape for dynamic shape in tf converter (#4185)
Yao Wang [Sat, 2 Nov 2019 03:10:21 +0000 (20:10 -0700)]
Support reshape for dynamic shape in tf converter (#4185)

* Support reshape for dynamic shape in tf converter

* Only allow reshape directly after shape function for symbolic input shape

* Fix lint

4 years ago[NODE][REFACTOR] Rename IRFunctor->NodeFunctor, use func pointer (#4247)
Tianqi Chen [Fri, 1 Nov 2019 23:34:42 +0000 (16:34 -0700)]
[NODE][REFACTOR] Rename IRFunctor->NodeFunctor, use func pointer (#4247)

* [NODE][REFACTOR] Rename IRFunctor->NodeFunctor, use function pointer for dispatching.

Previously we used std::function for the functor dispatching.
It introduces additional overhead and problems during dll destruction(of std::function).

This PR changes the std::function to function pointers.
This change a bit restrictions around the set_dispatch that we can get around,
but will improve the general efficiency by reducing one level of indirection in the std::function.
We also no longer need special marcos to register functions to the Functor.

4 years agoImplement explicit IR representation of memory alloction (#3560)
Jared Roesch [Fri, 1 Nov 2019 21:28:23 +0000 (16:28 -0500)]
Implement explicit IR representation of memory alloction (#3560)

4 years ago[Relay][Prelude] Add more dtypes to tensor_t (#4233)
Wei Chen [Fri, 1 Nov 2019 20:37:58 +0000 (13:37 -0700)]
[Relay][Prelude] Add more dtypes to tensor_t (#4233)

4 years ago[Relay][Pass] Avoid FoldConstant folding some ops (#4245)
Wuwei Lin [Fri, 1 Nov 2019 17:36:36 +0000 (13:36 -0400)]
[Relay][Pass] Avoid FoldConstant folding some ops (#4245)

* [Relay][Pass] Avoid FoldConstant folding some ops

* rename

4 years ago[ Relay ][ Frontend ][ Tensorflow ]add op add_n to relay/frontend/tensorflow.py ...
Kim [Fri, 1 Nov 2019 15:54:33 +0000 (23:54 +0800)]
[ Relay ][ Frontend ][ Tensorflow ]add op add_n to relay/frontend/tensorflow.py (#4181)

4 years ago[ARITH] Fix lowering of FloorMod (#4236)
Sergei Grechanik [Fri, 1 Nov 2019 15:51:43 +0000 (18:51 +0300)]
[ARITH] Fix lowering of FloorMod (#4236)

4 years agoFix the problem that android_rpc compilation failed. (#4244)
autumnqin [Fri, 1 Nov 2019 14:53:47 +0000 (22:53 +0800)]
Fix the problem that android_rpc compilation failed. (#4244)

Signed-off-by: qinqiuping <autumnqin@126.com>
4 years ago[BUILD] Disable utvm standalone runtime by default (#4240)
Tianqi Chen [Thu, 31 Oct 2019 18:13:48 +0000 (11:13 -0700)]
[BUILD] Disable utvm standalone runtime by default (#4240)

4 years ago[CUDA] Fix fp16 intrin, disable bad fp16 vecadd test for now (#4239)
Tianqi Chen [Thu, 31 Oct 2019 18:13:32 +0000 (11:13 -0700)]
[CUDA] Fix fp16 intrin, disable bad fp16 vecadd test for now (#4239)

4 years ago[CI] Update GPU docker to cuda10 (#4228)
Tianqi Chen [Thu, 31 Oct 2019 18:11:46 +0000 (11:11 -0700)]
[CI] Update GPU docker to cuda10 (#4228)

* [CI] Update the ci-gpu to use cuda10

* [CI] Enforce tensorcore gpu for unittest

4 years agoFix typo in get_output doc-string (#4237)
KoolKoffee [Thu, 31 Oct 2019 16:15:57 +0000 (16:15 +0000)]
Fix typo in get_output doc-string (#4237)

4 years ago[CI] Move gpu docker binary to cuda10 (#4229)
Tianqi Chen [Thu, 31 Oct 2019 05:24:52 +0000 (22:24 -0700)]
[CI] Move gpu docker binary to cuda10 (#4229)

* [CI] Move gpu docker binary to cuda10

* Fix the gcn tutorial

4 years ago[Doc] Update ANTLR instruction (#4231)
Wei Chen [Thu, 31 Oct 2019 02:52:12 +0000 (19:52 -0700)]
[Doc] Update ANTLR instruction (#4231)

* [Doc] Update ANTLR instruction

* Update docs/install/from_source.rst

4 years ago[Relay] Install Relay Prelude program in package install (#4227)
Wei Chen [Wed, 30 Oct 2019 22:54:56 +0000 (15:54 -0700)]
[Relay] Install Relay Prelude program in package install (#4227)

4 years ago[CI] use llvm9 for the gpu tests (#4224)
Tianqi Chen [Wed, 30 Oct 2019 22:33:10 +0000 (15:33 -0700)]
[CI] use llvm9 for the gpu tests (#4224)

* [CI] use llvm9 for the gpu tests

* Update Docker script to support new nvidia docker

4 years ago[Relay][Topi][TensorFlow][ONNX][Lang] Add support for Any op (#4205)
Jon Soifer [Wed, 30 Oct 2019 18:43:09 +0000 (11:43 -0700)]
[Relay][Topi][TensorFlow][ONNX][Lang] Add support for Any op (#4205)

* Add support for Any op

* Support ONNX frontend

* Add doc

* Add to relay docs

* Dummy change to retrigger CI

4 years ago[Relay][Frontend][ONNX] New Operators and Opsets to Support BERT (#4197)
Josh Fromm [Wed, 30 Oct 2019 18:24:47 +0000 (11:24 -0700)]
[Relay][Frontend][ONNX] New Operators and Opsets to Support BERT (#4197)

* Added slice v10

* Added constantofshape operation and small refactor.

* Finished one_hot implementation.

* Reshape working across all bert layers.

* Fixed constantofshape and removed code duplication.

* onnx model fully ingested.

* Working on improving onnx tests.

* Changed onnx testing to use onnxruntime instead of caffe2, also formatted.

* Add arbitrary output nodes to onnx frontend.

* Added v6 tiling for bert squad 8 support.

* Small syntax fixes

* Reduced code duplication in split opset versions.

* Added batch matmul test

* Added unstack split testing.

* Adde onehot test, needs a little cleanup probably.

* Replaced deprecated constant fill with constantofshape and updated tests accordingly.

* Added tests for new opset version of slice and tile.

* lint clean up

* Lint fixes

* Changed onnx dependency

* Went back to caffe2 runtime for CI integration.

* Rebase and small typo/syntax changes.

* Added hard casting of onehot attributes to int.

4 years ago[PYTHON] Add __init__ to the generated grammar so that it can be installed properly...
Tianqi Chen [Wed, 30 Oct 2019 18:17:33 +0000 (11:17 -0700)]
[PYTHON] Add __init__ to the generated grammar so that it can be installed properly (#4223)

4 years ago[ARITH] Fix the rule y < x && x <= y (#4220)
Sergei Grechanik [Wed, 30 Oct 2019 16:43:53 +0000 (19:43 +0300)]
[ARITH] Fix the rule y < x && x <= y (#4220)

4 years agoImprove the lowering of Qnn Dense (#4213)
shoubhik [Wed, 30 Oct 2019 16:12:14 +0000 (09:12 -0700)]
Improve the lowering of Qnn Dense (#4213)

* [QNN] Improving Dense lowering.

* - Moving get_shape method to util
- Finalizing the test cases and the code structure for optimized dense computation.

* - Fixing cpplint.

* - Addressing review comments.

* - Renaming the variables correctly.

* - Renaming the variables correctly.

4 years agoFix typo in packed_func.h (#4219)
Bohan Hou [Wed, 30 Oct 2019 09:13:35 +0000 (17:13 +0800)]
Fix typo in packed_func.h (#4219)

4 years ago[Relay] Add Python type functor and tests (#4209)
Logan Weber [Wed, 30 Oct 2019 04:51:20 +0000 (21:51 -0700)]
[Relay] Add Python type functor and tests (#4209)

* Add Python type functor and tests

* Lint roller

4 years agoOptimizing autotvm task extraction speed (#4138)
LiangHao [Tue, 29 Oct 2019 18:45:02 +0000 (02:45 +0800)]
Optimizing autotvm task extraction speed (#4138)

* Optimize task extraction speed

* correct pylint errors

* Delete unused function

* remove unnecessary argument

* resolve code review comments

* corrent cpp lint errors

* remove one more graph_json return value

* fix test bugs

4 years agoUpdate have_int8 condition to run on compute capability 7.x devices (#4214)
Wuwei Lin [Tue, 29 Oct 2019 12:23:23 +0000 (08:23 -0400)]
Update have_int8 condition to run on compute capability 7.x devices (#4214)

4 years ago[Relay][Quantize] Use fixed point mulplications (#4160)
Wuwei Lin [Tue, 29 Oct 2019 04:51:29 +0000 (00:51 -0400)]
[Relay][Quantize] Use fixed point mulplications (#4160)

4 years ago[Relay][Op] Enhance Upsample Operator to support float scales (#4206)
Xingyu Zhou [Mon, 28 Oct 2019 18:34:56 +0000 (11:34 -0700)]
[Relay][Op] Enhance Upsample Operator to support float scales   (#4206)

* :add scale2 for upsample

* update unit test for upsampling

* support latest upsample op for multiple frontend

* fix lint

* fix lint

* fix lint

* fix lint

* update scale description and rebase

4 years ago[TOPI] Fix flaky testcase for check round (#4211)
Tianqi Chen [Mon, 28 Oct 2019 18:28:00 +0000 (14:28 -0400)]
[TOPI] Fix flaky testcase for check round (#4211)

4 years ago[Relay] Setting Legalize opt_level to 1. (#4198)
Animesh Jain [Mon, 28 Oct 2019 18:26:20 +0000 (11:26 -0700)]
[Relay] Setting Legalize opt_level to 1. (#4198)

4 years agoFix type var docs (#4208)
Logan Weber [Mon, 28 Oct 2019 15:03:32 +0000 (08:03 -0700)]
Fix type var docs (#4208)

4 years ago[RUNTIME] Separate runtime related contrib into runtime/contrib (#4207)
Tianqi Chen [Sun, 27 Oct 2019 20:41:20 +0000 (16:41 -0400)]
[RUNTIME] Separate runtime related contrib into runtime/contrib (#4207)

4 years ago[VTA][Chisel] TSIM VTA Source Refactor (#4163)
Benjamin Tu [Sun, 27 Oct 2019 00:06:49 +0000 (17:06 -0700)]
[VTA][Chisel] TSIM VTA Source Refactor (#4163)

* app init push

* fix on readme

* change name, add bit serial explanantion

* rm serialLoadMM, change doc

* syntax change for readme

* add parallel test functionality

* fix readme

* add python doc

* syntax

* init commit

* fix empty line

* fix typo

4 years ago[Relay][Frontend][ONNX] Add support for op Where (#4184)
Jon Soifer [Sun, 27 Oct 2019 00:05:22 +0000 (17:05 -0700)]
[Relay][Frontend][ONNX] Add support for op Where (#4184)

* Add support for op Where

* Update impl version

4 years ago[Relay][Params] Add APIs for storing and retrieving parameters from individual functi...
Jared Roesch [Sun, 27 Oct 2019 00:05:03 +0000 (17:05 -0700)]
[Relay][Params] Add APIs for storing and retrieving parameters from individual functions. (#4194)

* Add support for attaching params

* Fix types

* Fix test

4 years ago[Relay][Training] Add checkpoint annotation for checkpointing memory optimization...
Altan Haan [Sun, 27 Oct 2019 00:04:42 +0000 (17:04 -0700)]
[Relay][Training] Add checkpoint annotation for checkpointing memory optimization (#4146)

* add checkpoint annotation for checkpointing memory optimization

* add alpha-equivalence checkpoint test and fix gradient type issue

* fix build issues

* ignore checkpoint annotation when checking missing gradients

* refactor, fix checkpoint compute for tuple and add tests

4 years ago[hotfix] missing include headers (#4204)
Zhi [Fri, 25 Oct 2019 22:47:45 +0000 (15:47 -0700)]
[hotfix] missing include headers (#4204)

4 years ago[Relay] crossentropy_with_logits and its gradient (#4075)
雾雨魔理沙 [Fri, 25 Oct 2019 14:54:29 +0000 (07:54 -0700)]
[Relay] crossentropy_with_logits and its gradient (#4075)

* save

* lint

4 years ago[TOPI][x86] Legalize - Support int8xint8 convolution to use VNNI instructions. (...
Animesh Jain [Fri, 25 Oct 2019 06:24:25 +0000 (23:24 -0700)]
[TOPI][x86] Legalize - Support int8xint8 convolution to use VNNI instructions. (#4196)

4 years agohotfix the ci (#4199)
Tianqi Chen [Thu, 24 Oct 2019 22:49:24 +0000 (15:49 -0700)]
hotfix the ci (#4199)

4 years ago[NODE][REFACTOR] Refactor reflection system in node. (#4189)
Tianqi Chen [Thu, 24 Oct 2019 20:40:04 +0000 (13:40 -0700)]
[NODE][REFACTOR] Refactor reflection system in node. (#4189)

* [NODE][REFACTOR] Refactor reflection system in node.

- Removed the old Node, Node is now just an alias of runtime::Object
- Introduce ReflectionVTable, a new columnar dispatcher to support reflection
  - This allows us to remove vtable from most node objects
  - The VisitAttrs are registered via TVM_RESGITER_NODE_TYPE,
    they are no longer virtual.
- Consolidated serialization and reflection features into node.

* Explicit type qualification when calling destructor.

* Fix SPIRV, more comments

4 years agoTensorCore Support using Intrinsic (#4136)
Siyuan Feng [Thu, 24 Oct 2019 19:04:37 +0000 (12:04 -0700)]
TensorCore Support using Intrinsic (#4136)

* add tensor core support

* avoid memory bank conflict

* fix thread sync & better performance

* better performance

* add schedule test for conv2d

* extend into BatchMatMul

* support config fragment shape and layout using intrinsic

* add TensorCore tutorial

* add int support and fix lint

* address comment

* add 32*16*8 TensorCore test

* fix wmma include logic

4 years ago[TOPI] Tunable Template for Conv2D HWCN on CUDA (#4168)
Cody Hao Yu [Thu, 24 Oct 2019 19:03:15 +0000 (12:03 -0700)]
[TOPI] Tunable Template for Conv2D HWCN on CUDA (#4168)

* support conv2d HWCN in AutoTVM and Relay

* fix lint

* fix comments and unit tests

4 years ago[Relay] Fix memory leak in the interpreter (#4155)
雾雨魔理沙 [Thu, 24 Oct 2019 18:50:25 +0000 (11:50 -0700)]
[Relay] Fix memory leak in the interpreter (#4155)

* save

lint

* address reviewer comment

4 years agoAdd parser support for SUM tflite operator (#4182)
Ina Dobreva [Thu, 24 Oct 2019 16:58:22 +0000 (17:58 +0100)]
Add parser support for SUM tflite operator (#4182)

4 years ago[relay] use time_evaluator for measurement (#4191)
Zhi [Thu, 24 Oct 2019 16:56:58 +0000 (09:56 -0700)]
[relay] use time_evaluator for measurement (#4191)

4 years ago[Documentation]Fix example code in comment of tvm.build_module.build() (#4195)
optima2005 [Thu, 24 Oct 2019 16:56:00 +0000 (00:56 +0800)]
[Documentation]Fix example code in comment of tvm.build_module.build() (#4195)

* Fix example code in comment of tvm.build_module.build()

* Update build_module.py

4 years agoSplit adaptive_pool2d_avg into sum and div (#4186)
Yao Wang [Thu, 24 Oct 2019 15:37:56 +0000 (08:37 -0700)]
Split adaptive_pool2d_avg into sum and div (#4186)

4 years ago[cmake][ANTLR] Support setting path to ANTLR jar (#4176)
Jon Soifer [Thu, 24 Oct 2019 05:16:08 +0000 (22:16 -0700)]
[cmake][ANTLR] Support setting path to ANTLR jar (#4176)

* Support setting path to ANTLR jar

* Update comment

4 years agoRevert "[Relay][QNN] Add unit test for int8 (#4159)" (#4192)
Tianqi Chen [Thu, 24 Oct 2019 04:59:58 +0000 (21:59 -0700)]
Revert "[Relay][QNN] Add unit test for int8 (#4159)" (#4192)

This reverts commit 6f9d028b80f9e41fd577b5c6a7229cafcfc72173.

4 years ago[DOCS] Add TensorFlow frontend docs (#4154)
Jon Soifer [Thu, 24 Oct 2019 03:12:47 +0000 (20:12 -0700)]
[DOCS] Add TensorFlow frontend docs (#4154)

* Start to update TF frontend docs

* Add rst

* Remove markdown

* Update wording

* Resolve comments

4 years agoAdd support and testing for tf.assert (as no-op) and tf.no_op to TF Relay frontend...
Bjarke Hammersholt Roune [Wed, 23 Oct 2019 20:53:03 +0000 (13:53 -0700)]
Add support and testing for tf.assert (as no-op) and tf.no_op to TF Relay frontend. (#4172)

4 years ago[rpc] use callback func to do send & recv (#4147)
Yizhi Liu [Wed, 23 Oct 2019 18:02:34 +0000 (02:02 +0800)]
[rpc] use callback func to do send & recv (#4147)

* [rpc] use callback func to do send & recv. don't get fd from sock as it is deprecated in java

* fix java build

* fix min/max macro define in windows

* keep the old rpc setup for py

* add doc for CallbackChannel

4 years ago[Pass] Remove dead code (#4177)
Wei Chen [Wed, 23 Oct 2019 02:13:55 +0000 (19:13 -0700)]
[Pass] Remove dead code (#4177)

4 years ago[Relay][Frontend][TF] Fix Size operator (#4175)
Jon Soifer [Tue, 22 Oct 2019 23:37:53 +0000 (16:37 -0700)]
[Relay][Frontend][TF] Fix Size operator (#4175)

* [Relay][Frontend][TF] Fix Size operator

* Uncomment tests

4 years ago[TOPI] Added support for Mali Bifrost target (#4047)
mbarrett97 [Tue, 22 Oct 2019 20:49:17 +0000 (21:49 +0100)]
[TOPI] Added support for Mali Bifrost target (#4047)

4 years agomerge extract_from_program and extract_from_multiple_progam (#4173)
Cody Hao Yu [Tue, 22 Oct 2019 20:26:04 +0000 (13:26 -0700)]
merge extract_from_program and extract_from_multiple_progam (#4173)

4 years agoadd missing gradient check to gradient pass (#4169)
Altan Haan [Tue, 22 Oct 2019 06:13:55 +0000 (23:13 -0700)]
add missing gradient check to gradient pass (#4169)

4 years ago[relay][vm] Reuse allocated device memory (#4170)
Zhi [Tue, 22 Oct 2019 06:13:35 +0000 (23:13 -0700)]
[relay][vm] Reuse allocated device memory (#4170)

4 years ago[Relay][QNN] Add unit test for int8 (#4159)
Zhi [Mon, 21 Oct 2019 23:16:45 +0000 (16:16 -0700)]
[Relay][QNN] Add unit test for int8 (#4159)

* [bugfix][codegen] fix casting bug in llvm codegen

* update example

* retrigger ci

* check llvm version

4 years ago[Relay][Pass] Count MAC for BatchMatMul (#4157)
Haichen Shen [Mon, 21 Oct 2019 20:40:55 +0000 (13:40 -0700)]
[Relay][Pass] Count MAC for BatchMatMul (#4157)

* count MAC for BatchMatMul

* update doc

4 years agoFix missspelling (#4166)
Monkeyking [Mon, 21 Oct 2019 16:05:26 +0000 (00:05 +0800)]
Fix missspelling (#4166)

FIX "After connecting he usb" with "After connecting the usb"

4 years agoAdd support for quantized multiply to Relay (#4141)
ekalda [Mon, 21 Oct 2019 14:07:39 +0000 (15:07 +0100)]
Add support for quantized multiply to Relay (#4141)

This patch adds multiply operator for quantized tensors.
The details of the quantized multiplication are outlined
in the code.

This builds on pull request 3927 and includes the changes
Animesh mentions in the comments on that request.

Change-Id: I555715b53d0266a91d5c03dc3dfe8fc31e7ce4e1

4 years ago[CI] Move golang tests to the end (#4164)
Tianqi Chen [Mon, 21 Oct 2019 03:29:32 +0000 (20:29 -0700)]
[CI] Move golang tests to the end (#4164)

4 years ago[REFACTOR][NODE][RUNTIME] Move Node to the new Object protocol. (#4161)
Tianqi Chen [Mon, 21 Oct 2019 01:30:41 +0000 (18:30 -0700)]
[REFACTOR][NODE][RUNTIME] Move Node to the new Object protocol. (#4161)

* [REFACTOR][NODE][RUNTIME] Move Node to the new Object protocol.

This PR removes the original node system, and make node as a subclass of Object.
This is a major refactor towards a better unified runtime object system.

List of changes in the refactor:

- We now hide data_ field, use Downcast explicitly to get a sub-class object.
- Removed the node system FFI in python.
- Removed the node C API, instead use PackedFunc for list and get attrs.
- Change relay::Op::set_attr_type_key(attr_key_name) to relay::Op::set_attr_type<AttrType>().
  - This change was necessary because of the new Object registration mechanism.
  - Subsequent changes to the op registrations
  - The change revealed a few previous problems that is now fixed.
- Patched up a few missing node type registration.
  - Now we will raise an error if we register object that is not registered.
- The original node.h and container.h are kept in the same location.
- Calling convention: kObjectHandle now equals the old kNodeHandle, kNodeHandle is removed.
- IRFunctor now dispatches on ObjectRef.
- Update to the new type checking API: is_type, derived_from are replaced by IsInstance.
- Removed .hash member function, instead use C++ convention hasher functors.

* Address review comments

4 years ago[Runtime] Enable option to use OpenMP thread pool (#4089)
Haichen Shen [Sun, 20 Oct 2019 17:40:10 +0000 (10:40 -0700)]
[Runtime] Enable option to use OpenMP thread pool (#4089)

4 years ago[Refactor] Rename Datatype to ADT (#4156)
Wei Chen [Sun, 20 Oct 2019 04:57:50 +0000 (21:57 -0700)]
[Refactor] Rename Datatype to ADT (#4156)

We think it will reduce the confusion with the meaning.

https://discuss.tvm.ai/t/discuss-consider-rename-vm-datatype/4339

4 years ago[CI] Update cpu docker (#4153)
Tianqi Chen [Fri, 18 Oct 2019 23:15:52 +0000 (16:15 -0700)]
[CI] Update cpu docker (#4153)

4 years agoAdd lift_if_then_else pass (#3865)
Yao Wang [Fri, 18 Oct 2019 22:22:37 +0000 (15:22 -0700)]
Add lift_if_then_else pass (#3865)

* Add LiftIfThenElse pass

* Add more comments

* Rename and refactor

* Add description for internal data structure

* Rename a test

* Minor change

* Address comments

* Improve update_for

4 years ago[QNN][TFLite] Parsing QNN Add op. Adding MobilenetV2. (#4142)
Animesh Jain [Fri, 18 Oct 2019 17:51:15 +0000 (10:51 -0700)]
[QNN][TFLite] Parsing QNN Add op. Adding MobilenetV2. (#4142)

4 years ago[CI] Pin NNPack pthreadtools version (#4152)
Tianqi Chen [Fri, 18 Oct 2019 16:49:37 +0000 (09:49 -0700)]
[CI] Pin NNPack pthreadtools version (#4152)

4 years agoFix typo (#4144)
Gus Smith [Fri, 18 Oct 2019 15:19:32 +0000 (08:19 -0700)]
Fix typo (#4144)

4 years ago[Relay][Frontend][TF] Add tensor array ops (#3798)
Wei Chen [Fri, 18 Oct 2019 05:41:34 +0000 (22:41 -0700)]
[Relay][Frontend][TF] Add tensor array ops (#3798)

* [Relay][Frontend][TF] Add tensor array ops

* rename

* delete test

* Move utility function

* Refactor

* fix tensor array ops

* fix test

* fix rebase

* Fix serializer bug

* Improve tf convert name lookup to use prelude api

* Fix lint

* Fix test

4 years ago[relay][vm] Separate VM runtime with executable (#4100)
Zhi [Thu, 17 Oct 2019 20:25:08 +0000 (13:25 -0700)]
[relay][vm] Separate VM runtime with executable (#4100)

* [relay][vm] Separate VM runtime with executable

* Address comments

* move ctx back to vm

* make only vm related fields and methods protected

* integrate seriliaztion/deserialization to executable

* create stream

4 years ago[PATCH] Fix undefined __floatdihf in libtvmruntime.so on aarch64. (#4119)
lhutton1 [Thu, 17 Oct 2019 17:05:10 +0000 (18:05 +0100)]
[PATCH] Fix undefined __floatdihf in libtvmruntime.so on aarch64. (#4119)

Arm architecture provides optional FP16 floating point support in two alternative formats, IEEE and an an alternative Arm format.

The ACLE (Arm C Language Extension) defined preprocessor symbol __ARM_FP16_FORMAT_IEEE can be used to distinguish between implementations providing IEEE and the Arm alternative format, but cannot, on its own, be used to determined if FP16 HW support is actually present.

Testing this preprocessor symbol can lead to undefined __floatdihf at runtime on an aarch64 target where no FP16 HW is present.

The relevant preprocessor symbol to determine whether FP16 HW support is present in the target is __ARM_FEATURE_FP16_SCALAR_ARITHMETIC, this symbol implies  __ARM_FP16_FORMAT_IEEE.

The relevant preprocessor symbols are defined by the ACLE standard, section 5.5.21 16-bit floating-point data processing operations, https://static.docs.arm.com/101028/0008/Q2-ACLE_2019Q2_release-0008.pdf

4 years ago[DOCKER] Pin torchvision==0.4.1 (#4140)
Marcus Shawcroft [Thu, 17 Oct 2019 17:04:46 +0000 (18:04 +0100)]
[DOCKER] Pin torchvision==0.4.1 (#4140)

The existing sequence of pip install commands fetches and installs
torch==1.0.1.post2 then fetches an unpinned version of torchvision,
recent torchvision packages hardwire the specific torch version they
depend on, the overall effect is that we install a pinned torch
version then replace it with whatever version the torchvision package
depends on.

The most recent torchvision==0.4.1 package results in some test case
failures.

This patch pins torchvision back to 0.4.0, the most recent version
that the test suite worked.  Removing the explicit torch install
because it is implied and pinned as dependency of torchvision.

Change-Id: Ib30bf6aed79ff130ea15ef5134fefb0508790574

4 years ago[TOPI][x86] Cascade lake support. (#4123)
Animesh Jain [Thu, 17 Oct 2019 16:31:58 +0000 (09:31 -0700)]
[TOPI][x86] Cascade lake support. (#4123)

* [TOPI][x86] Cascade lake support.

* Jenkins test debug 1.

* Testing cascade lake alone.

4 years ago[Relay] Improve build error when no lowered funcs are produced (#4132)
Logan Weber [Thu, 17 Oct 2019 16:27:57 +0000 (09:27 -0700)]
[Relay] Improve build error when no lowered funcs are produced (#4132)

* Improve build error when no lowered funcs

* Switch from fatal to warning

4 years ago[RUNTIME] Refactor object python FFI to new protocol. (#4128)
Tianqi Chen [Wed, 16 Oct 2019 22:24:23 +0000 (15:24 -0700)]
[RUNTIME] Refactor object python FFI to new protocol. (#4128)

* [RUNTIME] Refactor object python FFI to new protocol.

This is a pre-req to bring the Node system under object protocol.
Most of the code reflects the current code in the Node system.

- Use new instead of init so subclass can define their own constructors
- Allow register via name, besides type idnex
- Introduce necessary runtime C API functions
- Refactored Tensor and Datatype to directly use constructor.

* address review comments

4 years agoUpdate PULL_REQUEST_TEMPLATE.md
Tianqi Chen [Wed, 16 Oct 2019 17:44:17 +0000 (10:44 -0700)]
Update PULL_REQUEST_TEMPLATE.md

4 years agoAdding support for dequantizing from int32 to float32. (#4130)
shoubhik [Wed, 16 Oct 2019 16:44:59 +0000 (09:44 -0700)]
Adding support for dequantizing from int32 to float32. (#4130)

4 years ago[Relay][Training] Add and fix gradients (#4126)
Altan Haan [Wed, 16 Oct 2019 14:32:29 +0000 (07:32 -0700)]
[Relay][Training] Add and fix gradients (#4126)

* add and fix gradients

* fix linter issues

4 years ago[QNN] Change default rouning to UPWARD. (#4131)
Animesh Jain [Wed, 16 Oct 2019 05:17:47 +0000 (22:17 -0700)]
[QNN] Change default rouning to UPWARD. (#4131)

4 years agoFix infer type of kernel in dense. (#4125)
shoubhik [Tue, 15 Oct 2019 21:02:08 +0000 (14:02 -0700)]
Fix infer type of kernel in dense. (#4125)

* Fix infer type of kernel in dense.

* - Moving the check of weight being nullptr up as it is needed in both the branches now.
- Adding test case for validating that data dtype and kernel dtypes can be different.

* - Fix the dtype check for weight. If the weight is not present then we will use the data dtype.

4 years ago[Relay][AlterOpLayout] NHWC to NCHWc pad operator. (#4103)
Animesh Jain [Tue, 15 Oct 2019 19:12:01 +0000 (12:12 -0700)]
[Relay][AlterOpLayout] NHWC to NCHWc pad operator. (#4103)

* [Relay][AlterOpLayout] NHWC to NCHWc pad operator.

* Fixing culprit.

* Flaky test 1.

* Flaky test 2.