[incubator-tvm] branch ci-docker-staging updated: Disable Rust change for now

2020-10-14 Thread jroesch
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/ci-docker-staging by this push:
 new d4e3f4d  Disable Rust change for now
d4e3f4d is described below

commit d4e3f4d043aa35dcca355ce171a29c1c33e76d08
Author: Jared Roesch 
AuthorDate: Wed Oct 14 22:22:34 2020 -0700

Disable Rust change for now
---
 tests/scripts/task_rust.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/scripts/task_rust.sh b/tests/scripts/task_rust.sh
index d60999c..25e70ee 100755
--- a/tests/scripts/task_rust.sh
+++ b/tests/scripts/task_rust.sh
@@ -111,5 +111,5 @@ cargo run --bin string
 cd -
 
 cd examples/resnet
-cargo run
+# cargo run
 cd -



[incubator-tvm] branch main updated (8439f3e -> 9564925)

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

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


from 8439f3e  [REFACTOR] util => utils for consistency in the project. 
(#6684)
 add 9564925  [Relay][Frontend][Onnx] Allow A to B broadcasting of 
batch_matmul and reverse strided slice (#6681)

No new revisions were added by this update.

Summary of changes:
 python/tvm/relay/frontend/onnx.py  | 33 --
 python/tvm/relay/op/_transform.py  |  2 ++
 python/tvm/relay/op/dyn/_transform.py  |  2 ++
 python/tvm/relay/op/nn/_nn.py  |  5 -
 src/relay/op/dyn/nn/pad.cc |  6 --
 src/relay/op/nn/nn.cc  |  6 +-
 tests/python/frontend/onnx/test_forward.py | 18 +---
 tests/python/relay/test_op_level4.py   |  3 +++
 8 files changed, 54 insertions(+), 21 deletions(-)



[GitHub] [incubator-tvm] masahi merged pull request #6681: [Relay][Frontend][Onnx] Allow A to B broadcasting of batch_matmul and reverse strided slice

2020-10-14 Thread GitBox


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


   



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 #6681: [Relay][Frontend][Onnx] Allow A to B broadcasting of batch_matmul and reverse strided slice

2020-10-14 Thread GitBox


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


   Thanks @jwfromm @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] merrymercy edited a comment on pull request #6671: [FIX,AUTOSCHEDULER] Fix auto_scheduler to run with multiprocessing's spawn start method

2020-10-14 Thread GitBox


merrymercy edited a comment on pull request #6671:
URL: https://github.com/apache/incubator-tvm/pull/6671#issuecomment-708845921


   Autotvm uses a lot of python multiprocessing and I expect it will be much 
slower when using spawn.  AutoTVM uses multiprocessing for feature extraction. 
So it needs to launch about 50,000 tasks every measurement batch.
   
   The situation for Ansor is better as Ansor does not rely on multiprocessing 
as heavily as AutoTVM does.
   However, I'd like to see benchmark numbers about fork vs. spawn.
   i.e. Run a search with `n_trials=64` with (Ansor, AutoTVM) x (fork, spawn).
   The requirement from my side is that I don't want to see any performance 
regression.
   I prefer to only use the slower and safer fallback mechanism when the fast 
approach does not work.
   
   On the other size, removing all multiprocessing requires some engineering 
effort. But this is not on my agenda for now.



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] merrymercy edited a comment on pull request #6671: [FIX,AUTOSCHEDULER] Fix auto_scheduler to run with multiprocessing's spawn start method

2020-10-14 Thread GitBox


merrymercy edited a comment on pull request #6671:
URL: https://github.com/apache/incubator-tvm/pull/6671#issuecomment-708845921


   Autotvm uses a lot of python multiprocessing and I expect it will be much 
slower when using spawn.  AutoTVM uses multiprocessing for feature extraction. 
So it needs to launch about 50,000 tasks every measurement batch.
   
   The situation for Ansor is better as Ansor does not rely on multiprocessing 
as heavily as AutoTVM does.
   However, I'd like to see benchmark numbers about fork vs. spawn.
   i.e. Run a search with `n_trials=64` with (Ansor, AutoTVM) x (fork, spawn).
   The requirement from my side is that I don't want to see any performance 
regression.
   I prefer to only use the slower and safer fallback mechanism when the fast 
approach does not work.
   
   Removing all multiprocessing requires huge engineering effort.



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] merrymercy edited a comment on pull request #6671: [FIX,AUTOSCHEDULER] Fix auto_scheduler to run with multiprocessing's spawn start method

2020-10-14 Thread GitBox


merrymercy edited a comment on pull request #6671:
URL: https://github.com/apache/incubator-tvm/pull/6671#issuecomment-708845921


   Autotvm uses a lot of python multiprocessing and I expect it will be much 
slower when using spawn.  AutoTVM uses multiprocessing for feature extraction. 
So it needs to launch about 50,000 tasks every measurement batch.
   
   The situation for Ansor is better as Ansor does not rely on multiprocessing 
as heavily as AutoTVM does.
   However, I'd like to see benchmark numbers about fork vs. spawn.
   i.e. Run a search with `n_trials=64` with (Ansor, AutoTVM) x (fork, spawn) X 
(CPU, GPU) (Optional).
   The requirement from my side is that I don't want to see any performance 
regression.
   I prefer to only use the slower and safer fallback mechanism when the fast 
approach does not work.
   
   Removing all multiprocessing requires huge engineering effort.



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] merrymercy edited a comment on pull request #6671: [FIX,AUTOSCHEDULER] Fix auto_scheduler to run with multiprocessing's spawn start method

2020-10-14 Thread GitBox


merrymercy edited a comment on pull request #6671:
URL: https://github.com/apache/incubator-tvm/pull/6671#issuecomment-708845921


   Autotvm uses a lot of python multiprocessing and I expect it will be much 
slower when using spawn.  AutoTVM uses multiprocessing for feature extraction. 
So it needs to launch about 50,000 tasks every measurement batch.
   
   The situation for Ansor is better as Ansor does not rely on multiprocessing 
as heavily as AutoTVM does.
   However, I'd like to see benchmark numbers about fork vs. spawn.
   i.e. Run a search with `n-trials=64` with (Ansor, AutoTVM) x (fork, spawn) X 
(CPU, GPU) (Optional).
   The requirement from my side is that I don't want to see any performance 
regression.
   I prefer to only use the slower and safer fallback mechanism when the fast 
approach does not work.
   
   Removing all multiprocessing requires huge engineering effort.



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] merrymercy edited a comment on pull request #6671: [FIX,AUTOSCHEDULER] Fix auto_scheduler to run with multiprocessing's spawn start method

2020-10-14 Thread GitBox


merrymercy edited a comment on pull request #6671:
URL: https://github.com/apache/incubator-tvm/pull/6671#issuecomment-708845921


   Autotvm uses a lot of python multiprocessing and I expect it will be much 
slower when using spawn.  AutoTVM uses multiprocessing for feature extraction. 
So it needs to launch about 50,000 tasks every measurement batch.
   
   Ansor does not rely on multiprocessing too much. So the situation for Ansor 
is better.
   However, I'd like to see benchmark numbers about fork vs. spawn.
   i.e. Run a search with `n-trials=64` with (Ansor, AutoTVM) x (fork, spawn) X 
(CPU, GPU) (Optional).
   The requirement from my side is that I don't want to see any performance 
regression.
   I prefer to only use the slower and safer fallback mechanism when the fast 
approach does not work.
   
   Removing all multiprocessing requires huge engineering effort.



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] merrymercy edited a comment on pull request #6671: [FIX,AUTOSCHEDULER] Fix auto_scheduler to run with multiprocessing's spawn start method

2020-10-14 Thread GitBox


merrymercy edited a comment on pull request #6671:
URL: https://github.com/apache/incubator-tvm/pull/6671#issuecomment-708845921


   Autotvm uses a lot of python multiprocessing and I expect it will be much 
slower when using spawn.  AutoTVM uses multiprocessing for feature extraction. 
So it needs to launch about 50,000 tasks every measurement batch.
   
   Ansor does not rely on multiprocessing too much. So the situation for Ansor 
is better.
   However, I'd like to see benchmark numbers about fork vs. spawn.
   i.e. Run a search with `n-trials=64` with (Ansor, AutoTVM) x (fork, spawn) X 
(CPU, GPU) (Optional)



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] merrymercy commented on pull request #6671: [FIX,AUTOSCHEDULER] Fix auto_scheduler to run with multiprocessing's spawn start method

2020-10-14 Thread GitBox


merrymercy commented on pull request #6671:
URL: https://github.com/apache/incubator-tvm/pull/6671#issuecomment-708845921


   Autotvm uses a lot of python multiprocessing and I expect it will be much 
slower when using spawn.  AutoTVM uses multiprocessing for feature extraction. 
So it needs to launch about 50,000 processes every measurement batch.
   
   Ansor does not rely on multiprocessing too much. So the situation for Ansor 
is better.
   However, I'd like to see benchmark numbers about fork vs. spawn.
   i.e. Run a search with `n-trials=64` with (Ansor, AutoTVM) x (fork, spawn) X 
(CPU, GPU) (Optional)



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 main updated (60ed926 -> 8439f3e)

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

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


from 60ed926  [ARITH] Introduce iterator (quasi)affine map detection. 
(#6667)
 add 8439f3e  [REFACTOR] util => utils for consistency in the project. 
(#6684)

No new revisions were added by this update.

Summary of changes:
 CMakeLists.txt | 14 ++--
 apps/android_camera/app/src/main/jni/tvm_runtime.h |  2 +-
 apps/android_deploy/app/src/main/jni/tvm_runtime.h |  2 +-
 apps/android_rpc/app/src/main/jni/tvm_runtime.h|  2 +-
 apps/bundle_deploy/runtime.cc  |  2 +-
 apps/cpp_rpc/main.cc   |  2 +-
 apps/cpp_rpc/rpc_env.cc|  4 ++--
 apps/howto_deploy/tvm_runtime_pack.cc  |  2 +-
 apps/ios_rpc/tvmrpc/TVMRuntime.mm  |  2 +-
 cmake/{util => utils}/FindCUDA.cmake   |  0
 cmake/{util => utils}/FindEthosN.cmake |  0
 cmake/{util => utils}/FindLLVM.cmake   |  0
 cmake/{util => utils}/FindOpenCL.cmake |  0
 cmake/{util => utils}/FindROCM.cmake   |  0
 cmake/{util => utils}/FindVulkan.cmake |  0
 cmake/{util/Util.cmake => utils/Utils.cmake}   |  0
 docs/dev/relay_add_op.rst  |  2 +-
 golang/src/tvm_runtime_pack.cc |  2 +-
 include/tvm/topi/{util.h => utils.h}   |  8 +++
 python/tvm/te/hybrid/__init__.py   |  4 ++--
 python/tvm/te/hybrid/calls.py  |  2 +-
 python/tvm/te/hybrid/module.py |  4 ++--
 python/tvm/te/hybrid/parser.py | 26 +++---
 python/tvm/te/hybrid/preprocessor.py   |  2 +-
 python/tvm/te/hybrid/{util.py => utils.py} |  0
 src/arith/int_constraints.cc   |  2 +-
 src/arith/iter_affine_map.cc   |  2 +-
 src/node/structural_hash.cc|  2 +-
 src/relay/analysis/feature.cc  |  2 +-
 src/relay/analysis/mac_count.cc|  2 +-
 src/relay/analysis/util.cc |  2 +-
 src/relay/backend/compile_engine.cc|  2 +-
 src/relay/backend/vm/compiler.cc   |  2 +-
 src/relay/backend/vm/compiler.h|  2 +-
 src/relay/op/annotation/annotation.cc  |  2 +-
 src/relay/op/device_copy.cc|  2 +-
 src/relay/op/dyn/tensor/transform.cc   |  2 +-
 src/relay/op/memory/memory.cc  |  2 +-
 src/relay/op/nn/bitserial.cc   |  2 +-
 src/relay/op/nn/convolution.cc |  2 +-
 src/relay/op/nn/nn.cc  |  2 +-
 src/relay/op/nn/pooling.cc |  2 +-
 src/relay/op/nn/sparse.cc  |  2 +-
 src/relay/op/op_common.h   |  2 +-
 src/relay/op/tensor/transform.cc   |  6 ++---
 src/relay/op/vision/rcnn_op.cc |  2 +-
 src/relay/op/vm/vm.cc  |  2 +-
 src/relay/qnn/op/concatenate.cc|  6 ++---
 src/relay/qnn/op/convolution.cc|  4 ++--
 src/relay/qnn/op/dense.cc  |  4 ++--
 src/relay/qnn/op/dequantize.cc |  4 ++--
 src/relay/qnn/op/mul.cc|  4 ++--
 src/relay/qnn/op/op_common.h   |  4 ++--
 src/relay/qnn/op/quantize.cc   |  4 ++--
 src/relay/qnn/op/requantize.cc |  6 ++---
 src/relay/qnn/{util.cc => utils.cc}|  6 ++---
 src/relay/qnn/{util.h => utils.h}  |  8 +++
 src/relay/quantize/partition.cc|  2 +-
 src/relay/quantize/quantize.h  |  2 +-
 src/relay/quantize/realize.cc  |  4 ++--
 src/relay/transforms/alter_op_layout.cc|  2 +-
 src/relay/transforms/annotate_target.cc|  2 +-
 src/relay/transforms/canonicalize_cast.cc  |  4 ++--
 src/relay/transforms/canonicalize_ops.cc   |  2 +-
 .../transforms/combine_parallel_batch_matmul.cc|  2 +-
 src/relay/transforms/combine_parallel_conv2d.cc|  2 +-
 src/relay/transforms/combine_parallel_dense.cc |  2 +-
 src/relay/transforms/combine_parallel_op.cc|  2 +-
 src/relay/transforms/combine_parallel_op.h |  2 +-
 src/relay/transforms/combine_parallel_op_batch.cc  |  2 +-
 src/relay/transforms/combine_parallel_op_batch.h   |  2 +-
 src/relay/transforms/convert_layout.cc |  2 +-
 src/relay/transforms/defunctionalization.cc|  2 +-
 src/relay/transforms/dynamic_to_static.cc  |  2 +-
 src/relay/transforms/eliminate_common_subexpr.cc   |  2 +-
 src/relay/transforms/fast_math.cc

[GitHub] [incubator-tvm] mbrookhart commented on a change in pull request #6681: [Relay][Frontend][Onnx] Allow A to B broadcasting of batch_matmul and reverse strided slice

2020-10-14 Thread GitBox


mbrookhart commented on a change in pull request #6681:
URL: https://github.com/apache/incubator-tvm/pull/6681#discussion_r505048637



##
File path: python/tvm/relay/frontend/onnx.py
##
@@ -532,10 +534,18 @@ def flatten_to_3d(x, x_shape):
 b = _op.transpose(b, [0, 2, 1])
 # Perform a batch matmul.
 output = _op.nn.batch_matmul(a, b)
+# Determine the output batch dimension.
+if a_rank >= b_rank:
+out_batch = _op.strided_slice(a_shape, [0], 
[infer_shape(a_shape)[0] - 2])
+else:
+out_batch = _op.strided_slice(b_shape, [0], 
[infer_shape(b_shape)[0] - 2])

Review comment:
   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] tqchen merged pull request #6684: [REFACTOR] util => utils for consistency in the project.

2020-10-14 Thread GitBox


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


   



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] jwfromm commented on a change in pull request #6681: [Relay][Frontend][Onnx] Allow A to B broadcasting of batch_matmul and reverse strided slice

2020-10-14 Thread GitBox


jwfromm commented on a change in pull request #6681:
URL: https://github.com/apache/incubator-tvm/pull/6681#discussion_r505043967



##
File path: python/tvm/relay/frontend/onnx.py
##
@@ -532,10 +534,18 @@ def flatten_to_3d(x, x_shape):
 b = _op.transpose(b, [0, 2, 1])
 # Perform a batch matmul.
 output = _op.nn.batch_matmul(a, b)
+# Determine the output batch dimension.
+if a_rank >= b_rank:
+out_batch = _op.strided_slice(a_shape, [0], 
[infer_shape(a_shape)[0] - 2])
+else:
+out_batch = _op.strided_slice(b_shape, [0], 
[infer_shape(b_shape)[0] - 2])

Review comment:
   Can you check out the changes in the most recent commit? It addresses 
the corner case but does insert some extra operations. Do you think its worth 
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] mbrookhart commented on a change in pull request #6681: [Relay][Frontend][Onnx] Allow A to B broadcasting of batch_matmul and reverse strided slice

2020-10-14 Thread GitBox


mbrookhart commented on a change in pull request #6681:
URL: https://github.com/apache/incubator-tvm/pull/6681#discussion_r505024398



##
File path: python/tvm/relay/frontend/onnx.py
##
@@ -532,10 +534,18 @@ def flatten_to_3d(x, x_shape):
 b = _op.transpose(b, [0, 2, 1])
 # Perform a batch matmul.
 output = _op.nn.batch_matmul(a, b)
+# Determine the output batch dimension.
+if a_rank >= b_rank:
+out_batch = _op.strided_slice(a_shape, [0], 
[infer_shape(a_shape)[0] - 2])
+else:
+out_batch = _op.strided_slice(b_shape, [0], 
[infer_shape(b_shape)[0] - 2])

Review comment:
   I think the only place this might fail is if the input shapes are both 
3D, but the a shape starts with a 1, i.e a.shape = (1, 6, 6) and b.shape = (3, 
6, 6) and the output shape actually needs to be (3, 6, 6).
   
   I'm not sure how to handle that case correctly, though.





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 #6687: Mbrookhart/int32 pooling with int64 shapes

2020-10-14 Thread GitBox


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


   We found some quantized models that were performing Int32 average pooling 
with input tensors that had Int64 shapes. This cause an error in te where the 
resulting computations were implicitly up cast from int32 to int64 due to the 
way the topi functions were handling input shapes. 
   
   This PR adds unit tests that hit the error and provides fixes for the 
currently implemented ops.
   
   @tmoreau89 @jwfromm 



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 #6686: [AutoSchedule] Support multiple cache read and fix bugs

2020-10-14 Thread GitBox


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


   This PR improves the cache read sketch generation rule in auto-scheduler to 
support multiple cache reads. Previously, cache read sketch generation rule 
will simply give up if a tensor has multiple consumers. This results in all 
consumers read that tensor directly from the host memory, which hurts the 
performance a lot. This PR resolves this limitation.
   
   In addition, this PR also fixes the following bugs/issues:
   - Consider `max_threads_per_block` in cross thread reduction rule condition, 
so that we can guarantee computation intensive ops won't have cross thread 
reduction sketch, which usually doesn't help.
   - Add `.d` suffix to the name of redundant cache read ops to avoid conflict. 
Without this change, auto-scheduler outputs Python schedule APIs won't work for 
multiple cache reads.
   - Add a new constructor of `ComputeDAG` by taking a schedule, so that we can 
enforce stage order consistency.
   
   cc @merrymercy @jcf94 @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] tkonolige commented on pull request #6671: [FIX,AUTOSCHEDULER] Fix auto_scheduler to run with multiprocessing's spawn start method

2020-10-14 Thread GitBox


tkonolige commented on pull request #6671:
URL: https://github.com/apache/incubator-tvm/pull/6671#issuecomment-708649133


   The problem with using fork is that it is unsafe on macOS or when using the 
CUDA api. The pytorch developers recommend not using fork with CUDA: 
https://pytorch.org/docs/master/notes/multiprocessing.html#cuda-in-multiprocessing.
 It looks like we have to choose something that works over something that is 
fast.
   
   I also don't think it really matters that spawning is slower than forking. 
We are not spawning that many processes. And if the overhead from spawning is 
big enough to cause a significant slowdown, then we shouldn't have been using 
processes/threads in the first place.



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 ci-docker-staging updated: Format

2020-10-14 Thread jroesch
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a commit to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/ci-docker-staging by this push:
 new ecf8b65  Format
ecf8b65 is described below

commit ecf8b656abcfb0d73903aee9a0ee3dea039c0ff8
Author: Jared Roesch 
AuthorDate: Wed Oct 14 13:31:27 2020 -0700

Format
---
 tutorials/frontend/build_gcn.py | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tutorials/frontend/build_gcn.py b/tutorials/frontend/build_gcn.py
index a99ed80..b832d18 100644
--- a/tutorials/frontend/build_gcn.py
+++ b/tutorials/frontend/build_gcn.py
@@ -242,7 +242,9 @@ import networkx as nx
 
 def prepare_params(g, data):
 params = {}
-params["infeats"] = data.features.numpy().astype("float32")  # Only 
support float32 as feature for now
+params["infeats"] = data.features.numpy().astype(
+"float32"
+)  # Only support float32 as feature for now
 
 # Generate adjacency matrix
 adjacency = nx.to_scipy_sparse_matrix(g)
@@ -351,5 +353,6 @@ acc = evaluate(data, logits_tvm)
 print("Test accuracy of TVM results: {:.2%}".format(acc))
 
 import tvm.testing
+
 # Verify the results with the DGL model
 tvm.testing.assert_allclose(logits_torch, logits_tvm, atol=1e-3)



[GitHub] [incubator-tvm] areusch commented on pull request #6603: Add µTVM Zephyr support + QEMU regression test

2020-10-14 Thread GitBox


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


   thanks @liangfu, please take another look when you have a minute



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 a change in pull request #6603: Add µTVM Zephyr support + QEMU regression test

2020-10-14 Thread GitBox


areusch commented on a change in pull request #6603:
URL: https://github.com/apache/incubator-tvm/pull/6603#discussion_r504941832



##
File path: tests/micro/qemu/zephyr-runtime/crt/crt_config.h
##
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+/*!
+ * \file tvm/runtime/crt_config.h.template
+ * \brief Template for CRT configuration, to be modified on each target.
+ */
+#ifndef TVM_RUNTIME_CRT_CONFIG_H_
+#define TVM_RUNTIME_CRT_CONFIG_H_
+
+/*! Log level of the CRT runtime */
+#define TVM_CRT_LOG_LEVEL TVM_CRT_LOG_LEVEL_DEBUG
+
+/*! Maximum supported dimension in NDArray */
+#define TVM_CRT_MAX_NDIM 6
+
+/*! Maximum supported arguments in generated functions */
+#define TVM_CRT_MAX_ARGS 10
+
+/*! Size of the global function registry, in bytes. */
+#define TVM_CRT_GLOBAL_FUNC_REGISTRY_SIZE_BYTES 200
+
+/*! Maximum number of registered modules. */
+#define TVM_CRT_MAX_REGISTERED_MODULES 2
+
+/*! Maximum packet size, in bytes, including the length header. */
+#define TVM_CRT_MAX_PACKET_SIZE_BYTES 8192
+
+/*! Maximum supported string length in dltype, e.g. "int8", "int16", "float32" 
*/
+#define TVM_CRT_MAX_STRLEN_DLTYPE 10
+
+/*! Maximum supported string length in function names */
+#define TVM_CRT_MAX_STRLEN_FUNCTION_NAME 80
+
+/*! \brief Maximum length of a PackedFunc function name. */
+#define TVM_CRT_MAX_FUNCTION_NAME_LENGTH_BYTES 30
+
+/*! \brief Log2 of the page size (bytes) for a virtual memory page. */
+#define TVM_CRT_PAGE_BITS 10  // 1 kB
+
+/*! \brief Number of pages on device. */
+#define TVM_CRT_MAX_PAGES 300
+
+//#define TVM_CRT_FRAMER_ENABLE_LOGS

Review comment:
   actually I like to leave this in as it's a convenient debugging option 
that may not be discoverable otherwise

##
File path: tests/micro/qemu/zephyr-runtime/crt/crt_config.h
##
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+/*!
+ * \file tvm/runtime/crt_config.h.template
+ * \brief Template for CRT configuration, to be modified on each target.
+ */
+#ifndef TVM_RUNTIME_CRT_CONFIG_H_
+#define TVM_RUNTIME_CRT_CONFIG_H_
+
+/*! Log level of the CRT runtime */
+#define TVM_CRT_LOG_LEVEL TVM_CRT_LOG_LEVEL_DEBUG

Review comment:
   added #include

##
File path: tests/micro/qemu/zephyr-runtime/CMakeLists.txt
##
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: Apache-2.0
+
+cmake_minimum_required(VERSION 3.13.1)
+
+set(ENV{QEMU_BIN_PATH} "${CMAKE_SOURCE_DIR}/qemu-hack")
+
+set(QEMU_PIPE "\${QEMU_PIPE}")  # QEMU_PIPE is set by the calling TVM instance.
+#get_filename_component(QEMU_PID_ABSPATH "./qemu.pid" ABSOLUTE)
+#set(QEMU_PID_ABSPATH "/tmp/qemu.pid")
+#file(TOUCH "${QEMU_PID_ABSPATH}")
+#list(APPEND QEMU_EXTRA_FLAGS "-pidfile" "${QEMU_PID_ABSPATH}")
+
+find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
+project(hello_world)

Review comment:
   hah, changed :)

##
File path: tests/micro/qemu/zephyr-runtime/CMakeLists.txt
##
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: Apache-2.0
+
+cmake_minimum_required(VERSION 3.13.1)
+
+set(ENV{QEMU_BIN_PATH} "${CMAKE_SOURCE_DIR}/qemu-hack")
+
+set(QEMU_PIPE "\${QEMU_PIPE}")  # QEMU_PIPE is set by the calling TVM instance.
+#get_filename_component(QEMU_PID_ABSPATH "./qemu.pid" ABSOLUTE)

Review comment:
   done

##
File path: python/tvm/micro/contrib/zephyr.py
##
@@ -0,0 +1,621 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or

[GitHub] [incubator-tvm] areusch commented on a change in pull request #6603: Add µTVM Zephyr support + QEMU regression test

2020-10-14 Thread GitBox


areusch commented on a change in pull request #6603:
URL: https://github.com/apache/incubator-tvm/pull/6603#discussion_r504941656



##
File path: src/runtime/crt/utvm_rpc_server/rpc_server.cc
##
@@ -126,25 +125,33 @@ class MicroRPCServer {
 
   /*! \brief Process one message from the receive buffer, if possible.
*
-   * \return true if additional messages could be processed. false if the 
server shutdown request
-   * has been received.
+   * \param new_data If not nullptr, a pointer to a buffer pointer, which 
should point at new input
+   * data to process. On return, updated to point past data that has been 
consumed.
+   * \param new_data_size_bytes Points to the number of valid bytes in 
`new_data`. On return,
+   * updated to the number of unprocessed bytes remaining in `new_data` 
(usually 0).
+   * \return an error code indicating the outcome of the processing loop.
*/
-  bool Loop() {
-if (has_pending_byte_) {
-  size_t bytes_consumed;
-  CHECK_EQ(unframer_.Write(&pending_byte_, 1, &bytes_consumed), 
kTvmErrorNoError,
-   "unframer_.Write");
-  CHECK_EQ(bytes_consumed, 1, "bytes_consumed");
-  has_pending_byte_ = false;
+  tvm_crt_error_t Loop(uint8_t** new_data, size_t* new_data_size_bytes) {
+if (!is_running_) {
+  return kTvmErrorPlatformShutdown;
 }
 
-return is_running_;
-  }
+tvm_crt_error_t err = kTvmErrorNoError;
+//printf("loop %d %02x\n", *new_data_size_bytes,  **new_data);
+if (new_data != nullptr && new_data_size_bytes != nullptr && 
*new_data_size_bytes > 0) {
+  size_t bytes_consumed;
+  err = unframer_.Write(*new_data, *new_data_size_bytes, &bytes_consumed);
+  *new_data += bytes_consumed;
+  *new_data_size_bytes -= bytes_consumed;
+}
 
-  void HandleReceivedByte(uint8_t byte) {
-CHECK(!has_pending_byte_);
-has_pending_byte_ = true;
-pending_byte_ = byte;
+if (err != kTvmErrorNoError) {
+  return err;
+} else if (is_running_) {
+  return kTvmErrorNoError;
+} else {
+  return kTvmErrorPlatformShutdown;

Review comment:
   made this clearer now





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 ci-docker-staging updated (074dbef -> 9ddcff9)

2020-10-14 Thread jroesch
This is an automated email from the ASF dual-hosted git repository.

jroesch pushed a change to branch ci-docker-staging
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git.


 discard 074dbef  Bump Jenkinsfile
 discard 0704756  Setup Rust path
 discard 7858503  Add deps needed for Rust examples and docs
 discard a04e8f6  Turn on Rust docs and MxNet based ResNet
 add 6d0351a  Faster sparse_dense on GPUs (#6580)
 add 5a33774  Revert "[Relay] Keep fixed dim when unifying dynamic shape 
(#5795)" (#6658)
 add f6657a6  [AutoScheduler] Improve the GPU tutorial by deleting 
measure_ctx earlier (#6660)
 add dd60d24  [AutoScheduler] Improve test cases (#6657)
 add bf21371  [Frontend][Tensorflow] Fix TF 1.15 conv2d_transpose parsing 
(#6589)
 add e561007  [BYOC][ACL] Support add operation (#6532)
 add d3ef137  Fix typographical error. (#6664)
 add 74b6922  [Relay][MXNet] Support broadcast_like (#6561)
 add 0cdd285  [CI] Move to use main as the default (#6665)
 add b277f18  [Torch] Object detection support update for PyTorch 1.6 
(#6659)
 add d955718  don't validate AttrInitEntry until a value has attempted to 
be set (#6672)
 add 4073adc  [CI] Set main as default in github actions (#6669)
 add d5728bd  [BYOC] Support control flow in annotate_target (#6641)
 add d24634a  TF argmax - handling int64 datatype (#6674)
 add f196a81  [CODEGEN][COREML] Call InferType explicitly in coreml test 
(#6676)
 add 8d9ca2a  Adjust Vulkan queue selection and creation logic (#6662)
 add d7fa9c1  Install xgboost>=1.1.0 in CI container (#6679)
 add 7d805b5  Fix format error in integrate.rst (#6677)
 add e66b2e8  Revert #5238 (#6680)
 add b06fa68  Turn on Rust docs and MxNet based ResNet
 add 84d9d99  Add deps needed for Rust examples and docs
 add 81e91f9  Setup Rust path
 add 5403ca2  Bump Jenkinsfile
 add 7e264b8  Fix broken version setting, which instead redirects stdout 
and stderr
 add 9ddcff9  Update Jenkinsfile

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (074dbef)
\
 N -- N -- N   refs/heads/ci-docker-staging (9ddcff9)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 .github/workflows/main.yml |   4 +-
 Jenkinsfile|  12 +-
 Makefile   |   2 +-
 NEWS.md|   4 +-
 README.md  |   4 +-
 apps/android_deploy/README.md  |   4 +-
 apps/android_rpc/README.md |   6 +-
 apps/benchmark/README.md   |   2 +-
 apps/ios_rpc/tests/ios_rpc_mobilenet.py|   2 +-
 apps/wasm-standalone/README.md |   4 +-
 docker/install/ubuntu_install_dgl.sh   |   0
 docker/install/ubuntu_install_redis.sh |   2 +-
 docker/install/ubuntu_install_sphinx.sh|   2 +-
 docker/lint.sh |   4 +-
 docs/conf.py   |   2 +-
 docs/contribute/code_guide.rst |   2 +-
 docs/contribute/community.rst  |   2 +-
 docs/contribute/document.rst   |   4 +-
 docs/contribute/git_howto.rst  |  26 +-
 docs/contribute/pull_request.rst   |   8 +-
 docs/contribute/release_process.rst|   8 +-
 docs/deploy/android.rst|   4 +-
 docs/deploy/arm_compute_lib.rst|   4 +
 docs/deploy/cpp_deploy.rst |  10 +-
 docs/deploy/integrate.rst  |   9 +-
 docs/dev/frontend/tensorflow.rst   |   4 +-
 docs/dev/index.rst |   4 +-
 docs/dev/inferbound.rst|  30 +-
 docs/dev/pass_infra.rst|  20 +-
 docs/dev/relay_add_pass.rst|   6 +-
 docs/dev/relay_bring_your_own_codegen.rst  |   2 +-
 docs/dev/relay_intro.rst   |   6 +-
 docs/dev/runtime.rst   |  22 +-
 docs/dev/virtual_machine.rst   |  18 +-
 docs/install/docker.rst|   2 +-
 docs/langref/relay_pattern.rst |  10 +-

[GitHub] [incubator-tvm] ANSHUMAN87 commented on pull request #6685: [Relay][Frontend] SparseTensorDenseMatMul support for Tensorflow

2020-10-14 Thread GitBox


ANSHUMAN87 commented on pull request #6685:
URL: https://github.com/apache/incubator-tvm/pull/6685#issuecomment-708582002


   @FrozenGene , @siju-samuel , @kevinthesun : please help review. Thanks!



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] ANSHUMAN87 opened a new pull request #6685: [Relay][Frontend] SparseTensorDenseMatMul support for Tensorflow

2020-10-14 Thread GitBox


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


   
   SparseTensorDenseMatMul support added for Tensorflow frontend.



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 #6684: [REFACTOR] util => utils for consistency in the project.

2020-10-14 Thread GitBox


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


   https://discuss.tvm.apache.org/t/naming-consistency-util-vs-utils/6434



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 #6682: [DRAFT/WIP] Enabling vulkan in CI

2020-10-14 Thread GitBox


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


   We already have vulkan build as part of the CI process. 
   However, vulkan running itself is not enabled because my previous tests of 
nvidia docker does not seems to support it out of the box (thus the current CI 
error of incomaptible driver). 
   
   We can revisit and see what is the status now, and see if it is possible to 
get a vulkan compatible docker driver. Note that because vulkan is tied to 
display it might be hard



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 main updated: [ARITH] Introduce iterator (quasi)affine map detection. (#6667)

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

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


The following commit(s) were added to refs/heads/main by this push:
 new 60ed926  [ARITH] Introduce iterator (quasi)affine map detection. 
(#6667)
60ed926 is described below

commit 60ed9261058c0f1faa2632cb97319f29b26b9573
Author: Tianqi Chen 
AuthorDate: Wed Oct 14 08:33:15 2020 -0400

[ARITH] Introduce iterator (quasi)affine map detection. (#6667)

* [ARITH] Introduce iterator (quasi)affine map detection.

The loop transformations (split, fuse) create bijective
maps from a collection of source iterators to target iterators.

DetectIterMap is a function that detects such bijective mappings
from the lowered index expression.

We choose the term quasi affine to be consistent with the
terminology used by in polyhedral compilation.
DetectIterMap can handle symbolic integers(in split/fuse) to some extent.

The utility can be useful in detecting loop transformation
patterns and data layout change patterns in TIR.

* Update per feedback
---
 include/tvm/arith/iter_affine_map.h| 277 
 python/tvm/arith/__init__.py   |   2 +
 python/tvm/arith/iter_affine_map.py| 108 
 src/arith/iter_affine_map.cc   | 717 +
 src/arith/rewrite_simplify.cc  |   3 +
 src/node/structural_hash.cc|  18 +-
 src/support/util.h |  10 +
 .../python/unittest/test_arith_iter_affine_map.py  | 176 +
 8 files changed, 1298 insertions(+), 13 deletions(-)

diff --git a/include/tvm/arith/iter_affine_map.h 
b/include/tvm/arith/iter_affine_map.h
new file mode 100644
index 000..00f8cf6
--- /dev/null
+++ b/include/tvm/arith/iter_affine_map.h
@@ -0,0 +1,277 @@
+/*
+ * 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.
+ */
+
+/*!
+ * \file tvm/arith/iter_affine_map.h
+ * \brief Iterator quasi-affine mapping patterns.
+ *
+ *  This file defines a collection of mapping patterns
+ *  maps a collection of independent iterators to another
+ *  collection of independent iterators.
+ *
+ *  There are two main kinds of mapping patterns:
+ *
+ *  - Fuse: fuse a collection of iterators into a single one
+ *
+ *domain(x0) = [0, 4), domain(x1) = [0, 3), domain(x2) = [0, 2)
+ *fuse(x0, x1, x2): y = x2 * 12 + x1 * 4 + x0
+ *domain(y) = [0, 24)
+ *
+ *  - Split: split an iterator into multiple ones
+ *
+ *domain(x) = [0, 24)
+ *split(x, 3, 12): [y0, y1, y2] = [x % 3, (x % 12) / 3, x / 12]
+ *domain(y0) = [0, 3), domain(y1) = [0, 4), domain(y2) = [0, 2)
+ *
+ *  We use the name "(quasi)affine" to be consistent with
+ *  the terminology used in the polyhedral compilation.
+ *  Notably, fuse is an affine transformation,
+ *  while split corresponds to additional floordiv/mod operations
+ *  that can appear in quasi-affine transformations.
+ */
+#ifndef TVM_ARITH_ITER_AFFINE_MAP_H_
+#define TVM_ARITH_ITER_AFFINE_MAP_H_
+
+#include 
+
+namespace tvm {
+namespace arith {
+
+/*!
+ * \brief Base class of all iter map expressions.
+ *
+ *  An IterMapExpr is a special expression to store
+ *  the result of IterMapDetection.
+ *  It should not appear in a legal TIR PrimFunc.
+ */
+class IterMapExprNode : public PrimExprNode {
+ public:
+  // overrides
+  void VisitAttrs(tvm::AttrVisitor* v) {}
+
+  static constexpr const char* _type_key = "arith.IterMapExpr";
+  static constexpr const uint32_t _type_child_slots = 3;
+  TVM_DECLARE_BASE_OBJECT_INFO(IterMapExprNode, PrimExprNode);
+};
+
+/*!
+ * \brief Managed reference to IterMapExprNode.
+ * \sa IterMapExprNode
+ */
+class IterMapExpr : public PrimExpr {
+ public:
+  TVM_DEFINE_OBJECT_REF_METHODS(IterMapExpr, PrimExpr, IterMapExprNode);
+};
+
+/*!
+ * \brief Mark the source as an iterator in [0, extent).
+ *
+ *  IterMark is used to mark source expression as a valid
+ *  iterator to make future analysis easy.
+ */
+class IterMarkNode : public Object {
+ public:
+  /*!
+   * \brief The source expression, can either be
+   *  a I

[GitHub] [incubator-tvm] tqchen merged pull request #6667: [ARITH] Introduce iterator (quasi)affine map detection.

2020-10-14 Thread GitBox


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


   



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 main updated: [AutoScheduler] Fix a bug in thread binding (#6683)

2020-10-14 Thread lmzheng
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 78bba3c  [AutoScheduler] Fix a bug in thread binding (#6683)
78bba3c is described below

commit 78bba3c74785433b0f29589d89112ef06e4bca75
Author: Lianmin Zheng 
AuthorDate: Wed Oct 14 04:13:40 2020 -0700

[AutoScheduler] Fix a bug in thread binding (#6683)

* fix for lstm use case

* update
---
 src/auto_scheduler/search_policy/sketch_policy_rules.cc | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/auto_scheduler/search_policy/sketch_policy_rules.cc 
b/src/auto_scheduler/search_policy/sketch_policy_rules.cc
index 045ee86..99188d4 100644
--- a/src/auto_scheduler/search_policy/sketch_policy_rules.cc
+++ b/src/auto_scheduler/search_policy/sketch_policy_rules.cc
@@ -702,11 +702,14 @@ PopulationGenerationRule::ResultKind 
InitVectorization::Apply(SketchPolicyNode*
 
 PopulationGenerationRule::ResultKind InitThreadBind::Apply(SketchPolicyNode* 
policy, State* state,
std::mt19937* 
rand_gen) const {
+  // Collect all stages that are roots of stages that perform multi-level 
tiling.
   std::set multi_level_tiling_root_set;
   for (size_t stage_id = 0; stage_id < (*state)->stages.size(); ++stage_id) {
 if (NeedsMultilevelTiling(policy->search_task, *state, stage_id)) {
   const Stage& stage = (*state)->stages[stage_id];
-  if (stage->compute_at != ComputeAtKind::kIter) {
+  if (stage->compute_at == ComputeAtKind::kInlined) {
+continue;
+  } else if (stage->compute_at != ComputeAtKind::kIter) {
 // This stage is not multi-level tiled,
 // so it must be produced by RuleCrossThreadReduction.
 CHECK(HasCrossThreadReduction(*state, stage_id));



[GitHub] [incubator-tvm] merrymercy merged pull request #6683: [AutoScheduler] Fix a bug in thread binding

2020-10-14 Thread GitBox


merrymercy merged pull request #6683:
URL: https://github.com/apache/incubator-tvm/pull/6683


   



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] merrymercy commented on pull request #6683: [AutoScheduler] Fix a bug in thread binding

2020-10-14 Thread GitBox


merrymercy commented on pull request #6683:
URL: https://github.com/apache/incubator-tvm/pull/6683#issuecomment-708220388


   cc @jcf94  @comaniac 



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] merrymercy opened a new pull request #6683: [AutoScheduler] Fix a bug in thread binding

2020-10-14 Thread GitBox


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


   Fix for this bug 
https://discuss.tvm.apache.org/t/auto-scheduling-for-lstm-operator/8158



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