[GitHub] [incubator-tvm] junrushao1994 commented on issue #4346: [Runtime] Make ADTObject POD container type

2019-11-17 Thread GitBox
junrushao1994 commented on issue #4346: [Runtime] Make ADTObject POD container 
type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554892941
 
 
   Will do tomorrow :-)


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] anijain2305 commented on a change in pull request #4357: [Relay tests][WIP] AlterOpLayout - Temporary attr update

2019-11-17 Thread GitBox
anijain2305 commented on a change in pull request #4357: [Relay tests][WIP] 
AlterOpLayout - Temporary attr update
URL: https://github.com/apache/incubator-tvm/pull/4357#discussion_r347222328
 
 

 ##
 File path: src/relay/ir/op.cc
 ##
 @@ -95,6 +95,17 @@ const bool Op::HasGenericAttr(const std::string& key) {
   return true;
 }
 
+// Resets attr of the OpMap.
+void OpRegistry::reset_attr(const std::string& key) {
+  OpManager* mgr = OpManager::Global();
+  std::lock_guard lock(mgr->mutex);
+  std::unique_ptr& op_map = mgr->attr[key];
+  if (op_map == nullptr) {
+return;
+  }
+  op_map->data_.clear();
 
 Review comment:
   I see. I will take a look. I have misunderstood the registry codebase then.


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] anijain2305 commented on a change in pull request #4357: [Relay tests][WIP] AlterOpLayout - Temporary attr update

2019-11-17 Thread GitBox
anijain2305 commented on a change in pull request #4357: [Relay tests][WIP] 
AlterOpLayout - Temporary attr update
URL: https://github.com/apache/incubator-tvm/pull/4357#discussion_r347221576
 
 

 ##
 File path: tests/python/relay/test_pass_alter_op_layout.py
 ##
 @@ -31,6 +31,17 @@ def run_opt_pass(expr, passes):
 entry = mod["main"]
 return entry if isinstance(expr, relay.Function) else entry.body
 
+def reset_retrieve_alter_op_layout(op_name, alter_layout):
 
 Review comment:
   Now I understood what you meant. Thanks for your patience (and teaching new 
practices) :)


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] wweic commented on issue #4346: [Runtime] Make ADTObject POD container type

2019-11-17 Thread GitBox
wweic commented on issue #4346: [Runtime] Make ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554878091
 
 
   Comments addressed. Please take another look.  @tqchen @zhiics @icemelon9 
@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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] srkreddy1238 commented on issue #4265: [FRONTEND][TF][Bug] output type assignment not work for tf.range()

2019-11-17 Thread GitBox
srkreddy1238 commented on issue #4265: [FRONTEND][TF][Bug] output type 
assignment not work for tf.range() 
URL: https://github.com/apache/incubator-tvm/issues/4265#issuecomment-554842221
 
 
   @FinnWeng  ref. #4294  please confirm if this is solved.


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] srkreddy1238 commented on issue #3200: [WIP][ANDROID][APPS] Real-Time Android Camera Demo Sample App

2019-11-17 Thread GitBox
srkreddy1238 commented on issue #3200: [WIP][ANDROID][APPS] Real-Time Android 
Camera Demo Sample App
URL: https://github.com/apache/incubator-tvm/pull/3200#issuecomment-554841525
 
 
   @eqy across the project ```ml.dmlc.tvm``` =>  ```org.apache.tvm``` to be 
handled.


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


With regards,
Apache Git Services


[incubator-tvm] branch master updated (2baf310 -> a226973)

2019-11-17 Thread srk
This is an automated email from the ASF dual-hosted git repository.

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


from 2baf310  [Relay][Frontend][Tensorflow]Add conv2d_transpose (#4300)
 add a226973  [Frontend]Add TensorFlow FloorMod (#4308)

No new revisions were added by this update.

Summary of changes:
 docs/api/python/topi.rst |  2 ++
 docs/frontend/tensorflow.rst |  1 +
 docs/langref/relay_op.rst|  2 ++
 python/tvm/relay/frontend/tensorflow.py  | 10 +--
 python/tvm/relay/op/_tensor.py   |  4 +++
 python/tvm/relay/op/tensor.py| 36 ++
 src/relay/op/tensor/binary.cc| 12 
 tests/python/frontend/tensorflow/test_forward.py | 26 ++--
 tests/python/relay/test_op_level1.py |  4 ++-
 topi/include/topi/broadcast.h| 38 
 topi/python/topi/broadcast.py| 38 
 topi/src/topi.cc |  2 ++
 topi/tests/python/test_topi_broadcast.py | 14 +
 13 files changed, 183 insertions(+), 6 deletions(-)



[GitHub] [incubator-tvm] srkreddy1238 merged pull request #4308: [Frontend]Add TensorFlow FloorMod

2019-11-17 Thread GitBox
srkreddy1238 merged pull request #4308: [Frontend]Add TensorFlow FloorMod
URL: https://github.com/apache/incubator-tvm/pull/4308
 
 
   


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] tqchen opened a new pull request #4359: [SOURCE] Add ASF header to __init__.py files

2019-11-17 Thread GitBox
tqchen opened a new pull request #4359: [SOURCE] Add ASF header to __init__.py 
files
URL: https://github.com/apache/incubator-tvm/pull/4359
 
 
   cc @yzhliu 


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] zhiics commented on a change in pull request #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-17 Thread GitBox
zhiics commented on a change in pull request #4280: [TVM][RUNTIME] A minimum 
example to generate external library wrappers for DSOModule
URL: https://github.com/apache/incubator-tvm/pull/4280#discussion_r347187399
 
 

 ##
 File path: include/tvm/runtime/module.h
 ##
 @@ -111,7 +111,7 @@ class Module : public ObjectRef {
  *
  * \endcode
  */
-class ModuleNode : public Object {
+class TVM_DLL ModuleNode : public Object {
 
 Review comment:
   @tqchen We added `TVM_DLL` so that the ExampleJsonModule can inherit it in 
the test. It looks that this is also used by other classes like `DeviceAPI` 
etc. Does this sound good? otherwise, please advice.


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] zhiics commented on a change in pull request #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-17 Thread GitBox
zhiics commented on a change in pull request #4280: [TVM][RUNTIME] A minimum 
example to generate external library wrappers for DSOModule
URL: https://github.com/apache/incubator-tvm/pull/4280#discussion_r347187399
 
 

 ##
 File path: include/tvm/runtime/module.h
 ##
 @@ -111,7 +111,7 @@ class Module : public ObjectRef {
  *
  * \endcode
  */
-class ModuleNode : public Object {
+class TVM_DLL ModuleNode : public Object {
 
 Review comment:
   @tqchen We added `TVM_DLL` so that the ExampleJsonModule can inherit it in 
the test. It looks that this is also used by other classes like `DeviceAPI` 
etc. Is this the correct change? otherwise, please advice.


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] yzhliu merged pull request #4300: [Relay][Frontend][Tensorflow]Add conv2d_transpose

2019-11-17 Thread GitBox
yzhliu merged pull request #4300: [Relay][Frontend][Tensorflow]Add 
conv2d_transpose
URL: https://github.com/apache/incubator-tvm/pull/4300
 
 
   


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


With regards,
Apache Git Services


[incubator-tvm] branch master updated (9955602 -> 2baf310)

2019-11-17 Thread liuyizhi
This is an automated email from the ASF dual-hosted git repository.

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


from 9955602  Send list as argument to schedule_conv2d (#4358)
 add 2baf310  [Relay][Frontend][Tensorflow]Add conv2d_transpose (#4300)

No new revisions were added by this update.

Summary of changes:
 python/tvm/relay/frontend/tensorflow.py  | 60 
 tests/python/frontend/tensorflow/test_forward.py | 30 +++-
 2 files changed, 70 insertions(+), 20 deletions(-)



[GitHub] [incubator-tvm] yzhliu commented on issue #4300: [Relay][Frontend][Tensorflow]Add conv2d_transpose

2019-11-17 Thread GitBox
yzhliu commented on issue #4300: [Relay][Frontend][Tensorflow]Add 
conv2d_transpose
URL: https://github.com/apache/incubator-tvm/pull/4300#issuecomment-554813082
 
 
   Thanks @optima2005 @yongwww 


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] tqchen commented on issue #4358: Send list as argument to schedule_conv2d

2019-11-17 Thread GitBox
tqchen commented on issue #4358: Send list as argument to schedule_conv2d
URL: https://github.com/apache/incubator-tvm/pull/4358#issuecomment-554807154
 
 
   Thanks @vmiheer !


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] vmiheer commented on issue #4358: Send list as argument to schedule_conv2d

2019-11-17 Thread GitBox
vmiheer commented on issue #4358: Send list as argument to schedule_conv2d
URL: https://github.com/apache/incubator-tvm/pull/4358#issuecomment-554791809
 
 
   cc: @tqchen will you please 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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] vmiheer opened a new pull request #4358: Send list as argument to schedule_conv2d

2019-11-17 Thread GitBox
vmiheer opened a new pull request #4358: Send list as argument to 
schedule_conv2d
URL: https://github.com/apache/incubator-tvm/pull/4358
 
 
   


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] abergeron commented on a change in pull request #4303: [TOPI][Relay][OP] Add a strided_set operation.

2019-11-17 Thread GitBox
abergeron commented on a change in pull request #4303: [TOPI][Relay][OP] Add a 
strided_set operation.
URL: https://github.com/apache/incubator-tvm/pull/4303#discussion_r347155491
 
 

 ##
 File path: topi/python/topi/transform.py
 ##
 @@ -155,6 +157,78 @@ def strided_slice(a, begin, end, strides=None):
 strides = []
 return cpp.strided_slice(a, begin, end, strides)
 
+@tvm.tag_scope(tag=tag.INJECTIVE+",strided_set")
+def strided_set(a, v, begin, end, strides=None):
+"""Set slice of an array.
+
+Parameters
+--
+a : tvm.Tensor
+The tensor to be sliced.
+
+v : tvm.Tensor
+The values to set
+
+begin: list of Expr
+The indices to begin with in the slicing.
+
+end: list of Expr
+Indicies indicating end of the slice.
+
+strides: list of Expr, optional
+Specifies the stride values, it can be negative
+in that case, the input tensor will be reversed
+in that particular axis.
+
+Returns
+---
+ret : tvm.Tensor
+"""
+n = len(a.shape)
+if strides is None:
+strides = [1] * n
+
+if len(begin) != n:
+raise ValueError("size mismatch")
+if len(end) != n:
+raise ValueError("size mismatch")
+if len(strides) != n:
+raise ValueError("size mismatch")
+
+begin = list(map(tvm.convert, begin))
+end = list(map(tvm.convert, end))
+strides = list(map(tvm.convert, strides))
+
+def _max(a, b):
+return tvm.expr.Select(a > b, a, b)
+
+# Convert negative indexes
+for i in range(n):
+begin[i] = tvm.if_then_else(begin[i] < 0,
+begin[i] + a.shape[i],
 
 Review comment:
   Even if the logical result is very similar to strided_slice the 
implementation has a different.
   
   In this operation: `a[begin:end:stride] = b`
   
   The core kernel loops over all valid indexes for `a` and check if that index 
is part of the values selected by the combination of `begin`, `end` and 
`stride`.  If it is, it will compute the corresponding index in `b` and map the 
output to that value.  Otherwise it will pick up the value from `a` at that 
index.
   
   In all cases it doesn't matter if `begin`, `end`, or `stride` doesn't fall 
within the bounds of `a` because they are never used to directly or indirectly 
index into `a`.


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] tqchen commented on a change in pull request #4357: [Relay tests] AlterOpLayout - Temporary attr update

2019-11-17 Thread GitBox
tqchen commented on a change in pull request #4357: [Relay tests] AlterOpLayout 
- Temporary attr update
URL: https://github.com/apache/incubator-tvm/pull/4357#discussion_r347151776
 
 

 ##
 File path: src/relay/ir/op.cc
 ##
 @@ -95,6 +95,17 @@ const bool Op::HasGenericAttr(const std::string& key) {
   return true;
 }
 
+// Resets attr of the OpMap.
+void OpRegistry::reset_attr(const std::string& key) {
+  OpManager* mgr = OpManager::Global();
+  std::lock_guard lock(mgr->mutex);
+  std::unique_ptr& op_map = mgr->attr[key];
+  if (op_map == nullptr) {
+return;
+  }
+  op_map->data_.clear();
 
 Review comment:
   per https://docs.tvm.ai/contribute/code_review.html#ensure-test-coverage
   
   Need testcase for reset_attr.
   The current implementation resets the attr of other ops along the current 
one, which is not correct. 
   


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] tqchen commented on a change in pull request #4357: [Relay tests] AlterOpLayout - Temporary attr update

2019-11-17 Thread GitBox
tqchen commented on a change in pull request #4357: [Relay tests] AlterOpLayout 
- Temporary attr update
URL: https://github.com/apache/incubator-tvm/pull/4357#discussion_r347151865
 
 

 ##
 File path: tests/python/relay/test_pass_alter_op_layout.py
 ##
 @@ -31,6 +31,17 @@ def run_opt_pass(expr, passes):
 entry = mod["main"]
 return entry if isinstance(expr, relay.Function) else entry.body
 
+def reset_retrieve_alter_op_layout(op_name, alter_layout):
 
 Review comment:
   Consider use RAII Pattern, this will allow the code to exit correctly even 
if the testcase raises an exception in the middle of the body
   
   ```
   with TempOpAttr(name, attr):
body
   ```


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] FrozenGene edited a comment on issue #4344: [ThreadPool] Solve thread transitions issue

2019-11-17 Thread GitBox
FrozenGene edited a comment on issue #4344: [ThreadPool] Solve thread 
transitions issue
URL: https://github.com/apache/incubator-tvm/pull/4344#issuecomment-554735796
 
 
   sorry for the late reply because of other things. have changed the comments.


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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] anijain2305 opened a new pull request #4357: [Relay tests] AlterOpLayout - Temporary attr update

2019-11-17 Thread GitBox
anijain2305 opened a new pull request #4357: [Relay tests] AlterOpLayout - 
Temporary attr update
URL: https://github.com/apache/incubator-tvm/pull/4357
 
 
   @tqchen Can you please take a look?
   
   


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


With regards,
Apache Git Services