[GitHub] [incubator-tvm] tobegit3hub opened a new issue #5678: The method scale_shift_nchw in C should add shift to the values of channel

2020-05-26 Thread GitBox


tobegit3hub opened a new issue #5678:
URL: https://github.com/apache/incubator-tvm/issues/5678


   It is a little confused for me when reading the source code of 
https://github.com/apache/incubator-tvm/blob/master/topi/include/topi/nn/mapping.h#L51
 . The `scale_shift_nchw` and `scale_shift_nhwc` should apply scale and shift 
to the values of channel. There are another implementation in Python topi which 
seems to be right in 
https://github.com/apache/incubator-tvm/blob/master/topi/python/topi/nn/mapping.py#L44
 .
   
   Should we change the implementation of `scale_shift_nchw` to this?
   
   ```
   inline Tensor scale_shift_nchw(const Tensor& x, const Tensor& scale, const 
Tensor& shift,
  std::string name = "ScaleShift", std::string 
tag = kBroadcast) {
 return tvm::te::compute(
 x->shape, [&](Var b, Var c, Var h, Var w) { return x(b, c, h, w) * 
scale(c) + shift(c); },
 name, tag);
   }
   ```



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] kevinthesun commented on a change in pull request #5511: [AutoTVM][TOPI] AutoTVM incorrect measurement

2020-05-26 Thread GitBox


kevinthesun commented on a change in pull request #5511:
URL: https://github.com/apache/incubator-tvm/pull/5511#discussion_r430091383



##
File path: topi/python/topi/mali/conv2d.py
##
@@ -345,16 +347,11 @@ def _schedule_winograd(cfg, s, op):
 kernel, G = s[U].op.input_tensors
 s[G].compute_inline()
 eps, nu, co, ci, vco, = s[U].op.axis
-if autotvm.GLOBAL_SCOPE.in_tuning:
-# kernel transformation will be pre-computed during compilation, 
so we skip
-# this part to make tuning records correct
-s[U].pragma(eps, 'debug_skip_region')
-else:
-r_kh, r_kw = s[U].op.reduce_axis
-s[U].reorder(co, ci, eps, nu, r_kh, r_kw, vco)
-_ = [s[U].unroll(x) for x in [eps, nu, r_kh, r_kw]]
-s[U].vectorize(vco)
-tile_and_bind(s, U, co, ci, 1, 256)
+r_kh, r_kw = s[U].op.reduce_axis

Review comment:
   This part should not be required in autotuning?





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] comaniac commented on issue #5662: [PatternLang] Lift constant nodes to partitioned function arguments

2020-05-26 Thread GitBox


comaniac commented on issue #5662:
URL: https://github.com/apache/incubator-tvm/issues/5662#issuecomment-634175194


   #5663 merged. Thanks @mbrookhart :)



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen merged pull request #5665: [Arith] Handle likely in IRMutatorWithAnalyzer

2020-05-26 Thread GitBox


tqchen merged pull request #5665:
URL: https://github.com/apache/incubator-tvm/pull/5665


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen edited a comment on pull request #5670: [PYTHON] Add buffer name when creating tensor bindings

2020-05-26 Thread GitBox


tqchen edited a comment on pull request #5670:
URL: https://github.com/apache/incubator-tvm/pull/5670#issuecomment-633648348


   cc @roastduck @ZihengJiang @zhiics 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] lichun-wang opened a new issue #5673: mxnet group conv not support very well by tvm

2020-05-26 Thread GitBox


lichun-wang opened a new issue #5673:
URL: https://github.com/apache/incubator-tvm/issues/5673


   hi,
   I have a problem,  I use tvm to speed up resnet101(mxnet) on 1080ti, I try 
to use group conv, but after I set group =2, the speed became slower too much.  
Then I try to speed up resnext101(mxnet). ResNext also became more slower .  So 
, do  tvm not support  group conv (mxnet ) ?
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] yongwww commented on a change in pull request #4312: [TOPI][Relay][OP] Dynamic NMS and strided_slice

2020-05-26 Thread GitBox


yongwww commented on a change in pull request #4312:
URL: https://github.com/apache/incubator-tvm/pull/4312#discussion_r430613417



##
File path: python/tvm/relay/op/transform.py
##
@@ -607,31 +607,40 @@ def split(data, indices_or_sections, axis=0):
 return TupleWrapper(_make.split(data, indices_or_sections, axis), ret_size)
 
 
-def strided_slice(data, begin, end, strides=None):
+def strided_slice(data, begin, end, strides=None, ignore_end=False):
 """Strided slice of an array.
 
 Parameters
 --
 data : relay.Expr
 The source array to be sliced.
 
-begin: list of int
+begin: relay.Expr or List[int]
 The indices to begin with in the slicing.
 
-end: list of int
+end: relay.Expr or List[int]
 Indices indicating end of the slice.
 
-strides: list of int, optional
+strides: relay.Expr or List[int], optional
 Specifies the stride values, it can be negative in that case,
 the input tensor will be reversed in that particular axis.
 
+ignore_end: boolean, optional
+Whether to ignore input end.

Review comment:
   Added





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] mbrookhart commented on pull request #5656: [BYOC] Pattern Language MergeComposite

2020-05-26 Thread GitBox


mbrookhart commented on pull request #5656:
URL: https://github.com/apache/incubator-tvm/pull/5656#issuecomment-634098344







This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen commented on pull request #5600: [TOPI] Improve CUDA softmax scheduling

2020-05-26 Thread GitBox


tqchen commented on pull request #5600:
URL: https://github.com/apache/incubator-tvm/pull/5600#issuecomment-633648673


   THanks @wpan11nv , @roastduck @Shawn-Inspur ! 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] comaniac closed issue #5662: [PatternLang] Lift constant nodes to partitioned function arguments

2020-05-26 Thread GitBox


comaniac closed issue #5662:
URL: https://github.com/apache/incubator-tvm/issues/5662


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] masahi merged pull request #5656: [BYOC] Pattern Language MergeComposite

2020-05-26 Thread GitBox


masahi merged pull request #5656:
URL: https://github.com/apache/incubator-tvm/pull/5656


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen commented on issue #5669: build env

2020-05-26 Thread GitBox


tqchen commented on issue #5669:
URL: https://github.com/apache/incubator-tvm/issues/5669#issuecomment-633660918


   Please open a new question thread on https://discuss.tvm.ai/



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen merged pull request #5668: [REFACTOR][TIR][API-Change] Migrate BuildConfig to PassContext.

2020-05-26 Thread GitBox


tqchen merged pull request #5668:
URL: https://github.com/apache/incubator-tvm/pull/5668


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] comaniac commented on pull request #5656: [BYOC] Pattern Language MergeComposite

2020-05-26 Thread GitBox


comaniac commented on pull request #5656:
URL: https://github.com/apache/incubator-tvm/pull/5656#issuecomment-634163620







This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] wpan11nv commented on a change in pull request #5600: [TOPI] Improve CUDA softmax scheduling

2020-05-26 Thread GitBox


wpan11nv commented on a change in pull request #5600:
URL: https://github.com/apache/incubator-tvm/pull/5600#discussion_r429998819



##
File path: topi/python/topi/cuda/softmax.py
##
@@ -53,13 +54,62 @@ def schedule_softmax(outs):
 raise ValueError('Tag is expected to be softmax_output or 
log_softmax_output. \
  Got {0}'.format(op_tag))
 
+# The nvptx backend only supports 32-bits warp shuffle instructions.
+#
+# TODO(tvm-team) Fix nvptx codegen or deprecate nvptx backend.
+def sched_warp_softmax():
+if tgt.target_name == "nvptx":
+return softmax.dtype == "float32" or softmax.dtype == "int32"
+return True
+
 if len(softmax.shape) > 2:
 ops = [max_elem.op, expsum.op, softmax.op]
 if exp is not None:
 ops.append(exp.op)
 
 for op in ops:
 s = schedule_injective_from_existing(s, op.output(0))
+
+elif sched_warp_softmax():
+# A warp of 32 threads performs a row reduction.
+num_thread = tgt.thread_warp_size
+block_x = te.thread_axis("blockIdx.x")
+thread_x = te.thread_axis((0, num_thread), "threadIdx.x")
+
+# (4) softmax
+xo, xi = s[softmax].split(softmax.op.axis[1], nparts=num_thread)
+if tgt.target_name != "nvptx":
+_, xii = s[softmax].split(xi, factor=4)
+s[softmax].vectorize(xii)
+s[softmax].bind(xo, thread_x)
+s[softmax].bind(softmax.op.axis[0], block_x)
+
+# (3) expsum
+k = expsum.op.reduce_axis[0]
+ko, _ = s[expsum].split(k, nparts=num_thread)
+s[expsum].bind(ko, thread_x)
+s[expsum].compute_at(s[softmax], xo)
+
+# (2) exp
+if exp is not None:
+xo, xi = s[exp].split(exp.op.axis[1], nparts=num_thread)
+_, xii = s[exp].split(xi, factor=4)
+s[exp].vectorize(xii)

Review comment:
   Good point, I forgot why I added this nvptx check. Now removed, 





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] anijain2305 commented on pull request #5672: [Doc] Misc doc fix

2020-05-26 Thread GitBox


anijain2305 commented on pull request #5672:
URL: https://github.com/apache/incubator-tvm/pull/5672#issuecomment-634090086


   Thanks @FrozenGene @siju-samuel This is merged!



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] kevinthesun commented on pull request #5511: [AutoTVM][TOPI] AutoTVM incorrect measurement

2020-05-26 Thread GitBox


kevinthesun commented on pull request #5511:
URL: https://github.com/apache/incubator-tvm/pull/5511#issuecomment-634164849


   Thanks @cchung100m 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen merged pull request #5600: [TOPI] Improve CUDA softmax scheduling

2020-05-26 Thread GitBox


tqchen merged pull request #5600:
URL: https://github.com/apache/incubator-tvm/pull/5600


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] kevinthesun commented on pull request #5459: [Relay][Op]Support symbolic TopK, Ones, Zeros and Full

2020-05-26 Thread GitBox


kevinthesun commented on pull request #5459:
URL: https://github.com/apache/incubator-tvm/pull/5459#issuecomment-633759356


   Thanks @icemelon9 @tqchen @yongwww @junrushao1994 !



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] zhiics commented on a change in pull request #5668: [REFACTOR][TIR][API-Change] Migrate BuildConfig to PassContext.

2020-05-26 Thread GitBox


zhiics commented on a change in pull request #5668:
URL: https://github.com/apache/incubator-tvm/pull/5668#discussion_r430104045



##
File path: include/tvm/ir/attrs.h
##
@@ -236,6 +236,19 @@ class DictAttrs : public Attrs {
   TVM_DEFINE_OBJECT_REF_COW_METHOD(DictAttrsNode);
 };
 
+/*!
+ * \brief Create a Attr object with all default values.

Review comment:
   ```suggestion
* \brief Create an Attr object with all default values.
   ```





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] mbrookhart opened a new pull request #5674: ][PatternLang] Add a check for null function attributes

2020-05-26 Thread GitBox


mbrookhart opened a new pull request #5674:
URL: https://github.com/apache/incubator-tvm/pull/5674


   Fixes bug reported by @lixiaoquan in #5656 
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] FrozenGene opened a new pull request #5671: [C++ RPC] Fix C++ RPC build problem on Linux

2020-05-26 Thread GitBox


FrozenGene opened a new pull request #5671:
URL: https://github.com/apache/incubator-tvm/pull/5671


   We can not build C++ rpc on Linux because of `win32_process.cc`. Current fix 
is to exclude `win32_process.cc` on Makefile because we build C++ rpc on 
Windows using CMake. 
   
   Another fix is to remove unnecessary variable of `getcwd` return value.
   
   @jmorrill @kparzysz-quic Please review it.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen commented on pull request #5674: [PatternLang] Add a check for null function attributes

2020-05-26 Thread GitBox


tqchen commented on pull request #5674:
URL: https://github.com/apache/incubator-tvm/pull/5674#issuecomment-634241073







This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen commented on pull request #5675: Call previous excepthook in tvm_excepthook.

2020-05-26 Thread GitBox


tqchen commented on pull request #5675:
URL: https://github.com/apache/incubator-tvm/pull/5675#issuecomment-634240534







This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] dhruvaray commented on a change in pull request #5447: [TOPI,RELAY][TFLITE] Sparse to dense operator

2020-05-26 Thread GitBox


dhruvaray commented on a change in pull request #5447:
URL: https://github.com/apache/incubator-tvm/pull/5447#discussion_r430402869



##
File path: topi/include/topi/transform.h
##
@@ -1309,5 +1309,57 @@ inline Tensor one_hot(const Tensor& indices, const 
PrimExpr on_value, const Prim
   name, tag);
 }
 
+/*!
+ * \brief Get a dense tensor.
+ * \param sparse_indices sparse_indices[i] contains the complete index where 
sparse_values[i] will be placed.
+ * \param sparse_values is a 0-D or 1-D tensor. Values corresponding to each 
row of sparse_indices
+ * \param default_value is a 0-D tensor. Defaults to zero.
+ * \param output_shape is the shape of the dense output tensor
+ * \param name output tensor name.
+ * \param tag output tensor tag.
+ * \return Tensor of output_shape.
+ */
+inline Tensor sparse_to_dense(const Tensor& sparse_indices,
+  const Tensor& sparse_values,
+  const Tensor& default_value,
+  const Array& output_shape,

Review comment:
   @siju-samuel  : tf 2.0 introduces a top-level wrapper object 
SparseTensor( 
https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor) which 
encapsulates this information (indices, values, dense_shape). The topi layer 
takes all these pieces of information and hence should be compatible across all 
frameworks





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] wpan11nv commented on pull request #5600: [TOPI] Improve CUDA softmax scheduling

2020-05-26 Thread GitBox


wpan11nv commented on pull request #5600:
URL: https://github.com/apache/incubator-tvm/pull/5600#issuecomment-633631595


   This build is fine now and all comments are addressed. Thanks all for 
reviewing this patch!



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen merged pull request #5675: Call previous excepthook in tvm_excepthook.

2020-05-26 Thread GitBox


tqchen merged pull request #5675:
URL: https://github.com/apache/incubator-tvm/pull/5675


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen opened a new pull request #5670: [PYTHON] Add buffer name when creating tensor bindings

2020-05-26 Thread GitBox


tqchen opened a new pull request #5670:
URL: https://github.com/apache/incubator-tvm/pull/5670


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen commented on pull request #5665: [Arith] Handle likely in IRMutatorWithAnalyzer

2020-05-26 Thread GitBox


tqchen commented on pull request #5665:
URL: https://github.com/apache/incubator-tvm/pull/5665#issuecomment-633646993


   Thanks @roastduck !



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tmoreau89 commented on pull request #5659: [TARGET] enable amd_apu device on vulkan target

2020-05-26 Thread GitBox


tmoreau89 commented on pull request #5659:
URL: https://github.com/apache/incubator-tvm/pull/5659#issuecomment-634124725


   Thank you @mei-ye the PR has been merged



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen merged pull request #5671: [C++ RPC] Fix C++ RPC build problem on Linux

2020-05-26 Thread GitBox


tqchen merged pull request #5671:
URL: https://github.com/apache/incubator-tvm/pull/5671


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] kevinthesun commented on a change in pull request #5459: [Relay][Op]Support symbolic TopK, Ones, Zeros and Full

2020-05-26 Thread GitBox


kevinthesun commented on a change in pull request #5459:
URL: https://github.com/apache/incubator-tvm/pull/5459#discussion_r430090153



##
File path: src/relay/analysis/util.cc
##
@@ -450,6 +451,13 @@ bool IsDataDependant(const CallNode* call) {
 return false;
   }
 }
+  } else if (op->name == "topk") {

Review comment:
   ones/zeros/full/broadcast_to don't need this since when shape is 
constant, they don't need shape func.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] lixiaoquan commented on pull request #5656: [BYOC] Pattern Language MergeComposite

2020-05-26 Thread GitBox


lixiaoquan commented on pull request #5656:
URL: https://github.com/apache/incubator-tvm/pull/5656#issuecomment-633940335


   Original MergeComposite can apply on any IR, but PatternLang seems can't do 
that yet.
   
   I run into a issue that if try to match a pattern on IR containing control 
flow, it will hang or crash.
   
   
   ```
   diff --git a/tests/python/frontend/tensorflow/test_control_flow.py 
b/tests/python/frontend/tensorflow/test_control_flow.py
   index 9777a8dc4..e80cda65c 100644
   --- a/tests/python/frontend/tensorflow/test_control_flow.py
   +++ b/tests/python/frontend/tensorflow/test_control_flow.py
   @@ -25,10 +25,22 @@ import numpy as np
from tvm import nd
from tvm import relay
from tvm.relay.frontend.tensorflow import from_tensorflow
   +from tvm.relay.dataflow_pattern import *


   +add_pattern = is_op('add')(wildcard(), wildcard())
   +sub_pattern = is_op('subtract')(wildcard(), wildcard())
   +class TestRewrite(DFPatternCallback):
   +def __init__(self):
   +self.pattern = add_pattern
   +def callback(self, pre, post, node_map):
   +return post.args[0] - post.args[1]
   +
def check_equal(graph, tf_out, input_map=None):
mod, params = from_tensorflow(graph.as_graph_def(add_shapes=True))
   +
   +partition(TestRewrite().pattern, mod['main'].body)
   +
if input_map is not None:
params.update(input_map)
ex = relay.create_executor('vm', mod=mod)
   
   ```



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] cchung100m commented on pull request #5511: [AutoTVM][TOPI] AutoTVM incorrect measurement

2020-05-26 Thread GitBox


cchung100m commented on pull request #5511:
URL: https://github.com/apache/incubator-tvm/pull/5511#issuecomment-633621823







This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen merged pull request #5677: Add a regression testcase for #5674

2020-05-26 Thread GitBox


tqchen merged pull request #5677:
URL: https://github.com/apache/incubator-tvm/pull/5677


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen commented on a change in pull request #5675: Call previous excepthook in tvm_excepthook.

2020-05-26 Thread GitBox


tqchen commented on a change in pull request #5675:
URL: https://github.com/apache/incubator-tvm/pull/5675#discussion_r430655132



##
File path: python/tvm/__init__.py
##
@@ -63,9 +63,11 @@
 # Contrib initializers
 from .contrib import rocm as _rocm, nvcc as _nvcc, sdaccel as _sdaccel
 
+PREV_EXCEPTHOOK = sys.excepthook
+
 # Clean subprocesses when TVM is interrupted
 def tvm_excepthook(exctype, value, trbk):
-print('\n'.join(traceback.format_exception(exctype, value, trbk)))

Review comment:
   Let us modify the function as `tvm_wrap_excepthook(exception_hook)` that 
returns a new wrapped hook, and then do
   
   sys.excepthook = tvm_wrap_exceptionhook(sys.except_hook)
   





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen commented on pull request #5670: [PYTHON] Add buffer name when creating tensor bindings

2020-05-26 Thread GitBox


tqchen commented on pull request #5670:
URL: https://github.com/apache/incubator-tvm/pull/5670#issuecomment-633648348


   cc @roastduck @ZihengJiang 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] u99127 commented on a change in pull request #5648: µtvm debug improvements

2020-05-26 Thread GitBox


u99127 commented on a change in pull request #5648:
URL: https://github.com/apache/incubator-tvm/pull/5648#discussion_r430249638



##
File path: src/runtime/micro/host_driven/utvm_runtime.c
##
@@ -101,7 +101,7 @@ void UTVMMain() {
 
 // We use a dummy function to signal execution is finished for device
 // backends which require breakpoints.
-void __attribute__((noinline)) UTVMDone() { utvm_done = 1; }
+void __attribute__((noinline,noreturn)) UTVMDone() { utvm_done = 1; for (;;) ; 
}

Review comment:
   fair enough, lgtm.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] mbaret commented on a change in pull request #5634: [CODEGEN][CONTRIB] CoreML codegen

2020-05-26 Thread GitBox


mbaret commented on a change in pull request #5634:
URL: https://github.com/apache/incubator-tvm/pull/5634#discussion_r430255016



##
File path: tests/python/contrib/test_coreml_codegen.py
##
@@ -0,0 +1,64 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import pytest
+import numpy as np
+
+import tvm
+from tvm import relay
+from tvm.relay import transform
+from tvm.contrib.target import coreml as _coreml
+
+def check_result(mod, map_inputs, out_shape, result, tol=1e-3, target="llvm",
+ ctx=tvm.cpu(), params=None):
+def check_graph_runtime_result():
+with relay.build_config(opt_level=3):
+json, lib, param = relay.build(mod, target=target, params=params)
+rt_mod = tvm.contrib.graph_runtime.create(json, lib, ctx)
+
+for name, data in map_inputs.items():
+rt_mod.set_input(name, data)
+rt_mod.set_input(**param)
+rt_mod.run()
+out = tvm.nd.empty(out_shape, ctx=ctx)
+out = rt_mod.get_output(0, out)
+
+tvm.testing.assert_allclose(out.asnumpy(), result, rtol=tol, atol=tol)
+
+check_graph_runtime_result()
+
+@pytest.mark.skip('skip because coremltools is not available in CI')

Review comment:
   Does this mean there will be no testing in CI for this change? I think 
we should find a way to test as much as possible or enable CI to perform some 
proper tests, otherwise we're not going to have confidence we don't break this 
integration. For instance, is there a way we could just test the compilation 
pathway?

##
File path: python/tvm/contrib/target/coreml.py
##
@@ -0,0 +1,252 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# pylint: disable=invalid-name, unused-argument, import-outside-toplevel
+"""Utility to compile CoreML models"""
+
+import os
+import shutil
+
+import tvm._ffi
+from ...relay.expr_functor import ExprVisitor
+from ...relay.expr import Constant
+from ...relay import op as _op
+from .. import xcode, coreml_runtime
+
+def _convert_add(builder, name, inputs, outputs, args, attrs):
+builder.add_elementwise(
+name=name,
+input_names=inputs,
+output_name=outputs[0],
+mode='ADD'
+)
+
+def _convert_multiply(builder, name, inputs, outputs, args, attrs):
+builder.add_elementwise(
+name=name,
+input_names=inputs,
+output_name=outputs[0],
+mode='MULTIPLY'
+)
+
+def _convert_clip(builder, name, inputs, outputs, args, attrs):
+builder.add_clip(
+name=name,
+input_name=inputs[0],
+output_name=outputs[0],
+min_value=attrs.a_min,
+max_value=attrs.a_max
+)
+
+def _convert_batch_flatten(builder, name, inputs, outputs, args, attrs):
+builder.add_flatten_to_2d(
+name=name,
+input_name=inputs[0],
+output_name=outputs[0]
+)
+
+def _convert_softmax(builder, name, inputs, outputs, args, attrs):
+builder.add_softmax_nd(
+name=name,
+input_name=inputs[0],
+output_name=outputs[0],
+axis=int(attrs['axis'])
+)
+
+def _convert_conv2d(builder, name, inputs, outputs, args, attrs):
+weight = args[1].data.asnumpy()
+if attrs['kernel_layout'] == 'OIHW':
+# convert to 'HWIO'
+weight = weight.transpose([2, 3, 1, 0])
+kh, kw, kc, oc = weight.shape
+
+builder.add_convolution(
+name=name,
+kernel_channels=kc,
+output_channels=oc,
+height=kh,
+  

[GitHub] [incubator-tvm] tqchen merged pull request #5661: add tvm.micro pydoc to sphinx

2020-05-26 Thread GitBox


tqchen merged pull request #5661:
URL: https://github.com/apache/incubator-tvm/pull/5661


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] mbrookhart opened a new pull request #5677: Add a regression testcase for #5674

2020-05-26 Thread GitBox


mbrookhart opened a new pull request #5677:
URL: https://github.com/apache/incubator-tvm/pull/5677


   cc @tqchen 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen merged pull request #5674: [PatternLang] Add a check for null function attributes

2020-05-26 Thread GitBox


tqchen merged pull request #5674:
URL: https://github.com/apache/incubator-tvm/pull/5674


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] masahi commented on pull request #5663: [POC][PatternLang]Remove constants from partitioned functions

2020-05-26 Thread GitBox


masahi commented on pull request #5663:
URL: https://github.com/apache/incubator-tvm/pull/5663#issuecomment-634165254


   Thanks @mbrookhart @comaniac @zhiics 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] FrozenGene opened a new pull request #5672: [Doc] Misc doc fix

2020-05-26 Thread GitBox


FrozenGene opened a new pull request #5672:
URL: https://github.com/apache/incubator-tvm/pull/5672


   This pr fixes two doc of our tvm.
   
   1. Convert Layout.
   We have `tvm.transform.PassContext`, not `relay.transform.PassContext`
   
   2. tutorials/frontend/deploy_prequantized_tflite.py
   No newline between author and content so that mix them into one line
   
![image](https://user-images.githubusercontent.com/7287321/82885528-dfa0bf80-9f77-11ea-93c8-2fde8d067d6b.png)
   
   @anijain2305 @siju-samuel Please review it.
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen merged pull request #5670: [PYTHON] Add buffer name when creating tensor bindings

2020-05-26 Thread GitBox


tqchen merged pull request #5670:
URL: https://github.com/apache/incubator-tvm/pull/5670


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen closed issue #5669: build env

2020-05-26 Thread GitBox


tqchen closed issue #5669:
URL: https://github.com/apache/incubator-tvm/issues/5669


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] icemelon9 commented on a change in pull request #5459: [Relay][Op]Support symbolic TopK, Ones, Zeros and Full

2020-05-26 Thread GitBox


icemelon9 commented on a change in pull request #5459:
URL: https://github.com/apache/incubator-tvm/pull/5459#discussion_r430022484



##
File path: src/relay/analysis/util.cc
##
@@ -450,6 +451,13 @@ bool IsDataDependant(const CallNode* call) {
 return false;
   }
 }
+  } else if (op->name == "topk") {

Review comment:
   We should also apply this to ones/zeros/full/broadcast_to.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tmoreau89 closed pull request #5659: [TARGET] enable amd_apu device on vulkan target

2020-05-26 Thread GitBox


tmoreau89 closed pull request #5659:
URL: https://github.com/apache/incubator-tvm/pull/5659


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] comaniac opened a new pull request #5676: [DOC] Improve Pattern Language Docs

2020-05-26 Thread GitBox


comaniac opened a new pull request #5676:
URL: https://github.com/apache/incubator-tvm/pull/5676


   Based on my experience of using pattern language in the past two weeks, I 
added some more examples and use cases to the pattern language document. 
Hopefully this can help more people get familiar with the pattern language soon.
   
   cc @mbrookhart 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] kevinthesun commented on pull request #5639: [TF] Support TupleWrapper as direct ancestor of control flow ops

2020-05-26 Thread GitBox


kevinthesun commented on pull request #5639:
URL: https://github.com/apache/incubator-tvm/pull/5639#issuecomment-634199412


   Thanks @lixiaoquan 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] areusch commented on pull request #5661: add tvm.micro pydoc to sphinx

2020-05-26 Thread GitBox


areusch commented on pull request #5661:
URL: https://github.com/apache/incubator-tvm/pull/5661#issuecomment-634196442


   @tqchen @tom-gall 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] cchung100m commented on a change in pull request #5511: [AutoTVM][TOPI] AutoTVM incorrect measurement

2020-05-26 Thread GitBox


cchung100m commented on a change in pull request #5511:
URL: https://github.com/apache/incubator-tvm/pull/5511#discussion_r430330419



##
File path: topi/python/topi/mali/conv2d.py
##
@@ -345,16 +347,11 @@ def _schedule_winograd(cfg, s, op):
 kernel, G = s[U].op.input_tensors
 s[G].compute_inline()
 eps, nu, co, ci, vco, = s[U].op.axis
-if autotvm.GLOBAL_SCOPE.in_tuning:
-# kernel transformation will be pre-computed during compilation, 
so we skip
-# this part to make tuning records correct
-s[U].pragma(eps, 'debug_skip_region')
-else:
-r_kh, r_kw = s[U].op.reduce_axis
-s[U].reorder(co, ci, eps, nu, r_kh, r_kw, vco)
-_ = [s[U].unroll(x) for x in [eps, nu, r_kh, r_kw]]
-s[U].vectorize(vco)
-tile_and_bind(s, U, co, ci, 1, 256)
+r_kh, r_kw = s[U].op.reduce_axis

Review comment:
   Hi @kevinthesun 
   
   Thanks for the review. I update the part you mentioned.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] masahi merged pull request #5663: [POC][PatternLang]Remove constants from partitioned functions

2020-05-26 Thread GitBox


masahi merged pull request #5663:
URL: https://github.com/apache/incubator-tvm/pull/5663


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] notoraptor opened a new pull request #5675: Call previous excepthook in tvm_excepthook.

2020-05-26 Thread GitBox


notoraptor opened a new pull request #5675:
URL: https://github.com/apache/incubator-tvm/pull/5675


   Hi! This is a small pull request to fix `tvm_excepthook` so that it call the 
previous excepthook.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] comaniac edited a comment on pull request #5656: [BYOC] Pattern Language MergeComposite

2020-05-26 Thread GitBox


comaniac edited a comment on pull request #5656:
URL: https://github.com/apache/incubator-tvm/pull/5656#issuecomment-634171984


   All unit tests including DNNL are passed in my local after rebasing with 
#5663.
   
   @masahi @zhiics @mbaret this is ready for review.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] kevinthesun merged pull request #5639: [TF] Support TupleWrapper as direct ancestor of control flow ops

2020-05-26 Thread GitBox


kevinthesun merged pull request #5639:
URL: https://github.com/apache/incubator-tvm/pull/5639


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] kevinthesun merged pull request #5459: [Relay][Op]Support symbolic TopK, Ones, Zeros and Full

2020-05-26 Thread GitBox


kevinthesun merged pull request #5459:
URL: https://github.com/apache/incubator-tvm/pull/5459


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] kevinthesun merged pull request #5511: [AutoTVM][TOPI] AutoTVM incorrect measurement

2020-05-26 Thread GitBox


kevinthesun merged pull request #5511:
URL: https://github.com/apache/incubator-tvm/pull/5511


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tqchen commented on issue #5550: RuntimeError: Unsupported operator: global_pool_avg

2020-05-26 Thread GitBox


tqchen commented on issue #5550:
URL: https://github.com/apache/incubator-tvm/issues/5550#issuecomment-633661035


   ping @icemelon9 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] lichun-wang commented on issue #5673: mxnet group conv not support very well by tvm

2020-05-26 Thread GitBox


lichun-wang commented on issue #5673:
URL: https://github.com/apache/incubator-tvm/issues/5673#issuecomment-634380424


   if I set group=32, the speed is faster then group = 2.  if group = 1 ,  
after tvm  , process one image cost  6ms, if group = 2 , cost about 200ms,  
group = 3 cost 17ms.  When group =2 , the speed is the  slowest.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] anijain2305 merged pull request #5672: [Doc] Misc doc fix

2020-05-26 Thread GitBox


anijain2305 merged pull request #5672:
URL: https://github.com/apache/incubator-tvm/pull/5672


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] tmoreau89 merged pull request #5659: [TARGET] enable amd_apu device on vulkan target

2020-05-26 Thread GitBox


tmoreau89 merged pull request #5659:
URL: https://github.com/apache/incubator-tvm/pull/5659


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-tvm] masahi commented on pull request #5656: [BYOC] Pattern Language MergeComposite

2020-05-26 Thread GitBox


masahi commented on pull request #5656:
URL: https://github.com/apache/incubator-tvm/pull/5656#issuecomment-634305173


   Thanks @comaniac @mbrookhart @zhiics 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[incubator-tvm] branch master updated: Call previous excepthook in tvm_excepthook. (#5675)

2020-05-26 Thread tqchen
This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/master by this push:
 new 07449f5  Call previous excepthook in tvm_excepthook. (#5675)
07449f5 is described below

commit 07449f5a579bdde6e98527aa652e6f693ec4c81e
Author: notoraptor 
AuthorDate: Tue May 26 21:15:18 2020 -0400

Call previous excepthook in tvm_excepthook. (#5675)

* Call previous excepthook in tvm_excepthook.

* Rename prev_excepthook.

* Create a tvm_wrap_excepthook to wrap a given excepthook with tvm custom 
excepthook work
and call it on system previous excepthook.

* Add docstring.
---
 python/tvm/__init__.py | 21 +
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/python/tvm/__init__.py b/python/tvm/__init__.py
index f781aef..b9fbcb2 100644
--- a/python/tvm/__init__.py
+++ b/python/tvm/__init__.py
@@ -63,12 +63,17 @@ from . import arith
 # Contrib initializers
 from .contrib import rocm as _rocm, nvcc as _nvcc, sdaccel as _sdaccel
 
-# Clean subprocesses when TVM is interrupted
-def tvm_excepthook(exctype, value, trbk):
-print('\n'.join(traceback.format_exception(exctype, value, trbk)))
-if hasattr(multiprocessing, 'active_children'):
-# pylint: disable=not-callable
-for p in multiprocessing.active_children():
-p.terminate()
+def tvm_wrap_excepthook(exception_hook):
+"""Wrap given excepthook with TVM additional work."""
 
-sys.excepthook = tvm_excepthook
+def wrapper(exctype, value, trbk):
+"""Clean subprocesses when TVM is interrupted."""
+exception_hook(exctype, value, trbk)
+if hasattr(multiprocessing, 'active_children'):
+# pylint: disable=not-callable
+for p in multiprocessing.active_children():
+p.terminate()
+
+return wrapper
+
+sys.excepthook = tvm_wrap_excepthook(sys.excepthook)



[incubator-tvm] branch master updated (81ad18e -> af162c4)

2020-05-26 Thread tqchen
This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git.


from 81ad18e  [BYOC] Pattern Language MergeComposite (#5656)
 add af162c4  add a testcase for #5674 (#5677)

No new revisions were added by this update.

Summary of changes:
 tests/python/relay/test_dataflow_pattern.py | 17 +
 1 file changed, 17 insertions(+)



[incubator-tvm] branch master updated (6100112 -> 81ad18e)

2020-05-26 Thread masahi
This is an automated email from the ASF dual-hosted git repository.

masahi pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git.


from 6100112  add a check for null function attributes (#5674)
 add 81ad18e  [BYOC] Pattern Language MergeComposite (#5656)

No new revisions were added by this update.

Summary of changes:
 python/tvm/relay/dataflow_pattern/__init__.py   |   2 +-
 python/tvm/relay/op/contrib/dnnl.py |  14 +-
 python/tvm/relay/transform/transform.py |   2 +-
 src/relay/transforms/merge_composite.cc | 193 +---
 tests/python/relay/test_pass_merge_composite.py | 393 
 5 files changed, 276 insertions(+), 328 deletions(-)



[incubator-tvm] branch master updated (b716a97 -> 6100112)

2020-05-26 Thread tqchen
This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git.


from b716a97  add tvm.micro pydoc to sphinx (#5661)
 add 6100112  add a check for null function attributes (#5674)

No new revisions were added by this update.

Summary of changes:
 src/relay/ir/dataflow_matcher.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[incubator-tvm] branch master updated: add tvm.micro pydoc to sphinx (#5661)

2020-05-26 Thread tqchen
This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/master by this push:
 new b716a97  add tvm.micro pydoc to sphinx (#5661)
b716a97 is described below

commit b716a97136b117e1eca80989250fb4a8f6271229
Author: Andrew Reusch 
AuthorDate: Tue May 26 11:30:19 2020 -0700

add tvm.micro pydoc to sphinx (#5661)

* add tvm.micro pydoc to sphinx

* making build pass and addressing tqchen comments
---
 docs/api/python/index.rst|  1 +
 docs/api/python/{index.rst => micro.rst} | 35 ++--
 2 files changed, 7 insertions(+), 29 deletions(-)

diff --git a/docs/api/python/index.rst b/docs/api/python/index.rst
index c279dc2..50d7a3d 100644
--- a/docs/api/python/index.rst
+++ b/docs/api/python/index.rst
@@ -40,6 +40,7 @@ Python API
relay/testing
autotvm
rpc
+   micro
contrib
graph_runtime
vta/index
diff --git a/docs/api/python/index.rst b/docs/api/python/micro.rst
similarity index 70%
copy from docs/api/python/index.rst
copy to docs/api/python/micro.rst
index c279dc2..1a93f74 100644
--- a/docs/api/python/index.rst
+++ b/docs/api/python/micro.rst
@@ -15,32 +15,9 @@
 specific language governing permissions and limitations
 under the License.
 
-Python API
-==
-
-.. toctree::
-   :maxdepth: 2
-
-   runtime
-   ndarray
-   error
-   ir
-   target
-   tir
-   te
-   driver
-   relay/index
-   relay/frontend
-   relay/nn
-   relay/vision
-   relay/image
-   relay/transform
-   relay/analysis
-   relay/backend
-   relay/testing
-   autotvm
-   rpc
-   contrib
-   graph_runtime
-   vta/index
-   topi
+tvm.micro
+-
+.. automodule:: tvm.micro
+   :members:
+   :imported-members:
+   :autosummary:



[incubator-tvm] branch master updated: [TF] Support TupleWrapper as direct ancestor of control flow ops (#5639)

2020-05-26 Thread kevinthesun
This is an automated email from the ASF dual-hosted git repository.

kevinthesun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/master by this push:
 new 4f9d4d7  [TF] Support TupleWrapper as direct ancestor of control flow 
ops (#5639)
4f9d4d7 is described below

commit 4f9d4d78a046a8567fd93445c3b5fc2a68081259
Author: lixiaoquan 
AuthorDate: Wed May 27 02:29:29 2020 +0800

[TF] Support TupleWrapper as direct ancestor of control flow ops (#5639)
---
 python/tvm/relay/frontend/tensorflow.py| 59 +-
 .../frontend/tensorflow/test_control_flow.py   | 20 
 2 files changed, 45 insertions(+), 34 deletions(-)

diff --git a/python/tvm/relay/frontend/tensorflow.py 
b/python/tvm/relay/frontend/tensorflow.py
index ab9e9e6..d4b73f9 100644
--- a/python/tvm/relay/frontend/tensorflow.py
+++ b/python/tvm/relay/frontend/tensorflow.py
@@ -3073,21 +3073,19 @@ class GraphProto(object):
 branch = self._branches[node_name_prefix]
 false_br = self._backtrack_construct(node.input[0])
 true_br = self._backtrack_construct(node.input[1])
-assert len(true_br) == 1
-assert len(false_br) == 1
-branch.true_branch = true_br[0]
-branch.false_branch = false_br[0]
-op = [branch.if_node()]
+branch.true_branch = true_br
+branch.false_branch = false_br
+op = branch.if_node()
 if node_name_prefix not in self._while_loop_name_set:
 try:
 cond_val = np.all(_infer_value(branch.cond, 
self._params,
self._mod).asnumpy())
 if cond_val:
-op = [branch.true_branch]
+op = branch.true_branch
 else:
-op = [branch.false_branch]
+op = branch.false_branch
 except Exception:
-op = [branch.if_node()]
+op = branch.if_node()
 elif node.op == "Exit":
 loop = self._loops[node_name_prefix]
 
@@ -3113,17 +3111,15 @@ class GraphProto(object):
 if exit_number == j:
 body_pos = i
 break
-op = [_expr.TupleGetItem(expr, body_pos)]
+op = _expr.TupleGetItem(expr, body_pos)
 elif node.op == "Enter":
 op = self._backtrack_construct(node.input[0])
 elif node.op == "LoopCond":
 op = self._backtrack_construct(node.input[0])
-assert len(op) == 1
-self._loops[node_name_prefix].cond = op[0]
+self._loops[node_name_prefix].cond = op
 elif node.op == "Switch":
 op = self._backtrack_construct(node.input[0])
 cond = self._backtrack_construct(node.input[1])
-assert len(op) == 1
 if _in_while_loop(self._control_flow_node_map, node_name_prefix):
 if node_name_prefix not in self._loop_var_order:
 self._loop_var_order[node_name_prefix] = []
@@ -3132,11 +3128,11 @@ class GraphProto(object):
 else:
 self._loop_var_order[node_name_prefix].\
 append(int(node.name.split("Switch_")[-1]))
-self._loops[node_name_prefix].loop_vars.append(op[0])
+self._loops[node_name_prefix].loop_vars.append(op)
 else:
 if node_name_prefix not in self._branches:
 self._branches[node_name_prefix] = Branch()
-self._branches[node_name_prefix].cond = cond[0]
+self._branches[node_name_prefix].cond = cond
 elif node.op == "NextIteration":
 if node_name_prefix not in self._loop_body_order:
 self._loop_body_order[node_name_prefix] = []
@@ -3146,9 +3142,7 @@ class GraphProto(object):
 self._loop_body_order[node_name_prefix].\
 append(int(node.name.split("NextIteration_")[-1]))
 op = self._backtrack_construct(node.input[0])
-
-assert len(op) == 1
-self._loops[node_name_prefix].body.append(op[0])
+self._loops[node_name_prefix].body.append(op)
 else:
 raise Exception("Cannot identify control flow operator: " +
 "{}".format(node.op))
@@ -3219,10 +3213,10 @@ class GraphProto(object):
 op : relay.Expr
 Converted relay expression
 """
-node_name = node_name.split(':')[0].split("^")[-1]
+input_op_name = node_name.split(':')[0].split("^")[-1]
 
-if node_name not in self._nodes:
-node = 

[incubator-tvm] branch master updated (9334736 -> 37b84cc)

2020-05-26 Thread masahi
This is an automated email from the ASF dual-hosted git repository.

masahi pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git.


from 9334736  [AutoTVM][TOPI] AutoTVM incorrect measurement (#5511)
 add 37b84cc  [POC][PatternLang]Remove constants from partitioned functions 
(#5663)

No new revisions were added by this update.

Summary of changes:
 src/relay/ir/dataflow_matcher.cc|  6 +++---
 tests/python/relay/test_dataflow_pattern.py | 25 +++--
 2 files changed, 18 insertions(+), 13 deletions(-)



[incubator-tvm] branch master updated (03d21ff -> 9334736)

2020-05-26 Thread kevinthesun
This is an automated email from the ASF dual-hosted git repository.

kevinthesun pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git.


from 03d21ff  enable amd_apu device on vulkan target (#5659)
 add 9334736  [AutoTVM][TOPI] AutoTVM incorrect measurement (#5511)

No new revisions were added by this update.

Summary of changes:
 topi/python/topi/mali/conv2d.py | 15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)



[incubator-tvm] branch master updated (b6bd367 -> 03d21ff)

2020-05-26 Thread moreau
This is an automated email from the ASF dual-hosted git repository.

moreau pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git.


from b6bd367  [C++ RPC] Fix C++ RPC build problem on Linux (#5671)
 add 03d21ff  enable amd_apu device on vulkan target (#5659)

No new revisions were added by this update.

Summary of changes:
 apps/benchmark/gpu_imagenet_bench.py  | 10 +++---
 python/tvm/autotvm/measure/measure_methods.py |  2 +-
 python/tvm/autotvm/tophub.py  |  2 ++
 src/runtime/vulkan/vulkan.cc  | 14 --
 4 files changed, 22 insertions(+), 6 deletions(-)



[incubator-tvm] branch master updated (101dfb5 -> b6bd367)

2020-05-26 Thread tqchen
This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git.


from 101dfb5  [Doc] Misc doc fix (#5672)
 add b6bd367  [C++ RPC] Fix C++ RPC build problem on Linux (#5671)

No new revisions were added by this update.

Summary of changes:
 apps/cpp_rpc/Makefile   | 2 +-
 apps/cpp_rpc/rpc_env.cc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



[incubator-tvm] branch master updated: [Doc] Misc doc fix (#5672)

2020-05-26 Thread anijain2305
This is an automated email from the ASF dual-hosted git repository.

anijain2305 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/master by this push:
 new 101dfb5  [Doc] Misc doc fix (#5672)
101dfb5 is described below

commit 101dfb5a5ad2578cd786fc9c9e93e181bfe0f868
Author: Zhao Wu 
AuthorDate: Tue May 26 23:15:44 2020 +0800

[Doc] Misc doc fix (#5672)
---
 docs/dev/convert_layout.rst  | 2 +-
 tutorials/frontend/deploy_prequantized_tflite.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/dev/convert_layout.rst b/docs/dev/convert_layout.rst
index ee5350c..07ebc20 100644
--- a/docs/dev/convert_layout.rst
+++ b/docs/dev/convert_layout.rst
@@ -246,7 +246,7 @@ In order to specify the layouts to convert to, we create a 
mapping of heavily-la
 # RemoveUnunsedFunctions is used to clean up the graph.
 seq = tvm.transform.Sequential([relay.transform.RemoveUnusedFunctions(),
 
relay.transform.ConvertLayout(desired_layouts)])
-with relay.transform.PassContext(opt_level=3):
+with tvm.transform.PassContext(opt_level=3):
 mod = seq(mod)
 
 # Call relay compilation
diff --git a/tutorials/frontend/deploy_prequantized_tflite.py 
b/tutorials/frontend/deploy_prequantized_tflite.py
index 3cdd423..5fd6837 100644
--- a/tutorials/frontend/deploy_prequantized_tflite.py
+++ b/tutorials/frontend/deploy_prequantized_tflite.py
@@ -18,6 +18,7 @@
 Deploy a Framework-prequantized Model with TVM - Part 3 (TFLite)
 
 **Author**: `Siju Samuel `_
+
 Welcome to part 3 of the Deploy Framework-Prequantized Model with TVM tutorial.
 In this part, we will start with a Quantized TFLite graph and then compile and 
execute it via TVM.