[GitHub] [incubator-tvm] tmoreau89 commented on issue #4318: [Relay][TOPI]Fix meaning of conv2d_transpose output_padding parameter

2019-11-21 Thread GitBox
tmoreau89 commented on issue #4318: [Relay][TOPI]Fix meaning of 
conv2d_transpose output_padding parameter
URL: https://github.com/apache/incubator-tvm/pull/4318#issuecomment-557425594
 
 
   FYI, I was able to reproduce the issue in your branch, I'll look more into 
what's causing it 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] tmoreau89 commented on a change in pull request #4366: [DOCS] add benchmark log format doc

2019-11-21 Thread GitBox
tmoreau89 commented on a change in pull request #4366: [DOCS] add benchmark log 
format doc
URL: https://github.com/apache/incubator-tvm/pull/4366#discussion_r349462188
 
 

 ##
 File path: docs/dev/benchmark.rst
 ##
 @@ -0,0 +1,116 @@
+..  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.
+
+
+Benchmark Performance Log Format
+
+This page details schema v0.1 for a unified benchmark log format. This schema 
will allow easier cross-references with other frameworks/runs, experiment 
reproduction, data for nightly perf regression, and the separation of 
logging/visualization efforts.
+
+Log Format Overview
+~~~
+
++---++--+--+
+| header| examples 

  | category | notes/justification  
|
++===++==+==+
+| timestamp | 1572282699.6 

  | metadata | indicates when this record is logged 
|
++---++--+--+
+| schema\_version   | 0.1  

  | metadata | ensure reproducibility as we iterate on 
this schema  |
++---++--+--+
+| metadata  | { "docker\_tag":"gcr.io/.../0a680", ... }

  | metadata | ``docker_tag`` is required   
|
++---++--+--+
+| workload  | resnet-18

  | workload | name of workload 
|
++---++--+--+
+| workload\_args| {“input\_name”: "Input3", “input\_shape”: 
[list\_of\_shape], “data\_layout”: NHCW}
 | workload |   
   |

[GitHub] [incubator-tvm] jackwish commented on issue #3859: [TOPI][AutoTVM] NHWC conv2d templates for ARM

2019-11-21 Thread GitBox
jackwish commented on issue #3859: [TOPI][AutoTVM] NHWC conv2d templates for ARM
URL: https://github.com/apache/incubator-tvm/pull/3859#issuecomment-557416474
 
 
   Hi @tmoreau89 , thanks for your comments!
   
   > Do you mind checking tuned performance for e2e resnet18 and/or mobilenet?
   
   I'd like to provide e2e performance too, though it seems pretty hard before 
we have a dedicated depthwise NHWC schedule. I will tune some workloads from 
MobileNet.
   
   > One thing to keep track of is the schedule space.
   
   The tuning space is a bit larger than NCHW, but still manageable. When 
evaluating the performance, I have a trail of 1000 and early stop of 500 for 
both NCHW and NHWC. The best result is obtained at about 500th iteration even 
with a sufficient large workload (image size 128 with input/output channel 128).
   
   > I'd recommend adding more comments in the schedule code.
   
   For sure I agree with this. Most of the TVM schedule primitives are 
straightforward (to people who have experience), while the recording are 
basically for locality in general regarding different workloads.
   
   


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] tmoreau89 commented on issue #3859: [TOPI][AutoTVM] NHWC conv2d templates for ARM

2019-11-21 Thread GitBox
tmoreau89 commented on issue #3859: [TOPI][AutoTVM] NHWC conv2d templates for 
ARM
URL: https://github.com/apache/incubator-tvm/pull/3859#issuecomment-557407797
 
 
   Other than that, I'd recommend adding more comments in the schedule code. 
Particularly in terms of decisions that affect compute declaration/schedule 
space definition. For instance, why did you list the different dimension 
reorderings etc. This will help future maintainers, or folks who'd want to 
write future schedule templates for ARM.


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] tmoreau89 commented on issue #4318: [Relay][TOPI]Fix meaning of conv2d_transpose output_padding parameter

2019-11-21 Thread GitBox
tmoreau89 commented on issue #4318: [Relay][TOPI]Fix meaning of 
conv2d_transpose output_padding parameter
URL: https://github.com/apache/incubator-tvm/pull/4318#issuecomment-557403912
 
 
   @abergeron got sidetracked with other commitments, I'll reproduce the issue 
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


[incubator-tvm] branch master updated (030a163 -> 70017ef)

2019-11-21 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 030a163  update_document_after_repository_renamed (#4398)
 add 70017ef  [Golang][Doc] improve the samples and doc (#4385)

No new revisions were added by this update.

Summary of changes:
 golang/README.md   |  8 ++--
 golang/sample/Makefile |  2 +-
 golang/sample/complex.go   |  2 +-
 golang/sample/gen_mobilenet_lib.py | 91 ++
 4 files changed, 98 insertions(+), 5 deletions(-)
 create mode 100644 golang/sample/gen_mobilenet_lib.py



[GitHub] [incubator-tvm] srkreddy1238 merged pull request #4385: [Golang][Doc] improve the samples and doc

2019-11-21 Thread GitBox
srkreddy1238 merged pull request #4385: [Golang][Doc] improve the samples and 
doc
URL: https://github.com/apache/incubator-tvm/pull/4385
 
 
   


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] liangfu edited a comment on issue #4392: [VTA] Enable streamlined GEMM execution

2019-11-21 Thread GitBox
liangfu edited a comment on issue #4392: [VTA] Enable streamlined GEMM execution
URL: https://github.com/apache/incubator-tvm/pull/4392#issuecomment-557371295
 
 
   This PR doesn't intend to reduce cycle count, or any performance improvement.
   
   My major intention is to bring successful evaluation of 
`matrix_multiply_opt.py` and `convolution_opt.py` scripts, so that we can get 
closer to bring end-to-end support in evaluating resnet18. The reason the 
evaluation of these scripts failed previously is that 
   
   > This PR fixed an issue in the streamlined GEMM execution by disabling 
pipelined adder, which consumes 4 cycles (in case of LOG_BLOCK=4) in addition 
to the single-cycle fused multiplier-adder. This is much longer than the 
4-stage streamline design in the TensorGemm module.
   
   Here are the benchmarks from Intel's Timing Analyzer (, with **cycle count** 
and **result** entry performed with `matrix_multiply_opt.py` script).
   
   | design | area (in ALMs) | fmax (slow 100C) | fmax (slow -40C) | fmax (fast 
100C) | fmax (fast -40C) | cycle count | result |
   | -- | -- | -- | -- | -- | -- | -- | -- |
   | PipeAdderX4 | 20,419/41,910 (49%) | 71.74 MHz | 73.52 MHz | 109.12 MHz | 
135.46 MHz | 183,038 | fail |
   | AdderX4 | 18,186/41,910 (43%) | 60.72 MHz | 58.82 MHz | 92.43 MHz | 114.97 
MHz | 182,990 | pass |
   
   A middle ground can be found to use interleaved `PipeAdder` and `Adder`, so 
that the accumulator takes 2 cycles + FMA takes 1 cycle, can be still smaller 
than 4 states in TensorGemm module. (However, larger designs with LOG_BLOCK 
greater than 4 cannot get successful evaluation results with 
`matrix_multiply_opt.py`)


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] liangfu edited a comment on issue #4392: [VTA] Enable streamlined GEMM execution

2019-11-21 Thread GitBox
liangfu edited a comment on issue #4392: [VTA] Enable streamlined GEMM execution
URL: https://github.com/apache/incubator-tvm/pull/4392#issuecomment-557371295
 
 
   This PR doesn't intend to reduce cycle count, or any performance improvement.
   
   My major intention is to bring successful evaluation of 
`matrix_multiply_opt.py` and `convolution_opt.py` scripts, so that we can get 
closer to bring end-to-end support in evaluating resnet18. The reason the 
evaluation of these scripts failed previously is that 
   
   > This PR fixed an issue in the streamlined GEMM execution by disabling 
pipelined adder, which consumes 4 cycles (in case of LOG_BLOCK=4) in addition 
to the single-cycle fused multiplier-adder. This is much longer than the 
4-stage streamline design in the TensorGemm module.
   
   Here are the benchmarks from Intel's Timing Analyzer (, with **cycle count** 
and **result** entry performed with `matrix_multiply_opt.py` script).
   
   | design | area (in ALMs) | fmax (slow 100C) | fmax (slow -40C) | fmax (fast 
100C) | fmax (fast -40C) | cycle count | result |
   | -- | -- | -- | -- | -- | -- | -- | -- |
   | PipeAdderX4 | 20,419/41,910 (49%) | 71.74 MHz | 73.52 MHz | 109.12 MHz | 
135.46 MHz | 183,038 | fail |
   | AdderX4 | 18,186/41,910 (43%) | 60.72 MHz | 58.82 MHz | 92.43 MHz | 114.97 
MHz | 182,990 | pass |
   
   A middle ground can be found to use interleaved `PipeAdder` and `Adder`, so 
that the accumulator takes 2 cycles + FMA takes 1 cycle, can be still smaller 
than 4 states in TensorGemm module.


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 issue #4318: [Relay][TOPI]Fix meaning of conv2d_transpose output_padding parameter

2019-11-21 Thread GitBox
abergeron commented on issue #4318: [Relay][TOPI]Fix meaning of 
conv2d_transpose output_padding parameter
URL: https://github.com/apache/incubator-tvm/pull/4318#issuecomment-557396409
 
 
   @tmoreau89 Any news?


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 commented on issue #4259: [DEV][DRAFT] TVM v0.6 Release candidate

2019-11-21 Thread GitBox
yzhliu commented on issue #4259: [DEV][DRAFT] TVM v0.6 Release candidate
URL: https://github.com/apache/incubator-tvm/issues/4259#issuecomment-557394735
 
 
   The next steps are roughly,
   1. Tag release candidate
   2. Create binary artifact
   3. Vote on dev@ mail-list (if fail, make change, go to step 1)
   4. Vote on general@ mail-list (if fail, make change, go to step 1)
   5. Finalize the release


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 edited a comment on issue #4259: [DEV][DRAFT] TVM v0.6 Release candidate

2019-11-21 Thread GitBox
yzhliu edited a comment on issue #4259: [DEV][DRAFT] TVM v0.6 Release candidate
URL: https://github.com/apache/incubator-tvm/issues/4259#issuecomment-550417287
 
 
   # Build and Test
   * Increate the robuteness of CI test 
([#2841](https://github.com/apache/incubator-tvm/pull/2841), 
[#2798](https://github.com/apache/incubator-tvm/pull/2798), 
[#2793](https://github.com/apache/incubator-tvm/pull/2793), 
[#2788](https://github.com/apache/incubator-tvm/pull/2788), 
[#2781](https://github.com/apache/incubator-tvm/pull/2781), 
[#2727](https://github.com/apache/incubator-tvm/pull/2727), 
[#2710](https://github.com/apache/incubator-tvm/pull/2710), 
[#2711](https://github.com/apache/incubator-tvm/pull/2711), 
[#2923](https://github.com/apache/incubator-tvm/pull/2923))
   * Improve conda build 
([#2742](https://github.com/apache/incubator-tvm/pull/2742)) 
   * Add caffe2 nnvm frontend to CI 
([#3018](https://github.com/apache/incubator-tvm/pull/3018))
   * Use bridge network and expose port on macOS when launch docker image 
([#3086](https://github.com/apache/incubator-tvm/pull/3086))
   * Run DarkNet tests 
([#2673](https://github.com/apache/incubator-tvm/pull/2673)) 
   * Add file type check 
([#3116](https://github.com/apache/incubator-tvm/pull/3116))
   * Always run cpptest during build to ensure library correctness 
([#3147](https://github.com/apache/incubator-tvm/pull/3147))
   * Handle more file types in ASF header 
([#3235](https://github.com/apache/incubator-tvm/pull/3235))
   * Add `test_forward_ssd_mobilenet_v1` to tflite/test_forward 
([#3350](https://github.com/apache/incubator-tvm/pull/3350))
   * Add Azure build pipeline 
([#3458](https://github.com/apache/incubator-tvm/pull/3458), 
[#3459](https://github.com/apache/incubator-tvm/pull/3459))
   * Update ci-gpu to v0.52 
([#3374](https://github.com/apache/incubator-tvm/pull/3374))
   * Enable more visible symbols by default 
([#3365](https://github.com/apache/incubator-tvm/pull/3365))
   * Separate out legacy as a stage in CI 
([#3337](https://github.com/apache/incubator-tvm/pull/3337))
   * Simplify build script, remove python 2 support  
([#3419](https://github.com/apache/incubator-tvm/pull/3419))
   * Ignore rust cargo lock files in rat 
([#3314](https://github.com/apache/incubator-tvm/pull/3314))
   * Improve CUDA Conda package build 
([#3281](https://github.com/apache/incubator-tvm/pull/3281))
   * Update CMakeLists.txt to be more flexible to find the third parties 
libraries ([#3354](https://github.com/apache/incubator-tvm/pull/3354))
   * Docker update conda package 
([#3344](https://github.com/apache/incubator-tvm/pull/3344)), requests and 
pillow ([#3495](https://github.com/apache/incubator-tvm/pull/3495)), Android 
demo ([#3499](https://github.com/apache/incubator-tvm/pull/3499)), rat install 
([#3527](https://github.com/apache/incubator-tvm/pull/3527)), ARM support 
([#3546](https://github.com/apache/incubator-tvm/pull/3546)), LLVM 
([#3590](https://github.com/apache/incubator-tvm/pull/3590))
   * Relay-to-Python testing 
([#3156](https://github.com/apache/incubator-tvm/pull/3156))
   * Code refactoring/remove 
([#3523](https://github.com/apache/incubator-tvm/pull/3523), 
[#3667](https://github.com/apache/incubator-tvm/pull/3667))
   * Zero-rank testing 
([#3612](https://github.com/apache/incubator-tvm/pull/3612))
   * CMake compilation 
([#3611](https://github.com/apache/incubator-tvm/pull/3611), 
[#3650](https://github.com/apache/incubator-tvm/pull/3650), google test 
[#3628](https://github.com/apache/incubator-tvm/pull/3628))
   * Standalone wheel build for TOPI 
([#3657](https://github.com/apache/incubator-tvm/pull/3657))
   * Fixing performance issues in PassUpDomain when fusing and splitting axes 
([#3073](https://github.com/apache/incubator-tvm/pull/3073))
   * conda recipe ([#3791](https://github.com/apache/incubator-tvm/pull/3791))
   * Allow users to specify download directory 
([#3803](https://github.com/apache/incubator-tvm/pull/3803))
   * Update docs for installation for CUDA 
([#3832](https://github.com/apache/incubator-tvm/pull/3832))
   * Update hybrid_script.rst 
([#3799](https://github.com/apache/incubator-tvm/pull/3799))
   * Acknowledge Halide attributions 
([#3824](https://github.com/apache/incubator-tvm/pull/3824))
   * Add psutil dependency 
([#3780](https://github.com/apache/incubator-tvm/pull/3780))
   * Temporary disable rust test 
([#3809](https://github.com/apache/incubator-tvm/pull/3809))
   * Solve occasional CI issue when pad value is all 0 
([#3801](https://github.com/apache/incubator-tvm/pull/3801))
   * Towards TSIM CI testing 
([#3704](https://github.com/apache/incubator-tvm/pull/3704))
   * Use pip3 for python3 
([#3742](https://github.com/apache/incubator-tvm/pull/3742))
   * Update docker image `ci_cpu,i386` to include verilator 
([#3738](https://github.com/apache/incubator-tvm/pull/3738))
   * Remove sccache from Rust install 
([#3728](https://github.com/apache/incubator-tvm/pull/3728))
   * 

[GitHub] [incubator-tvm] yzhliu edited a comment on issue #4259: [DEV][DRAFT] TVM v0.6 Release candidate

2019-11-21 Thread GitBox
yzhliu edited a comment on issue #4259: [DEV][DRAFT] TVM v0.6 Release candidate
URL: https://github.com/apache/incubator-tvm/issues/4259#issuecomment-550417287
 
 
   # Build and Test
   * Increate the robuteness of CI test 
([#2841](https://github.com/apache/incubator-tvm/pull/2841), 
[#2798](https://github.com/apache/incubator-tvm/pull/2798), 
[#2793](https://github.com/apache/incubator-tvm/pull/2793), 
[#2788](https://github.com/apache/incubator-tvm/pull/2788), 
[#2781](https://github.com/apache/incubator-tvm/pull/2781), 
[#2727](https://github.com/apache/incubator-tvm/pull/2727), 
[#2710](https://github.com/apache/incubator-tvm/pull/2710), 
[#2711](https://github.com/apache/incubator-tvm/pull/2711), 
[#2923](https://github.com/apache/incubator-tvm/pull/2923))
   * Improve conda build 
([#2742](https://github.com/apache/incubator-tvm/pull/2742)) 
   * Add caffe2 nnvm frontend to CI 
([#3018](https://github.com/apache/incubator-tvm/pull/3018))
   * Use bridge network and expose port on macOS when launch docker image 
([#3086](https://github.com/apache/incubator-tvm/pull/3086))
   * Run DarkNet tests 
([#2673](https://github.com/apache/incubator-tvm/pull/2673)) 
   * Add file type check 
([#3116](https://github.com/apache/incubator-tvm/pull/3116))
   * Always run cpptest during build to ensure library correctness 
([#3147](https://github.com/apache/incubator-tvm/pull/3147))
   * Handle more file types in ASF header 
([#3235](https://github.com/apache/incubator-tvm/pull/3235))
   * Add `test_forward_ssd_mobilenet_v1` to tflite/test_forward 
([#3350](https://github.com/apache/incubator-tvm/pull/3350))
   * Add Azure build pipeline 
([#3458](https://github.com/apache/incubator-tvm/pull/3458), 
[#3459](https://github.com/apache/incubator-tvm/pull/3459))
   * Update ci-gpu to v0.52 
([#3374](https://github.com/apache/incubator-tvm/pull/3374))
   * Enable more visible symbols by default 
([#3365](https://github.com/apache/incubator-tvm/pull/3365))
   * Separate out legacy as a stage in CI 
([#3337](https://github.com/apache/incubator-tvm/pull/3337))
   * Simplify build script, remove python 2 support  
([#3419](https://github.com/apache/incubator-tvm/pull/3419))
   * Ignore rust cargo lock files in rat 
([#3314](https://github.com/apache/incubator-tvm/pull/3314))
   * Improve CUDA Conda package build 
([#3281](https://github.com/apache/incubator-tvm/pull/3281))
   * Update CMakeLists.txt to be more flexible to find the third parties 
libraries ([#3354](https://github.com/apache/incubator-tvm/pull/3354))
   * Docker update conda package 
([#3344](https://github.com/apache/incubator-tvm/pull/3344)), requests and 
pillow ([#3495](https://github.com/apache/incubator-tvm/pull/3495)), Android 
demo ([#3499](https://github.com/apache/incubator-tvm/pull/3499)), rat install 
([#3527](https://github.com/apache/incubator-tvm/pull/3527)), ARM support 
([#3546](https://github.com/apache/incubator-tvm/pull/3546)), LLVM 
([#3590](https://github.com/apache/incubator-tvm/pull/3590))
   * Relay-to-Python testing 
([#3156](https://github.com/apache/incubator-tvm/pull/3156))
   * Code refactoring/remove 
([#3523](https://github.com/apache/incubator-tvm/pull/3523), 
[#3667](https://github.com/apache/incubator-tvm/pull/3667))
   * Zero-rank testing 
([#3612](https://github.com/apache/incubator-tvm/pull/3612))
   * CMake compilation 
([#3611](https://github.com/apache/incubator-tvm/pull/3611), 
[#3650](https://github.com/apache/incubator-tvm/pull/3650), google test 
[#3628](https://github.com/apache/incubator-tvm/pull/3628))
   * Standalone wheel build for TOPI 
([#3657](https://github.com/apache/incubator-tvm/pull/3657))
   * Fixing performance issues in PassUpDomain when fusing and splitting axes 
([#3073](https://github.com/apache/incubator-tvm/pull/3073))
   * conda recipe ([#3791](https://github.com/apache/incubator-tvm/pull/3791))
   * Allow users to specify download directory 
([#3803](https://github.com/apache/incubator-tvm/pull/3803))
   * Update docs for installation for CUDA 
([#3832](https://github.com/apache/incubator-tvm/pull/3832))
   * Update hybrid_script.rst 
([#3799](https://github.com/apache/incubator-tvm/pull/3799))
   * Acknowledge Halide attributions 
([#3824](https://github.com/apache/incubator-tvm/pull/3824))
   * Add psutil dependency 
([#3780](https://github.com/apache/incubator-tvm/pull/3780))
   * Temporary disable rust test 
([#3809](https://github.com/apache/incubator-tvm/pull/3809))
   * Solve occasional CI issue when pad value is all 0 
([#3801](https://github.com/apache/incubator-tvm/pull/3801))
   * Towards TSIM CI testing 
([#3704](https://github.com/apache/incubator-tvm/pull/3704))
   * Use pip3 for python3 
([#3742](https://github.com/apache/incubator-tvm/pull/3742))
   * Update docker image `ci_cpu,i386` to include verilator 
([#3738](https://github.com/apache/incubator-tvm/pull/3738))
   * Remove sccache from Rust install 
([#3728](https://github.com/apache/incubator-tvm/pull/3728))
   * 

[GitHub] [incubator-tvm] liangfu edited a comment on issue #4392: [VTA] Enable streamlined GEMM execution

2019-11-21 Thread GitBox
liangfu edited a comment on issue #4392: [VTA] Enable streamlined GEMM execution
URL: https://github.com/apache/incubator-tvm/pull/4392#issuecomment-557371295
 
 
   This PR doesn't intend to reduce cycle count, or any performance improvement.
   
   My major intention is to bring successful evaluation of 
`matrix_multiply_opt.py` and `convolution_opt.py` scripts, so that we can get 
closer to bring end-to-end support in evaluating resnet18. The reason the 
evaluation of these scripts failed previously is that 
   
   > This PR fixed an issue in the streamlined GEMM execution by disabling 
pipelined adder, which consumes 4 cycles (in case of LOG_BLOCK=4) in addition 
to the single-cycle fused multiplier-adder. This is much longer than the 
4-stage streamline design in the TensorGemm module.
   
   Here are the benchmarks from Intel's Timing Analyzer (some entries still 
need to be updated)
   
   | design | area (in ALMs) | fmax (1100mV,  slow 100C) | fmax (1100mV,  slow 
-40C) | fmax (1100mV,  fast 100C) | fmax (1100mV,  fast -40C) | cycle count |
   | -- | -- | -- | -- | -- | -- | -- |
   | PipeAdderX4 | 20,419/41,910 (49%) | 71.74 MHz | 73.52 MHz | 109.12 MHz | 
135.46 MHz | -- |
   | PipeAdderX2 AdderX2 | -- | -- | -- | -- | -- | -- |
   | AdderX4 | 18,186/41,910 (43%) | 60.72 MHz | 58.82 MHz | 92.43 MHz | 114.97 
MHz | -- |
   
   


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 v0.6.0 updated (122a493 -> 030a163)

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

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


from 122a493  [Relay][VM] Clean up the VM and VM profiler code (#4391)
 add 4b2c4c3  Update Jenkinsfile for external runtime (#4396)
 add 030a163  update_document_after_repository_renamed (#4398)

No new revisions were added by this update.

Summary of changes:
 Jenkinsfile   | 4 
 apps/sgx/README.md| 2 +-
 docs/deploy/index.rst | 2 +-
 docs/install/docker.rst   | 2 +-
 docs/install/from_source.rst  | 2 +-
 docs/install/nnpack.md| 2 +-
 docs/vta/install.md   | 2 +-
 nnvm/tutorials/deploy_model_on_mali_gpu.py| 2 +-
 nnvm/tutorials/deploy_model_on_rasp.py| 2 +-
 tutorials/cross_compilation_and_rpc.py| 2 +-
 tutorials/frontend/deploy_model_on_android.py | 2 +-
 tutorials/frontend/deploy_model_on_rasp.py| 2 +-
 vta/apps/tsim_example/README.md   | 2 +-
 13 files changed, 16 insertions(+), 12 deletions(-)



[GitHub] [incubator-tvm] jackwish commented on issue #3859: [TOPI][AutoTVM] NHWC conv2d templates for ARM

2019-11-21 Thread GitBox
jackwish commented on issue #3859: [TOPI][AutoTVM] NHWC conv2d templates for ARM
URL: https://github.com/apache/incubator-tvm/pull/3859#issuecomment-557374095
 
 
   Thanks @FrozenGene for your quick review, comments addressed.


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] jackwish commented on a change in pull request #3859: [TOPI][AutoTVM] NHWC conv2d templates for ARM

2019-11-21 Thread GitBox
jackwish commented on a change in pull request #3859: [TOPI][AutoTVM] NHWC 
conv2d templates for ARM
URL: https://github.com/apache/incubator-tvm/pull/3859#discussion_r349421231
 
 

 ##
 File path: topi/python/topi/arm_cpu/conv2d_spatial_pack.py
 ##
 @@ -196,3 +196,160 @@ def schedule_conv2d_spatial_pack_nchw(cfg, s, data_vec, 
kernel_vec,
 s[kernel_vec].parallel(co)
 
 return s
+
+def conv2d_spatial_pack_nhwc(cfg, data, kernel, strides, padding, dilation, 
out_dtype):
+"""Spatial pack compute for Conv2d NHWC"""
+out_dtype = out_dtype or data.dtype
+
+N, IH, IW, IC = get_const_tuple(data.shape)
+assert len(kernel.shape) == 4, "AlterOpLayout not enabled for NHWC yet"
+KH, KW, _, OC = get_const_tuple(kernel.shape)
+
+if isinstance(dilation, int):
+dilation_h = dilation_w = dilation
+else:
+dilation_h, dilation_w = dilation
+
+dilated_kernel_h = (KH - 1) * dilation_h + 1
+dilated_kernel_w = (KW - 1) * dilation_w + 1
+
+pad_top, pad_left, pad_down, pad_right = \
+get_pad_tuple(padding, (dilated_kernel_h, dilated_kernel_w))
+HSTR, WSTR = strides if isinstance(strides, (tuple, list)) else (strides, 
strides)
+
+OH = (IH + pad_top + pad_down - dilated_kernel_h) // HSTR + 1
+OW = (IW + pad_left + pad_right - dilated_kernel_w) // WSTR + 1
+data_pad = nn.pad(data, [0, pad_top, pad_left, 0], [0, pad_down, 
pad_right, 0])
+
+#  define configuration space 
+n, oc, oh, ow = cfg.axis(N), cfg.axis(OC), cfg.axis(OH), cfg.axis(OW)
+ic, kh, kw = cfg.reduce_axis(IC), cfg.reduce_axis(KH), cfg.reduce_axis(KW)
+
+oco, oci = cfg.define_split('tile_co', oc, num_outputs=2)
+oho, ohi = cfg.define_split('tile_oh', oh, num_outputs=2)
+owo, owi = cfg.define_split('tile_ow', ow, num_outputs=2)
+
+cfg.define_reorder('reorder_conv',
+   [n, oho, owo, oco, kh, kw, ic, ohi, owi, oci],
+   policy='candidate', candidate=[
+   [n, oho, owo, oco, kh, kw, ic, ohi, owi, oci],
+   [n, oho, owo, oco, ohi, kh, kw, ic, owi, oci],
+   [n, oho, owo, oco, ohi, kh, kw, owi, ic, oci],
+   [n, oho, owo, ohi, oco, kh, kw, owi, ic, oci]])
+
+cfg.define_annotate("ann_reduce", [kh, kw], policy='try_unroll')
+cfg.define_annotate("ann_spatial", [ohi, owi, oci], 
policy='try_unroll_vec')
+# 
+
+OCI = cfg['tile_co'].size[-1]
+OHI = cfg['tile_oh'].size[-1]
+OWI = cfg['tile_ow'].size[-1]
+OCO = OC // OCI
+OHO = OH // OHI
+OWO = OW // OWI
+
+kvshape = (OCO, KH, KW, IC, OCI)
+ovshape = (N, OHO, OWO, OCO, OHI, OWI, OCI)
+oshape = (N, OH, OW, OC)
+
+if dilation_h != 1 or dilation_w != 1:
+# undilate input data
+dvshape = (N, OHO, OWO, KH, KW, IC, OHI, OWI)
+data_vec = tvm.compute(dvshape, lambda n, oho, owo, kh, kw, ic, ohi, 
owi:
+   data_pad[n][(oho*OHI+ohi)*HSTR+kh*dilation_h]
+   [(owo*OWI+owi)*WSTR+kw*dilation_w][ic],
+   name='data_vec_undilated')
+else:
+dvshape = (N, OHO, OWO, KH + (OHI-1)*HSTR, KW + (OWI-1)*WSTR, IC)
+data_vec = tvm.compute(dvshape, lambda n, oho, owo, ohi, owi, ic:
+   
data_pad[n][oho*OHI*HSTR+ohi][owo*OWI*WSTR+owi][ic],
+   name='data_vec')
+kernel_vec = tvm.compute(kvshape, lambda oco, kh, kw, ic, oci: \
+ kernel[kh][kw][ic][oco*OCI+oci],
+ name='kernel_vec')
+
+ic = tvm.reduce_axis((0, IC), name='ic')
+kh = tvm.reduce_axis((0, KH), name='kh')
+kw = tvm.reduce_axis((0, KW), name='kw')
+
+if dilation_h != 1 or dilation_w != 1:
+conv = tvm.compute(ovshape, lambda n, oho, owo, oco, ohi, owi, oci: \
+tvm.sum(data_vec[n, oho, owo, kh, kw, ohi, owi, 
ic].astype(out_dtype) *
+kernel_vec[oco, kh, kw, ic, oci].astype(out_dtype),
+axis=[ic, kh, kw]), name='conv')
+else:
+conv = tvm.compute(ovshape, lambda n, oho, owo, oco, ohi, owi, oci: \
+tvm.sum(data_vec[n, oho, owo, ohi*HSTR+kh, owi*WSTR+kw, 
ic].astype(out_dtype) *
+kernel_vec[oco, kh, kw, ic, oci].astype(out_dtype),
+axis=[ic, kh, kw]), name='conv')
+
+output = tvm.compute(oshape, lambda n, oho, owo, oc:
+ 
conv[n][oho//OHI][owo//OWI][oc//OCI][oho%OHI][owo%OWI][oc%OCI],
+ name='output_unpack', tag='spatial_conv_output_NHWC')
+return output
+
+def schedule_conv2d_spatial_pack_nhwc(cfg, s, op, output):
+"""Spatial Pack schedule for Conv2d NHWC"""
+unpack = op.output(0)
+conv = unpack.op.input_tensors[0]
+data_vec = 

[GitHub] [incubator-tvm] jackwish commented on a change in pull request #3859: [TOPI][AutoTVM] NHWC conv2d templates for ARM

2019-11-21 Thread GitBox
jackwish commented on a change in pull request #3859: [TOPI][AutoTVM] NHWC 
conv2d templates for ARM
URL: https://github.com/apache/incubator-tvm/pull/3859#discussion_r349421208
 
 

 ##
 File path: topi/python/topi/arm_cpu/conv2d_spatial_pack.py
 ##
 @@ -196,3 +196,160 @@ def schedule_conv2d_spatial_pack_nchw(cfg, s, data_vec, 
kernel_vec,
 s[kernel_vec].parallel(co)
 
 return s
+
+def conv2d_spatial_pack_nhwc(cfg, data, kernel, strides, padding, dilation, 
out_dtype):
+"""Spatial pack compute for Conv2d NHWC"""
+out_dtype = out_dtype or data.dtype
+
+N, IH, IW, IC = get_const_tuple(data.shape)
+assert len(kernel.shape) == 4, "AlterOpLayout not enabled for NHWC yet"
+KH, KW, _, OC = get_const_tuple(kernel.shape)
+
+if isinstance(dilation, int):
+dilation_h = dilation_w = dilation
+else:
+dilation_h, dilation_w = dilation
+
+dilated_kernel_h = (KH - 1) * dilation_h + 1
+dilated_kernel_w = (KW - 1) * dilation_w + 1
+
+pad_top, pad_left, pad_down, pad_right = \
+get_pad_tuple(padding, (dilated_kernel_h, dilated_kernel_w))
+HSTR, WSTR = strides if isinstance(strides, (tuple, list)) else (strides, 
strides)
+
+OH = (IH + pad_top + pad_down - dilated_kernel_h) // HSTR + 1
+OW = (IW + pad_left + pad_right - dilated_kernel_w) // WSTR + 1
+data_pad = nn.pad(data, [0, pad_top, pad_left, 0], [0, pad_down, 
pad_right, 0])
+
+#  define configuration space 
+n, oc, oh, ow = cfg.axis(N), cfg.axis(OC), cfg.axis(OH), cfg.axis(OW)
+ic, kh, kw = cfg.reduce_axis(IC), cfg.reduce_axis(KH), cfg.reduce_axis(KW)
+
+oco, oci = cfg.define_split('tile_co', oc, num_outputs=2)
+oho, ohi = cfg.define_split('tile_oh', oh, num_outputs=2)
+owo, owi = cfg.define_split('tile_ow', ow, num_outputs=2)
+
+cfg.define_reorder('reorder_conv',
+   [n, oho, owo, oco, kh, kw, ic, ohi, owi, oci],
+   policy='candidate', candidate=[
+   [n, oho, owo, oco, kh, kw, ic, ohi, owi, oci],
+   [n, oho, owo, oco, ohi, kh, kw, ic, owi, oci],
+   [n, oho, owo, oco, ohi, kh, kw, owi, ic, oci],
+   [n, oho, owo, ohi, oco, kh, kw, owi, ic, oci]])
+
+cfg.define_annotate("ann_reduce", [kh, kw], policy='try_unroll')
+cfg.define_annotate("ann_spatial", [ohi, owi, oci], 
policy='try_unroll_vec')
+# 
+
+OCI = cfg['tile_co'].size[-1]
+OHI = cfg['tile_oh'].size[-1]
+OWI = cfg['tile_ow'].size[-1]
+OCO = OC // OCI
+OHO = OH // OHI
+OWO = OW // OWI
+
+kvshape = (OCO, KH, KW, IC, OCI)
+ovshape = (N, OHO, OWO, OCO, OHI, OWI, OCI)
+oshape = (N, OH, OW, OC)
+
+if dilation_h != 1 or dilation_w != 1:
+# undilate input data
+dvshape = (N, OHO, OWO, KH, KW, IC, OHI, OWI)
+data_vec = tvm.compute(dvshape, lambda n, oho, owo, kh, kw, ic, ohi, 
owi:
+   data_pad[n][(oho*OHI+ohi)*HSTR+kh*dilation_h]
+   [(owo*OWI+owi)*WSTR+kw*dilation_w][ic],
+   name='data_vec_undilated')
+else:
+dvshape = (N, OHO, OWO, KH + (OHI-1)*HSTR, KW + (OWI-1)*WSTR, IC)
+data_vec = tvm.compute(dvshape, lambda n, oho, owo, ohi, owi, ic:
+   
data_pad[n][oho*OHI*HSTR+ohi][owo*OWI*WSTR+owi][ic],
+   name='data_vec')
+kernel_vec = tvm.compute(kvshape, lambda oco, kh, kw, ic, oci: \
+ kernel[kh][kw][ic][oco*OCI+oci],
+ name='kernel_vec')
+
+ic = tvm.reduce_axis((0, IC), name='ic')
+kh = tvm.reduce_axis((0, KH), name='kh')
+kw = tvm.reduce_axis((0, KW), name='kw')
+
+if dilation_h != 1 or dilation_w != 1:
+conv = tvm.compute(ovshape, lambda n, oho, owo, oco, ohi, owi, oci: \
+tvm.sum(data_vec[n, oho, owo, kh, kw, ohi, owi, 
ic].astype(out_dtype) *
+kernel_vec[oco, kh, kw, ic, oci].astype(out_dtype),
+axis=[ic, kh, kw]), name='conv')
+else:
+conv = tvm.compute(ovshape, lambda n, oho, owo, oco, ohi, owi, oci: \
+tvm.sum(data_vec[n, oho, owo, ohi*HSTR+kh, owi*WSTR+kw, 
ic].astype(out_dtype) *
+kernel_vec[oco, kh, kw, ic, oci].astype(out_dtype),
+axis=[ic, kh, kw]), name='conv')
+
+output = tvm.compute(oshape, lambda n, oho, owo, oc:
+ 
conv[n][oho//OHI][owo//OWI][oc//OCI][oho%OHI][owo%OWI][oc%OCI],
+ name='output_unpack', tag='spatial_conv_output_NHWC')
+return output
+
+def schedule_conv2d_spatial_pack_nhwc(cfg, s, op, output):
+"""Spatial Pack schedule for Conv2d NHWC"""
+unpack = op.output(0)
+conv = unpack.op.input_tensors[0]
+data_vec = 

[GitHub] [incubator-tvm] liangfu commented on issue #4392: [VTA] Enable streamlined GEMM execution

2019-11-21 Thread GitBox
liangfu commented on issue #4392: [VTA] Enable streamlined GEMM execution
URL: https://github.com/apache/incubator-tvm/pull/4392#issuecomment-557371295
 
 
   This PR doesn't intend to reduce cycle count, or any performance improvement.
   
   My major intention is to bring successful evaluation of 
`matrix_multiply_opt.py` and `convolution_opt.py` scripts, so that we can get 
closer to bring end-to-end support in evaluating resnet18. The reason the 
evaluation of these scripts failed previously is that 
   
   > This PR fixed an issue in the streamlined GEMM execution by disabling 
pipelined adder, which consumes 4 cycles (in case of LOG_BLOCK=4) in addition 
to the single-cycle fused multiplier-adder. This is much longer than the 
4-stage streamline design in the TensorGemm module.
   
   Here are the benchmarks from Intel's Timing Analyzer (some entries still 
need to be updated)
   
   | design | area (in ALMs) | fmax (1100mV,  slow 100C) | fmax (1100mV,  slow 
-40C) | fmax (1100mV,  fast 100C) | fmax (1100mV,  fast -40C) | cycle count |
   | -- | -- | -- | -- | -- | -- | -- |
   | PipeAdderX4 | -- | -- | -- | -- | -- | -- |
   | PipeAdderX2 AdderX2 | -- | -- | -- | -- | -- | -- |
   | AdderX4 | 18,186/41,910 (43%) | 60.72 MHz | 58.82 MHz | 92.43 MHz | 114.97 
MHz | -- |
   
   


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] minminsun commented on a change in pull request #4234: Auto TensorCore CodeGen

2019-11-21 Thread GitBox
minminsun commented on a change in pull request #4234: Auto TensorCore CodeGen
URL: https://github.com/apache/incubator-tvm/pull/4234#discussion_r349418871
 
 

 ##
 File path: src/pass/tensor_core.cc
 ##
 @@ -0,0 +1,1247 @@
+/*
+ * 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.
+ */
+
+/*!
+ *  Copyright (c) 2019 by Contributors
+ * \file tensor_core.cc
+ */
+// IR Passes for TensorCore CodeGen
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "ir_util.h"
+#include "../arithmetic/compute_expr.h"
+#include "../runtime/thread_storage_scope.h"
+
+namespace tvm {
+namespace ir {
+
+using runtime::StorageRank;
+using runtime::StorageScope;
+using runtime::ThreadScope;
+using intrinsic::tvm_address_of;
+
+struct Tile {
+  int m{-1};
+  int n{-1};
+  int k{-1};
+};
+
+std::string simplify_name(std::string input) {
+  auto pos = input.find(".");
+  if (pos != std::string::npos) {
+return input.substr(0, pos);
+  } else {
+return input;
+  }
+}
+
+// MMAMatcher matches C = Cast(A)*Cast(B)+C,
+// where A & B are fp16/int8 local buffers,
+// and C is fp32/int32 local buffer.
+class MMAMatcher: public IRVisitor {
+ public:
+  explicit MMAMatcher(Map extern_buffer,
+  double cuda_compute_capability, double cuda_version) {
+for (auto kv : extern_buffer) {
+  BufferInfo bi;
+  bi.name = kv.second->name;
+  bi.dtype = kv.second->dtype;
+  bi.external = true;
+  buf_map_[TensorKey{kv.first->op, kv.first->value_index}] = bi;
+}
+// Int wmma is supported when cuda version >= 10.0 && cuda arch >= 720
+if (cuda_compute_capability >= 7.20 && cuda_version >= 10.0) {
+  support_int_wmma_ = true;
+}
+  }
+  using IRVisitor::Visit_;
+
+  void Visit_(const AttrStmt* op) final {
+if (op->attr_key == attr::pragma_tensor_core) {
+  tensor_core_on_ = true;
+  IRVisitor::Visit_(op);
+} else if (op->attr_key == attr::realize_scope) {
+  storage_scope_[op->node.get()] = op->value.as()->value;
+  Visit(op->body);
+} else {
+  IRVisitor::Visit_(op);
+}
+  }
+
+  void Visit_(const Provide* op) final {
+IRVisitor::Visit_(op);
+auto it = buf_map_.find(TensorKey{op->func, op->value_index});
+if (it == buf_map_.end()) {
+  return;
+}
+const BufferInfo& bi = it->second;
+if (bi.released) {
+  return;
+}
+if (tensor_core_on_ && mma_sync_match_(op, bi)) {
+  matched_ = true;
+}
+  }
+
+  void Visit_(const Realize* op) final {
+TensorKey key{op->func, op->value_index};
+if (buf_map_.count(key)) {
+  if (!buf_map_.at(key).external) {
+return;
+  }
+  Visit(op->body);
+} else {
+  BufferInfo bi;
+  bi.name = key.GetName();
+  bi.dtype = op->type;
+  buf_map_[key] = bi;
+  Visit(op->body);
+  buf_map_[key].released = true;
+}
+  }
+
+  inline bool Matched() const {return matched_;}
+
+  friend class ScheduleAnalyser;
+  friend class BufferAnalyser;
+
+ private:
+  struct BufferInfo {
+std::string name;
+Type dtype;
+bool external{false};
+bool released{false};
+bool same_as(const BufferInfo ) {
+  if (this->dtype != bi.dtype) return false;
+  if (this->name != bi.name) return false;
+  if (this->external != bi.external) return false;
+  if (this->released != bi.released) return false;
+  return true;
+}
+  };
+
+  // Check whether the storage scope is local
+  bool check_local_buffer_(const Call* op, BufferInfo* bi) {
+if (op->call_type == Call::Halide) {
+  auto it = storage_scope_.find(op->func.get());
+  if (it == storage_scope_.end()) {
+return false;
+  }
+  const std::string& strkey = it->second;
+  if (strkey != "local") {
+return false;
+  }
+  auto it1 = buf_map_.find(TensorKey{op->func, op->value_index});
+  if (it1 == buf_map_.end()) {
+return false;
+  }
+  *bi = it1->second;
+  if (bi->released) {
+return false;
+  }
+  return true;
+}
+return false;
+  }
+
+  // Do the pattern matching
+  bool mma_sync_match_(const Provide* op, 

[incubator-tvm] branch master updated (4b2c4c3 -> 030a163)

2019-11-21 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 4b2c4c3  Update Jenkinsfile for external runtime (#4396)
 add 030a163  update_document_after_repository_renamed (#4398)

No new revisions were added by this update.

Summary of changes:
 apps/sgx/README.md| 2 +-
 docs/deploy/index.rst | 2 +-
 docs/install/docker.rst   | 2 +-
 docs/install/from_source.rst  | 2 +-
 docs/install/nnpack.md| 2 +-
 docs/vta/install.md   | 2 +-
 nnvm/tutorials/deploy_model_on_mali_gpu.py| 2 +-
 nnvm/tutorials/deploy_model_on_rasp.py| 2 +-
 tutorials/cross_compilation_and_rpc.py| 2 +-
 tutorials/frontend/deploy_model_on_android.py | 2 +-
 tutorials/frontend/deploy_model_on_rasp.py| 2 +-
 vta/apps/tsim_example/README.md   | 2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)



[GitHub] [incubator-tvm] gittripley opened a new pull request #4398: update_document_after_repository_renamed

2019-11-21 Thread GitBox
gittripley opened a new pull request #4398: 
update_document_after_repository_renamed
URL: https://github.com/apache/incubator-tvm/pull/4398
 
 
   Thanks for contributing to TVM!   Please refer to guideline 
https://docs.tvm.ai/contribute/ for useful information and tips. After the pull 
request is submitted, please request code reviews from 
[Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers)
 by @ them in the pull request thread.
   


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 #4397: Use the best tuner possible

2019-11-21 Thread GitBox
vmiheer commented on issue #4397: Use the best tuner possible
URL: https://github.com/apache/incubator-tvm/pull/4397#issuecomment-557337992
 
 
   Also I think installing xgboost is not hard. 
   
   On Thu, Nov 21, 2019 at 5:46 PM miheer vaidya  wrote:
   
   > But then I guess the instructions needs updating. There is comment and
   > instruction to install xgboost.
   >
   > On Thu, Nov 21, 2019 at 3:54 PM Cody Yu  wrote:
   >
   >> I think the reason of using the random tuner as an example is because it
   >> doesn't require XGBoost to be installed in the system.
   >>
   >> —
   >> You are receiving this because you authored the thread.
   >> Reply to this email directly, view it on GitHub
   >> 
,
   >> or unsubscribe
   >> 

   >> .
   >>
   > --
   > Thanking you,
   > +miheer
   >
   -- 
   Thanking you,
   +miheer
   


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 #4397: Use the best tuner possible

2019-11-21 Thread GitBox
vmiheer commented on issue #4397: Use the best tuner possible
URL: https://github.com/apache/incubator-tvm/pull/4397#issuecomment-557337675
 
 
   But then I guess the instructions needs updating. There is comment and
   instruction to install xgboost.
   
   On Thu, Nov 21, 2019 at 3:54 PM Cody Yu  wrote:
   
   > I think the reason of using the random tuner as an example is because it
   > doesn't require XGBoost to be installed in the system.
   >
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > 
,
   > or unsubscribe
   > 

   > .
   >
   -- 
   Thanking you,
   +miheer
   


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 (122a493 -> 4b2c4c3)

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

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


from 122a493  [Relay][VM] Clean up the VM and VM profiler code (#4391)
 add 4b2c4c3  Update Jenkinsfile for external runtime (#4396)

No new revisions were added by this update.

Summary of changes:
 Jenkinsfile | 4 
 1 file changed, 4 insertions(+)



[GitHub] [incubator-tvm] zhiics merged pull request #4396: Update Jenkinsfile for external runtime

2019-11-21 Thread GitBox
zhiics merged pull request #4396: Update Jenkinsfile for external runtime
URL: https://github.com/apache/incubator-tvm/pull/4396
 
 
   


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] gittripley removed a comment on issue #4376: correct the instructions/scripts after repository name is changed to incubator-tvm

2019-11-21 Thread GitBox
gittripley removed a comment on issue #4376: correct the instructions/scripts 
after repository name is changed to incubator-tvm
URL: https://github.com/apache/incubator-tvm/issues/4376#issuecomment-557330962
 
 
   @tqchen 
   It looks like I don't have the permission to raise PR.
   
   ```
   Username for 'https://github.com': gittripley
   Password for 'https://gittrip...@github.com':
   remote: Permission to apache/incubator-tvm.git denied to gittripley.
   fatal: unable to access 'https://github.com/apache/incubator-tvm.git/': The 
requested URL returned error: 403
   ```


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] gittripley commented on issue #4376: correct the instructions/scripts after repository name is changed to incubator-tvm

2019-11-21 Thread GitBox
gittripley commented on issue #4376: correct the instructions/scripts after 
repository name is changed to incubator-tvm
URL: https://github.com/apache/incubator-tvm/issues/4376#issuecomment-557330962
 
 
   @tqchen 
   It looks like I don't have the permission to raise PR.
   
   ```
   Username for 'https://github.com': gittripley
   Password for 'https://gittrip...@github.com':
   remote: Permission to apache/incubator-tvm.git denied to gittripley.
   fatal: unable to access 'https://github.com/apache/incubator-tvm.git/': The 
requested URL returned error: 403
   ```


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 commented on issue #4259: [DEV][DRAFT] TVM v0.6 Release candidate

2019-11-21 Thread GitBox
yzhliu commented on issue #4259: [DEV][DRAFT] TVM v0.6 Release candidate
URL: https://github.com/apache/incubator-tvm/issues/4259#issuecomment-557329901
 
 
   I have created v0.6.0 branch. I'm about to update the release notes.


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 v0.6.0 created (now 122a493)

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

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


  at 122a493  [Relay][VM] Clean up the VM and VM profiler code (#4391)

No new revisions were added by this update.



[GitHub] [incubator-tvm] zhiics commented on issue #4391: [Relay][VM] Clean up the VM and VM profiler code

2019-11-21 Thread GitBox
zhiics commented on issue #4391: [Relay][VM] Clean up the VM and VM profiler 
code
URL: https://github.com/apache/incubator-tvm/pull/4391#issuecomment-557326856
 
 
   Thanks @icemelon9 @wweic 


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 (1562eae -> 122a493)

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

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


from 1562eae  [TOPI] Fix flaky testcase for floor div (#4382)
 add 122a493  [Relay][VM] Clean up the VM and VM profiler code (#4391)

No new revisions were added by this update.

Summary of changes:
 include/tvm/runtime/vm.h  | 326 --
 python/tvm/relay/backend/profiler_vm.py   |  58 +---
 python/tvm/relay/backend/vm.py|  72 -
 src/relay/backend/vm/profiler/compiler.cc |  50 
 src/runtime/vm/executable.cc  |  65 +++--
 src/runtime/vm/profiler/vm.cc |  46 ++-
 src/runtime/vm/profiler/vm.h  |  14 +-
 src/runtime/vm/vm.cc  | 198 ++---
 tests/python/relay/test_vm.py |  46 +--
 tests/python/relay/test_vm_serialization.py   |   6 +-
 tests/python/unittest/test_runtime_vm_profiler.py |   2 +-
 11 files changed, 437 insertions(+), 446 deletions(-)
 delete mode 100644 src/relay/backend/vm/profiler/compiler.cc



[GitHub] [incubator-tvm] zhiics merged pull request #4391: [Relay][VM] Clean up the VM and VM profiler code

2019-11-21 Thread GitBox
zhiics merged pull request #4391: [Relay][VM] Clean up the VM and VM profiler 
code
URL: https://github.com/apache/incubator-tvm/pull/4391
 
 
   


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 closed issue #4378: [TESTS][FLAKY] test_floor_divide

2019-11-21 Thread GitBox
yzhliu closed issue #4378: [TESTS][FLAKY] test_floor_divide
URL: https://github.com/apache/incubator-tvm/issues/4378
 
 
   


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 #4382: [TOPI] Fix flaky testcase for floor div

2019-11-21 Thread GitBox
yzhliu merged pull request #4382: [TOPI] Fix flaky testcase for floor div
URL: https://github.com/apache/incubator-tvm/pull/4382
 
 
   


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 (0cfa3a8 -> 1562eae)

2019-11-21 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 0cfa3a8  Add Logan to reviewer (#4390)
 add 1562eae  [TOPI] Fix flaky testcase for floor div (#4382)

No new revisions were added by this update.

Summary of changes:
 topi/tests/python/test_topi_broadcast.py | 49 +++-
 1 file changed, 29 insertions(+), 20 deletions(-)



[GitHub] [incubator-tvm] yzhliu commented on issue #4382: [TOPI] Fix flaky testcase for floor div

2019-11-21 Thread GitBox
yzhliu commented on issue #4382: [TOPI] Fix flaky testcase for floor div
URL: https://github.com/apache/incubator-tvm/pull/4382#issuecomment-557322004
 
 
   I merged. Thanks @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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] comaniac commented on issue #4397: Use the best tuner possible

2019-11-21 Thread GitBox
comaniac commented on issue #4397: Use the best tuner possible
URL: https://github.com/apache/incubator-tvm/pull/4397#issuecomment-557309203
 
 
   I think the reason of using the random tuner as an example is because it 
doesn't require XGBoost to be installed in the system.


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 #4397: Use the best tuner possible

2019-11-21 Thread GitBox
vmiheer opened a new pull request #4397: Use the best tuner possible
URL: https://github.com/apache/incubator-tvm/pull/4397
 
 
   Maybe I am wrong but what's the point of using randomtuner when AutoTVM 
paper says XGBoost is the best? Please ignore this PR if you think otherwise .
   @tqchen, what do you think?
   


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] comaniac opened a new pull request #4396: Update Jenkinsfile for external runtime

2019-11-21 Thread GitBox
comaniac opened a new pull request #4396: Update Jenkinsfile for external 
runtime
URL: https://github.com/apache/incubator-tvm/pull/4396
 
 
   This PR updates the Jenkinsfile to enable the example external runtime for 
#4280 .


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 #4366: [DOCS] add benchmark log format doc

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4366: [DOCS] add benchmark log 
format doc
URL: https://github.com/apache/incubator-tvm/pull/4366#discussion_r349351309
 
 

 ##
 File path: docs/dev/benchmark.rst
 ##
 @@ -0,0 +1,112 @@
+..  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.
+
+
+**Benchmark Performance Log Format**
+
+This page details schema v0.1 for a unified benchmark log format. This schema 
will allow easier cross-references with other frameworks/runs, experiment 
reproduction, data for nightly perf regression, and the separation of 
logging/visualization efforts.
+
+***
+Log Format Overview
+***
+
++---++--+--+
+| header| examples 

  | category | notes/justification  
|
++===++==+==+
+| timestamp | 1572282699.6 

  | metadata | indicates when this record is logged 
|
++---++--+--+
+| schema\_version   | 0.1  

  | metadata | ensure reproducibility as we iterate on 
this schema  |
++---++--+--+
+| metadata  | { "docker\_tag":"gcr.io/.../0a680", ... }

  | metadata | ``docker_tag`` is required   
|
++---++--+--+
+| workload  | resnet-18

  | workload | name of workload 
|
++---++--+--+
+| workload\_args| {“input\_name”: "Input3", “input\_shape”: 
[list\_of\_shape], “data\_layout”: NHCW}
 | workload |   
   |

[GitHub] [incubator-tvm] tqchen commented on a change in pull request #4366: [DOCS] add benchmark log format doc

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4366: [DOCS] add benchmark log 
format doc
URL: https://github.com/apache/incubator-tvm/pull/4366#discussion_r349351392
 
 

 ##
 File path: docs/dev/benchmark.rst
 ##
 @@ -0,0 +1,112 @@
+..  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.
+
+
+**Benchmark Performance Log Format**
+
+This page details schema v0.1 for a unified benchmark log format. This schema 
will allow easier cross-references with other frameworks/runs, experiment 
reproduction, data for nightly perf regression, and the separation of 
logging/visualization efforts.
+
+***
+Log Format Overview
+***
+
++---++--+--+
+| header| examples 

  | category | notes/justification  
|
++===++==+==+
+| timestamp | 1572282699.6 

  | metadata | indicates when this record is logged 
|
++---++--+--+
+| schema\_version   | 0.1  

  | metadata | ensure reproducibility as we iterate on 
this schema  |
++---++--+--+
+| metadata  | { "docker\_tag":"gcr.io/.../0a680", ... }

  | metadata | ``docker_tag`` is required   
|
++---++--+--+
+| workload  | resnet-18

  | workload | name of workload 
|
++---++--+--+
+| workload\_args| {“input\_name”: "Input3", “input\_shape”: 
[list\_of\_shape], “data\_layout”: NHCW}
 | workload |   
   |

[GitHub] [incubator-tvm] tqchen commented on a change in pull request #4366: [DOCS] add benchmark log format doc

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4366: [DOCS] add benchmark log 
format doc
URL: https://github.com/apache/incubator-tvm/pull/4366#discussion_r349350648
 
 

 ##
 File path: docs/dev/benchmark.rst
 ##
 @@ -0,0 +1,112 @@
+..  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.
+
+
+**Benchmark Performance Log Format**
 
 Review comment:
   Remove the double star, as it will make the entry bold in the generated 
index as well.


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] tmoreau89 commented on issue #4392: [VTA] Enable streamlined GEMM execution

2019-11-21 Thread GitBox
tmoreau89 commented on issue #4392: [VTA] Enable streamlined GEMM execution
URL: https://github.com/apache/incubator-tvm/pull/4392#issuecomment-557302374
 
 
   I second Luis' comments on reporting on the latency/throughput tradeoffs; 
@liangfu thank you for the PR, do you mind pushing the old and new VTA design 
through Intel or Xilinx P and report on fmax, area and cycle count (perhaps 
on one of the `conv2d` benchmarks)


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 commented on issue #4382: [TOPI] Fix flaky testcase for floor div

2019-11-21 Thread GitBox
yzhliu commented on issue #4382: [TOPI] Fix flaky testcase for floor div
URL: https://github.com/apache/incubator-tvm/pull/4382#issuecomment-557300741
 
 
   @tqchen please review again. sorry i was quite occupied this morning.


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 edited a comment on issue #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-21 Thread GitBox
tqchen edited a comment on issue #4280: [TVM][RUNTIME] A minimum example to 
generate external library wrappers for DSOModule
URL: https://github.com/apache/incubator-tvm/pull/4280#issuecomment-557300395
 
 
   @comaniac please send another PR first with the updated Jenkinsfile. For 
security reasons CI will only respect Jenkinsfile that is already in master


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 #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-21 Thread GitBox
tqchen commented on issue #4280: [TVM][RUNTIME] A minimum example to generate 
external library wrappers for DSOModule
URL: https://github.com/apache/incubator-tvm/pull/4280#issuecomment-557300395
 
 
   @comaniac please send another PR first with the updated Jenkinsfile. CI will 
only respect Jenkinsfile that is already in master


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] junrushao1994 commented on a change in pull request #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
junrushao1994 commented on a change in pull request #4346: [Runtime] Make 
ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349340244
 
 

 ##
 File path: src/runtime/container.cc
 ##
 @@ -0,0 +1,37 @@
+/*
+ * 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 src/runtime/container.cc
+ * \brief POD container type implementations.
+ */
+#include 
+#include 
+
+#include 
+
+#include "object_internal.h"
+#include "runtime_base.h"
+
+namespace tvm {
+namespace runtime {
+
+ADT ADT::Tuple(std::vector fields) { return ADT(0, fields); }
 
 Review comment:
   move it to header?


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] junrushao1994 commented on a change in pull request #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
junrushao1994 commented on a change in pull request #4346: [Runtime] Make 
ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349348399
 
 

 ##
 File path: include/tvm/runtime/container.h
 ##
 @@ -0,0 +1,259 @@
+/*
+ * 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/container.h
+ * \brief Common POD(plain old data) container types.
+ */
+#ifndef TVM_RUNTIME_CONTAINER_H_
+#define TVM_RUNTIME_CONTAINER_H_
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+namespace tvm {
+namespace runtime {
+
+/*!
+ * \brief Base template for classes with array like memory layout.
+ *
+ *It provides general methods to access the memory. The memory
+ *layout is ArrayType + [ElemType]. The alignment of ArrayType
+ *and ElemType is handled by the memory allocator.
+ *
+ * \tparam ArrayType
+ * \tparam ElemType
+ */
+template 
+class InplaceArrayBase {
+ public:
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \tparam Iterator Iterator type of the array.
+   * \param begin The begin iterator.
+   * \param end The end iterator.
+   */
+  template 
+  void assign(Iterator begin, Iterator end) {
+size_t num_elems = std::distance(begin, end);
+auto it = begin;
+for (size_t i = 0; i < num_elems; ++i) {
+  void* field_ptr = AddressOf(i);
+  new (field_ptr) ElemType(*it);
+  ++it;
+}
+Self()->set_size(num_elems);
+  }
+
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \param init The initializer list of elements.
+   */
+  void assign(std::initializer_list init) {
+assign(init.begin(), init.end());
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Const reference to ElemType at the index.
+   */
+  const ElemType& operator[](size_t idx) const {
+size_t size = Self()->size();
+CHECK_LT(idx, size) << "Index " << idx << " out of bounds " << size << 
"\n";
+return *(reinterpret_cast(AddressOf(idx)));
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Reference to ElemType at the index.
+   */
+  ElemType& operator[](size_t idx) { return this->operator[](idx); }
+
+  /*!
+   * \brief Push a value to the end of the array.
+   *
+   * \param val The value to be added.
+   */
+  void push_back(const ElemType& val) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+(*this)[size] = val;
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Construct a value in the end of the array.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param args Arguments used to construct the new value.
+   */
+  template 
+  void emplace_back(Args&&... args) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+EmplaceInit(size, std::forward(args)...);
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Destroy the Inplace Array Base object
+   */
+  ~InplaceArrayBase() {
+if (!IsPOD()) {
+  size_t size = Self()->size();
+  for (size_t i = 0; i < size; ++i) {
+ElemType* fp = reinterpret_cast(AddressOf(i));
+fp->ElemType::~ElemType();
+  }
+}
+  }
+
+ protected:
+  /*!
+   * \brief Construct a value in place with the arguments.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param idx Index of the element.
+   * \param args Arguments to construct the new value.
+   */
+  template 
+  void EmplaceInit(size_t idx, Args&&... args) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity()) << "InplaceArray out of capacity\n";
+void* field_ptr = AddressOf(size);
+new (field_ptr) ElemType(std::forward(args)...);
+Self()->set_size(size + 1);
+  }
+
+ private:
+  /*!
+   * \brief If the ElemType is Plain Old Data.
+   */
+  inline bool IsPOD() const {
+return std::is_standard_layout::value &&
+   std::is_trivial::value;
+  }
+
+  /*!
+   * \brief Return the self object for the array.
+   *
+   * \return Pointer to ArrayType.
+   */
+  inline ArrayType* Self() const {
+return 

[GitHub] [incubator-tvm] junrushao1994 commented on a change in pull request #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
junrushao1994 commented on a change in pull request #4346: [Runtime] Make 
ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349348675
 
 

 ##
 File path: include/tvm/runtime/memory.h
 ##
 @@ -73,6 +74,26 @@ class ObjAllocatorBase {
 ptr->deleter_ = Handler::Deleter();
 return ObjectPtr(ptr);
   }
+
+  /*!
+   * \tparam ArrayType The type to be allocated.
+   * \tparam ElemType The type of array element.
+   * \tparam Args The constructor signature.
+   * \param num_elems The number of array elements.
+   * \param args The arguments.
+   */
+  template
+  inline ObjectPtr make_inplace_array(size_t num_elems, Args&&... 
args) {
+using Handler = typename Derived::template Handler;
+static_assert(std::is_base_of::value,
+  "make_node can only be used to create NodeBase");
 
 Review comment:
   Hmmm i am not sure if the error message is proper


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] junrushao1994 commented on a change in pull request #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
junrushao1994 commented on a change in pull request #4346: [Runtime] Make 
ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349348121
 
 

 ##
 File path: include/tvm/runtime/container.h
 ##
 @@ -0,0 +1,259 @@
+/*
+ * 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/container.h
+ * \brief Common POD(plain old data) container types.
+ */
+#ifndef TVM_RUNTIME_CONTAINER_H_
+#define TVM_RUNTIME_CONTAINER_H_
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+namespace tvm {
+namespace runtime {
+
+/*!
+ * \brief Base template for classes with array like memory layout.
+ *
+ *It provides general methods to access the memory. The memory
+ *layout is ArrayType + [ElemType]. The alignment of ArrayType
+ *and ElemType is handled by the memory allocator.
+ *
+ * \tparam ArrayType
+ * \tparam ElemType
+ */
+template 
+class InplaceArrayBase {
+ public:
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \tparam Iterator Iterator type of the array.
+   * \param begin The begin iterator.
+   * \param end The end iterator.
+   */
+  template 
+  void assign(Iterator begin, Iterator end) {
+size_t num_elems = std::distance(begin, end);
+auto it = begin;
+for (size_t i = 0; i < num_elems; ++i) {
+  void* field_ptr = AddressOf(i);
+  new (field_ptr) ElemType(*it);
+  ++it;
+}
+Self()->set_size(num_elems);
+  }
+
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \param init The initializer list of elements.
+   */
+  void assign(std::initializer_list init) {
+assign(init.begin(), init.end());
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Const reference to ElemType at the index.
+   */
+  const ElemType& operator[](size_t idx) const {
+size_t size = Self()->size();
+CHECK_LT(idx, size) << "Index " << idx << " out of bounds " << size << 
"\n";
+return *(reinterpret_cast(AddressOf(idx)));
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Reference to ElemType at the index.
+   */
+  ElemType& operator[](size_t idx) { return this->operator[](idx); }
+
+  /*!
+   * \brief Push a value to the end of the array.
+   *
+   * \param val The value to be added.
+   */
+  void push_back(const ElemType& val) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+(*this)[size] = val;
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Construct a value in the end of the array.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param args Arguments used to construct the new value.
+   */
+  template 
+  void emplace_back(Args&&... args) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+EmplaceInit(size, std::forward(args)...);
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Destroy the Inplace Array Base object
+   */
+  ~InplaceArrayBase() {
+if (!IsPOD()) {
+  size_t size = Self()->size();
+  for (size_t i = 0; i < size; ++i) {
+ElemType* fp = reinterpret_cast(AddressOf(i));
+fp->ElemType::~ElemType();
+  }
+}
+  }
+
+ protected:
+  /*!
+   * \brief Construct a value in place with the arguments.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param idx Index of the element.
+   * \param args Arguments to construct the new value.
+   */
+  template 
+  void EmplaceInit(size_t idx, Args&&... args) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity()) << "InplaceArray out of capacity\n";
+void* field_ptr = AddressOf(size);
+new (field_ptr) ElemType(std::forward(args)...);
+Self()->set_size(size + 1);
+  }
+
+ private:
+  /*!
+   * \brief If the ElemType is Plain Old Data.
+   */
+  inline bool IsPOD() const {
 
 Review comment:
   Given this is not quite used, shall we move it to a constexpr inside 
destructor?


This is an automated message from the Apache Git Service.
To respond to the message, 

[GitHub] [incubator-tvm] tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject 
POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349347368
 
 

 ##
 File path: include/tvm/runtime/container.h
 ##
 @@ -0,0 +1,259 @@
+/*
+ * 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/container.h
+ * \brief Common POD(plain old data) container types.
+ */
+#ifndef TVM_RUNTIME_CONTAINER_H_
+#define TVM_RUNTIME_CONTAINER_H_
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+namespace tvm {
+namespace runtime {
+
+/*!
+ * \brief Base template for classes with array like memory layout.
+ *
+ *It provides general methods to access the memory. The memory
+ *layout is ArrayType + [ElemType]. The alignment of ArrayType
+ *and ElemType is handled by the memory allocator.
+ *
+ * \tparam ArrayType
+ * \tparam ElemType
+ */
+template 
+class InplaceArrayBase {
+ public:
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \tparam Iterator Iterator type of the array.
+   * \param begin The begin iterator.
+   * \param end The end iterator.
+   */
+  template 
+  void assign(Iterator begin, Iterator end) {
+size_t num_elems = std::distance(begin, end);
+auto it = begin;
+for (size_t i = 0; i < num_elems; ++i) {
+  void* field_ptr = AddressOf(i);
+  new (field_ptr) ElemType(*it);
+  ++it;
+}
+Self()->set_size(num_elems);
+  }
+
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \param init The initializer list of elements.
+   */
+  void assign(std::initializer_list init) {
+assign(init.begin(), init.end());
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Const reference to ElemType at the index.
+   */
+  const ElemType& operator[](size_t idx) const {
+size_t size = Self()->size();
+CHECK_LT(idx, size) << "Index " << idx << " out of bounds " << size << 
"\n";
+return *(reinterpret_cast(AddressOf(idx)));
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Reference to ElemType at the index.
+   */
+  ElemType& operator[](size_t idx) { return this->operator[](idx); }
+
+  /*!
+   * \brief Push a value to the end of the array.
+   *
+   * \param val The value to be added.
+   */
+  void push_back(const ElemType& val) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+(*this)[size] = val;
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Construct a value in the end of the array.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param args Arguments used to construct the new value.
+   */
+  template 
+  void emplace_back(Args&&... args) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+EmplaceInit(size, std::forward(args)...);
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Destroy the Inplace Array Base object
+   */
+  ~InplaceArrayBase() {
+if (!IsPOD()) {
+  size_t size = Self()->size();
+  for (size_t i = 0; i < size; ++i) {
+ElemType* fp = reinterpret_cast(AddressOf(i));
+fp->ElemType::~ElemType();
+  }
+}
+  }
+
+ protected:
+  /*!
+   * \brief Construct a value in place with the arguments.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param idx Index of the element.
+   * \param args Arguments to construct the new value.
+   */
+  template 
+  void EmplaceInit(size_t idx, Args&&... args) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity()) << "InplaceArray out of capacity\n";
+void* field_ptr = AddressOf(size);
+new (field_ptr) ElemType(std::forward(args)...);
+Self()->set_size(size + 1);
+  }
+
+ private:
+  /*!
+   * \brief If the ElemType is Plain Old Data.
+   */
+  inline bool IsPOD() const {
+return std::is_standard_layout::value &&
+   std::is_trivial::value;
 
 Review comment:
   we can use std::is_pod::value, and remove this function


This is an automated message from the 

[GitHub] [incubator-tvm] tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject 
POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349346811
 
 

 ##
 File path: src/runtime/vm/vm.cc
 ##
 @@ -921,7 +923,7 @@ void VirtualMachine::RunLoop() {
 CHECK(tuple != nullptr)
 << "Object is not data type object, register " << instr.object << 
", Object tag "
 << object->type_index();
-auto field = tuple->fields[instr.field_index];
+auto field = (*tuple)[instr.field_index];
 
 Review comment:
   Let us also overload operator[] in the ADT container class, so we can do 
tuple[instr.field_index]


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 #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
tqchen commented on issue #4346: [Runtime] Make ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-557298050
 
 
   @wweic Some further comments. I think we don't have to implement push_back 
and emplace_back at the base level as ADT are immutable, we just need to have 
easy tools to initialize an element(EmplaceInit) and can build the rest of the 
features in the sub-class on top of the base class.
   
   Thanks for the changes so far. Base data structure is a fundamental piece 
for the system, so we have to be extra picky in reviewing the code, but it is 
also rewarding and fun to build.
   


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 #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject 
POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349343168
 
 

 ##
 File path: include/tvm/runtime/container.h
 ##
 @@ -0,0 +1,259 @@
+/*
+ * 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/container.h
+ * \brief Common POD(plain old data) container types.
+ */
+#ifndef TVM_RUNTIME_CONTAINER_H_
+#define TVM_RUNTIME_CONTAINER_H_
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+namespace tvm {
+namespace runtime {
+
+/*!
+ * \brief Base template for classes with array like memory layout.
+ *
+ *It provides general methods to access the memory. The memory
+ *layout is ArrayType + [ElemType]. The alignment of ArrayType
+ *and ElemType is handled by the memory allocator.
+ *
+ * \tparam ArrayType
+ * \tparam ElemType
+ */
+template 
+class InplaceArrayBase {
+ public:
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \tparam Iterator Iterator type of the array.
+   * \param begin The begin iterator.
+   * \param end The end iterator.
+   */
+  template 
+  void assign(Iterator begin, Iterator end) {
+size_t num_elems = std::distance(begin, end);
+auto it = begin;
+for (size_t i = 0; i < num_elems; ++i) {
+  void* field_ptr = AddressOf(i);
+  new (field_ptr) ElemType(*it);
+  ++it;
+}
+Self()->set_size(num_elems);
+  }
+
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \param init The initializer list of elements.
+   */
+  void assign(std::initializer_list init) {
+assign(init.begin(), init.end());
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Const reference to ElemType at the index.
+   */
+  const ElemType& operator[](size_t idx) const {
+size_t size = Self()->size();
+CHECK_LT(idx, size) << "Index " << idx << " out of bounds " << size << 
"\n";
+return *(reinterpret_cast(AddressOf(idx)));
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Reference to ElemType at the index.
+   */
+  ElemType& operator[](size_t idx) { return this->operator[](idx); }
+
+  /*!
+   * \brief Push a value to the end of the array.
+   *
+   * \param val The value to be added.
+   */
+  void push_back(const ElemType& val) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+(*this)[size] = val;
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Construct a value in the end of the array.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param args Arguments used to construct the new value.
+   */
+  template 
+  void emplace_back(Args&&... args) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+EmplaceInit(size, std::forward(args)...);
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Destroy the Inplace Array Base object
+   */
+  ~InplaceArrayBase() {
+if (!IsPOD()) {
+  size_t size = Self()->size();
+  for (size_t i = 0; i < size; ++i) {
+ElemType* fp = reinterpret_cast(AddressOf(i));
+fp->ElemType::~ElemType();
+  }
+}
+  }
+
+ protected:
+  /*!
+   * \brief Construct a value in place with the arguments.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param idx Index of the element.
+   * \param args Arguments to construct the new value.
+   */
+  template 
+  void EmplaceInit(size_t idx, Args&&... args) {
 
 Review comment:
   Sorry I meant that EmplaceInit would be a protected function that initialize 
data at idx location. And we don't do any of the size change. it is meant to be 
used by other functions


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 #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject 
POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349345374
 
 

 ##
 File path: include/tvm/runtime/container.h
 ##
 @@ -0,0 +1,259 @@
+/*
+ * 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/container.h
+ * \brief Common POD(plain old data) container types.
+ */
+#ifndef TVM_RUNTIME_CONTAINER_H_
+#define TVM_RUNTIME_CONTAINER_H_
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+namespace tvm {
+namespace runtime {
+
+/*!
+ * \brief Base template for classes with array like memory layout.
+ *
+ *It provides general methods to access the memory. The memory
+ *layout is ArrayType + [ElemType]. The alignment of ArrayType
+ *and ElemType is handled by the memory allocator.
+ *
+ * \tparam ArrayType
+ * \tparam ElemType
+ */
+template 
+class InplaceArrayBase {
+ public:
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \tparam Iterator Iterator type of the array.
+   * \param begin The begin iterator.
+   * \param end The end iterator.
+   */
+  template 
+  void assign(Iterator begin, Iterator end) {
+size_t num_elems = std::distance(begin, end);
+auto it = begin;
+for (size_t i = 0; i < num_elems; ++i) {
+  void* field_ptr = AddressOf(i);
+  new (field_ptr) ElemType(*it);
+  ++it;
+}
+Self()->set_size(num_elems);
+  }
+
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \param init The initializer list of elements.
+   */
+  void assign(std::initializer_list init) {
+assign(init.begin(), init.end());
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Const reference to ElemType at the index.
+   */
+  const ElemType& operator[](size_t idx) const {
+size_t size = Self()->size();
+CHECK_LT(idx, size) << "Index " << idx << " out of bounds " << size << 
"\n";
+return *(reinterpret_cast(AddressOf(idx)));
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Reference to ElemType at the index.
+   */
+  ElemType& operator[](size_t idx) { return this->operator[](idx); }
+
+  /*!
+   * \brief Push a value to the end of the array.
+   *
+   * \param val The value to be added.
+   */
+  void push_back(const ElemType& val) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+(*this)[size] = val;
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Construct a value in the end of the array.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param args Arguments used to construct the new value.
+   */
+  template 
+  void emplace_back(Args&&... args) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+EmplaceInit(size, std::forward(args)...);
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Destroy the Inplace Array Base object
+   */
+  ~InplaceArrayBase() {
+if (!IsPOD()) {
+  size_t size = Self()->size();
+  for (size_t i = 0; i < size; ++i) {
+ElemType* fp = reinterpret_cast(AddressOf(i));
+fp->ElemType::~ElemType();
+  }
+}
+  }
+
+ protected:
+  /*!
+   * \brief Construct a value in place with the arguments.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param idx Index of the element.
+   * \param args Arguments to construct the new value.
+   */
+  template 
+  void EmplaceInit(size_t idx, Args&&... args) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity()) << "InplaceArray out of capacity\n";
+void* field_ptr = AddressOf(size);
+new (field_ptr) ElemType(std::forward(args)...);
+Self()->set_size(size + 1);
+  }
+
+ private:
+  /*!
+   * \brief If the ElemType is Plain Old Data.
+   */
+  inline bool IsPOD() const {
+return std::is_standard_layout::value &&
+   std::is_trivial::value;
+  }
+
+  /*!
+   * \brief Return the self object for the array.
+   *
+   * \return Pointer to ArrayType.
+   */
+  inline ArrayType* Self() const {
+return 

[GitHub] [incubator-tvm] tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject 
POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349344721
 
 

 ##
 File path: include/tvm/runtime/container.h
 ##
 @@ -0,0 +1,259 @@
+/*
+ * 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/container.h
+ * \brief Common POD(plain old data) container types.
+ */
+#ifndef TVM_RUNTIME_CONTAINER_H_
+#define TVM_RUNTIME_CONTAINER_H_
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+namespace tvm {
+namespace runtime {
+
+/*!
+ * \brief Base template for classes with array like memory layout.
+ *
+ *It provides general methods to access the memory. The memory
+ *layout is ArrayType + [ElemType]. The alignment of ArrayType
+ *and ElemType is handled by the memory allocator.
+ *
+ * \tparam ArrayType
+ * \tparam ElemType
+ */
+template 
+class InplaceArrayBase {
+ public:
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \tparam Iterator Iterator type of the array.
+   * \param begin The begin iterator.
+   * \param end The end iterator.
+   */
+  template 
+  void assign(Iterator begin, Iterator end) {
+size_t num_elems = std::distance(begin, end);
+auto it = begin;
+for (size_t i = 0; i < num_elems; ++i) {
+  void* field_ptr = AddressOf(i);
+  new (field_ptr) ElemType(*it);
+  ++it;
+}
+Self()->set_size(num_elems);
+  }
+
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \param init The initializer list of elements.
+   */
+  void assign(std::initializer_list init) {
 
 Review comment:
   remove this function.


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 #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject 
POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349344080
 
 

 ##
 File path: include/tvm/runtime/container.h
 ##
 @@ -0,0 +1,259 @@
+/*
+ * 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/container.h
+ * \brief Common POD(plain old data) container types.
+ */
+#ifndef TVM_RUNTIME_CONTAINER_H_
+#define TVM_RUNTIME_CONTAINER_H_
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+namespace tvm {
+namespace runtime {
+
+/*!
+ * \brief Base template for classes with array like memory layout.
+ *
+ *It provides general methods to access the memory. The memory
+ *layout is ArrayType + [ElemType]. The alignment of ArrayType
+ *and ElemType is handled by the memory allocator.
+ *
+ * \tparam ArrayType
+ * \tparam ElemType
+ */
+template 
+class InplaceArrayBase {
+ public:
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \tparam Iterator Iterator type of the array.
+   * \param begin The begin iterator.
+   * \param end The end iterator.
+   */
+  template 
+  void assign(Iterator begin, Iterator end) {
+size_t num_elems = std::distance(begin, end);
+auto it = begin;
+for (size_t i = 0; i < num_elems; ++i) {
+  void* field_ptr = AddressOf(i);
+  new (field_ptr) ElemType(*it);
+  ++it;
+}
+Self()->set_size(num_elems);
+  }
+
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \param init The initializer list of elements.
+   */
+  void assign(std::initializer_list init) {
+assign(init.begin(), init.end());
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Const reference to ElemType at the index.
+   */
+  const ElemType& operator[](size_t idx) const {
+size_t size = Self()->size();
+CHECK_LT(idx, size) << "Index " << idx << " out of bounds " << size << 
"\n";
+return *(reinterpret_cast(AddressOf(idx)));
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Reference to ElemType at the index.
+   */
+  ElemType& operator[](size_t idx) { return this->operator[](idx); }
+
+  /*!
+   * \brief Push a value to the end of the array.
+   *
+   * \param val The value to be added.
+   */
+  void push_back(const ElemType& val) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+(*this)[size] = val;
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Construct a value in the end of the array.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param args Arguments used to construct the new value.
+   */
+  template 
 
 Review comment:
   remove the function, use EmplaceInit in the child class


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 #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject 
POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349344683
 
 

 ##
 File path: include/tvm/runtime/container.h
 ##
 @@ -0,0 +1,259 @@
+/*
+ * 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/container.h
+ * \brief Common POD(plain old data) container types.
+ */
+#ifndef TVM_RUNTIME_CONTAINER_H_
+#define TVM_RUNTIME_CONTAINER_H_
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+namespace tvm {
+namespace runtime {
+
+/*!
+ * \brief Base template for classes with array like memory layout.
+ *
+ *It provides general methods to access the memory. The memory
+ *layout is ArrayType + [ElemType]. The alignment of ArrayType
+ *and ElemType is handled by the memory allocator.
+ *
+ * \tparam ArrayType
+ * \tparam ElemType
+ */
+template 
+class InplaceArrayBase {
+ public:
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \tparam Iterator Iterator type of the array.
+   * \param begin The begin iterator.
+   * \param end The end iterator.
+   */
+  template 
+  void assign(Iterator begin, Iterator end) {
 
 Review comment:
   Assign should not be a public function because ADT and tuple are immutable. 
We can have an Init protected function, that calls into 
EmplaceInit(i, *it). Do not change the size as the set_size logic can 
be done in the child class


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 #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject 
POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349343957
 
 

 ##
 File path: include/tvm/runtime/container.h
 ##
 @@ -0,0 +1,259 @@
+/*
+ * 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/container.h
+ * \brief Common POD(plain old data) container types.
+ */
+#ifndef TVM_RUNTIME_CONTAINER_H_
+#define TVM_RUNTIME_CONTAINER_H_
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+namespace tvm {
+namespace runtime {
+
+/*!
+ * \brief Base template for classes with array like memory layout.
+ *
+ *It provides general methods to access the memory. The memory
+ *layout is ArrayType + [ElemType]. The alignment of ArrayType
+ *and ElemType is handled by the memory allocator.
+ *
+ * \tparam ArrayType
+ * \tparam ElemType
+ */
+template 
+class InplaceArrayBase {
+ public:
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \tparam Iterator Iterator type of the array.
+   * \param begin The begin iterator.
+   * \param end The end iterator.
+   */
+  template 
+  void assign(Iterator begin, Iterator end) {
+size_t num_elems = std::distance(begin, end);
+auto it = begin;
+for (size_t i = 0; i < num_elems; ++i) {
+  void* field_ptr = AddressOf(i);
+  new (field_ptr) ElemType(*it);
+  ++it;
+}
+Self()->set_size(num_elems);
+  }
+
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \param init The initializer list of elements.
+   */
+  void assign(std::initializer_list init) {
+assign(init.begin(), init.end());
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Const reference to ElemType at the index.
+   */
+  const ElemType& operator[](size_t idx) const {
+size_t size = Self()->size();
+CHECK_LT(idx, size) << "Index " << idx << " out of bounds " << size << 
"\n";
+return *(reinterpret_cast(AddressOf(idx)));
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Reference to ElemType at the index.
+   */
+  ElemType& operator[](size_t idx) { return this->operator[](idx); }
+
+  /*!
+   * \brief Push a value to the end of the array.
+   *
+   * \param val The value to be added.
+   */
+  void push_back(const ElemType& val) {
 
 Review comment:
   remove push_back, let us move it to the sub-class and can call EmplaceInit()


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 #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject 
POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349343497
 
 

 ##
 File path: include/tvm/runtime/container.h
 ##
 @@ -0,0 +1,259 @@
+/*
+ * 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/container.h
+ * \brief Common POD(plain old data) container types.
+ */
+#ifndef TVM_RUNTIME_CONTAINER_H_
+#define TVM_RUNTIME_CONTAINER_H_
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+namespace tvm {
+namespace runtime {
+
+/*!
+ * \brief Base template for classes with array like memory layout.
+ *
+ *It provides general methods to access the memory. The memory
+ *layout is ArrayType + [ElemType]. The alignment of ArrayType
+ *and ElemType is handled by the memory allocator.
+ *
+ * \tparam ArrayType
+ * \tparam ElemType
+ */
+template 
+class InplaceArrayBase {
+ public:
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \tparam Iterator Iterator type of the array.
+   * \param begin The begin iterator.
+   * \param end The end iterator.
+   */
+  template 
+  void assign(Iterator begin, Iterator end) {
+size_t num_elems = std::distance(begin, end);
+auto it = begin;
+for (size_t i = 0; i < num_elems; ++i) {
+  void* field_ptr = AddressOf(i);
+  new (field_ptr) ElemType(*it);
+  ++it;
+}
+Self()->set_size(num_elems);
+  }
+
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \param init The initializer list of elements.
+   */
+  void assign(std::initializer_list init) {
+assign(init.begin(), init.end());
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Const reference to ElemType at the index.
+   */
+  const ElemType& operator[](size_t idx) const {
+size_t size = Self()->size();
+CHECK_LT(idx, size) << "Index " << idx << " out of bounds " << size << 
"\n";
+return *(reinterpret_cast(AddressOf(idx)));
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Reference to ElemType at the index.
+   */
+  ElemType& operator[](size_t idx) { return this->operator[](idx); }
+
+  /*!
+   * \brief Push a value to the end of the array.
+   *
+   * \param val The value to be added.
+   */
+  void push_back(const ElemType& val) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+(*this)[size] = val;
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Construct a value in the end of the array.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param args Arguments used to construct the new value.
+   */
+  template 
+  void emplace_back(Args&&... args) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity());
+EmplaceInit(size, std::forward(args)...);
+Self()->set_size(size + 1);
+  }
+
+  /*!
+   * \brief Destroy the Inplace Array Base object
+   */
+  ~InplaceArrayBase() {
+if (!IsPOD()) {
+  size_t size = Self()->size();
+  for (size_t i = 0; i < size; ++i) {
+ElemType* fp = reinterpret_cast(AddressOf(i));
+fp->ElemType::~ElemType();
+  }
+}
+  }
+
+ protected:
+  /*!
+   * \brief Construct a value in place with the arguments.
+   *
+   * \tparam Args Type parameters of the arguments.
+   * \param idx Index of the element.
+   * \param args Arguments to construct the new value.
+   */
+  template 
+  void EmplaceInit(size_t idx, Args&&... args) {
+size_t size = Self()->size();
+CHECK_LT(size, Self()->capacity()) << "InplaceArray out of capacity\n";
+void* field_ptr = AddressOf(size);
+new (field_ptr) ElemType(std::forward(args)...);
+Self()->set_size(size + 1);
+  }
+
+ private:
+  /*!
+   * \brief If the ElemType is Plain Old Data.
+   */
+  inline bool IsPOD() const {
 
 Review comment:
   Member functions does not have to contain the inline keyword, if the 
implementation is in the class body


This is an automated message from the Apache Git Service.
To respond to 

[GitHub] [incubator-tvm] tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject POD container type

2019-11-21 Thread GitBox
tqchen commented on a change in pull request #4346: [Runtime] Make ADTObject 
POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#discussion_r349343784
 
 

 ##
 File path: include/tvm/runtime/container.h
 ##
 @@ -0,0 +1,259 @@
+/*
+ * 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/container.h
+ * \brief Common POD(plain old data) container types.
+ */
+#ifndef TVM_RUNTIME_CONTAINER_H_
+#define TVM_RUNTIME_CONTAINER_H_
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+namespace tvm {
+namespace runtime {
+
+/*!
+ * \brief Base template for classes with array like memory layout.
+ *
+ *It provides general methods to access the memory. The memory
+ *layout is ArrayType + [ElemType]. The alignment of ArrayType
+ *and ElemType is handled by the memory allocator.
+ *
+ * \tparam ArrayType
+ * \tparam ElemType
+ */
+template 
+class InplaceArrayBase {
+ public:
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \tparam Iterator Iterator type of the array.
+   * \param begin The begin iterator.
+   * \param end The end iterator.
+   */
+  template 
+  void assign(Iterator begin, Iterator end) {
+size_t num_elems = std::distance(begin, end);
+auto it = begin;
+for (size_t i = 0; i < num_elems; ++i) {
+  void* field_ptr = AddressOf(i);
+  new (field_ptr) ElemType(*it);
+  ++it;
+}
+Self()->set_size(num_elems);
+  }
+
+  /*!
+   * \brief Replace the elements in the array.
+   *
+   * \param init The initializer list of elements.
+   */
+  void assign(std::initializer_list init) {
+assign(init.begin(), init.end());
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Const reference to ElemType at the index.
+   */
+  const ElemType& operator[](size_t idx) const {
+size_t size = Self()->size();
+CHECK_LT(idx, size) << "Index " << idx << " out of bounds " << size << 
"\n";
+return *(reinterpret_cast(AddressOf(idx)));
+  }
+
+  /*!
+   * \brief Access element at index
+   * \param idx The index of the element.
+   * \return Reference to ElemType at the index.
+   */
+  ElemType& operator[](size_t idx) { return this->operator[](idx); }
 
 Review comment:
   You will need to implement it, this code will results in a recursive call 
into the function itself, because of the signature(if the array is not const)


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] comaniac commented on issue #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-21 Thread GitBox
comaniac commented on issue #4280: [TVM][RUNTIME] A minimum example to generate 
external library wrappers for DSOModule
URL: https://github.com/apache/incubator-tvm/pull/4280#issuecomment-557295940
 
 
   Comment fixed.
   @tqchen somehow the CI doesn't update the config.cmake to enable the example 
runtime. Would you take a look when you get a chance? 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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] tqchen commented on issue #4382: [TOPI] Fix flaky testcase for floor div

2019-11-21 Thread GitBox
tqchen commented on issue #4382: [TOPI] Fix flaky testcase for floor div
URL: https://github.com/apache/incubator-tvm/pull/4382#issuecomment-557294283
 
 
   @yzhliu can you act on this? I think this is the last blocking item, then we 
can cut


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] kalcohol commented on issue #4371: ImportError: cannot import name 'bilinear_sample_nchw'

2019-11-21 Thread GitBox
kalcohol commented on issue #4371: ImportError: cannot import name 
'bilinear_sample_nchw'
URL: https://github.com/apache/incubator-tvm/issues/4371#issuecomment-557277103
 
 
   i know what is the mechanism of the occurrence, topi depends on tvm module, 
tvm module import this missing function for topi, but tvm itself can not find 
libtvm_topi.so or tvm_topi.dll, so when importing tvm.relay or topi directly, 
error occurs.
   
   but no pr idea now, as before.


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] u99127 commented on issue #4395: [Relay][Frontend][TFlite] Add test for qnn_mul operator

2019-11-21 Thread GitBox
u99127 commented on issue #4395: [Relay][Frontend][TFlite] Add test for qnn_mul 
operator
URL: https://github.com/apache/incubator-tvm/pull/4395#issuecomment-557273151
 
 
   @FrozenGene @anijain2305 , 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] u99127 commented on issue #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-21 Thread GitBox
u99127 commented on issue #4280: [TVM][RUNTIME] A minimum example to generate 
external library wrappers for DSOModule
URL: https://github.com/apache/incubator-tvm/pull/4280#issuecomment-557271412
 
 
   > @u99127 Thanks for your comment.
   
   Thanks @zhiics and @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


With regards,
Apache Git Services


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

2019-11-21 Thread GitBox
u99127 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_r349316135
 
 

 ##
 File path: CMakeLists.txt
 ##
 @@ -231,6 +231,12 @@ if(USE_VM_PROFILER)
   list(APPEND RUNTIME_SRCS ${RUNTIME_VM_PROFILER_SRCS})
 endif(USE_VM_PROFILER)
 
+if(USE_EXAMPLE_EXT_RUNTIME)
+  message(STATUS "Build with Relay VM profiler support...")
+  file(GLOB RUNTIME_EXAMPLE_EXTERNAL_SRCS 
src/runtime/contrib/exmaple_ext_runtime/*.cc)
 
 Review comment:
   example ? Instead of exmaple ?
   
   Message should say build with example external runtime and not relay vm 
profiler support .


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] kalcohol commented on issue #4371: ImportError: cannot import name 'bilinear_sample_nchw'

2019-11-21 Thread GitBox
kalcohol commented on issue #4371: ImportError: cannot import name 
'bilinear_sample_nchw'
URL: https://github.com/apache/incubator-tvm/issues/4371#issuecomment-557270702
 
 
   > @OriAlpha If I install `tvm`, `nnvm` and `topi` using `sudo python3 
setup.py install` I do not have to set anything to `LD_LIBRARY_PATH`.
   > But currently I have to do it. It is not right.
   > 
   > @tqchen This is obviously an issue
   
   yes, i miss this too in windows 10. the temp way that setting 
LD_LIBRARY_PATH could avoid this too(set PATH instead).
   
   but i agree with u, it's an issue, should be fix, should not be closed 
easily.
   
   releated issue: #3162 #4361 
   as a new to python, i do not know how to fix this in python's way directly, 
so i cannot pr a fix.


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 #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-21 Thread GitBox
tqchen 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_r349314949
 
 

 ##
 File path: src/runtime/contrib/exmaple_ext_runtime/example_ext_runtime.cc
 ##
 @@ -0,0 +1,338 @@
+/*
+ * 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 external_runtime_test.cc
+ * \brief Test an example runtime module to interpreting a json string.
+ *
+ * This is an exmaple runtime employed to show how we can interprete and 
execute
+ * a json string that represents a simple computational (sub)graph. Users will
+ * mainly need to implement four functions as follows:
+ *  - GetFunction. It is used to get the packed function from the json runtime
+ * module using a provided function name. This function returns a PackedFunc
+ * that can be directly invoked by feeding it with parameters.
+ *  - SaveToBinary. This function is used to achieve the serialization purpose.
+ * The emitted binary stream can be directly saved to disk so that users can
+ * load then back when needed.
+ *  - LoadFromFile. This is a static function that acts as a helper to create
+ * a json runtime module using a given json string. The json string could be
+ * conveniently loaded from the front-end and passed to this interface through
+ * PackedFunc.
+ *  - LoadFromBinary. This function uses binary stream to load the json that
+ * saved by SaveToBinary which essentially performs deserialization.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace tvm {
+namespace runtime {
+
+// A simple JSON node that contains multiple inputs and a single output.
+struct NodeEntry {
+  int id;
+  int output;
+  std::vector inputs;
+};
+
+/*!
+ * \brief The following 6 functions are examples for demonstration. Users need
+ * to provide their own API when they use the external library. The ones that
+ * accecpt TVMValue are wrappers used to bridge the PackedFunc and user-defined
+ * kernels.
+ */
+void Add_(float* a, int len_a, float* b, int len_b, float* c) {
+  for (int i = 0; i < len_a * len_b; i++) {
+c[i] = a[i] + b[i];
+  }
+}
+
+int Add(TVMValue* value, int* type_code, int nargs) {
+  CHECK_EQ(nargs, 3U) << "Expect 3 args, but get " << nargs << "\n";
+  DLTensor* arg0 = static_cast(value[0].v_handle);
+  DLTensor* arg1 = static_cast(value[1].v_handle);
+  DLTensor* out = static_cast(value[2].v_handle);
+  Add_(static_cast(arg0->data), arg0->shape[0],
+   static_cast(arg1->data), arg1->shape[0],
+   static_cast(out->data));
+  return 0;
+}
+
+void Sub_(float* a, int len_a, float* b, int len_b, float* c) {
+  for (int i = 0; i < len_a * len_b; i++) {
+c[i] = a[i] - b[i];
+  }
+}
+
+int Sub(TVMValue* value, int* type_code, int nargs) {
+  CHECK_EQ(nargs, 3U) << "Expect 3 args, but get " << nargs << "\n";
+  DLTensor* arg0 = static_cast(value[0].v_handle);
+  DLTensor* arg1 = static_cast(value[1].v_handle);
+  DLTensor* out = static_cast(value[2].v_handle);
+  Sub_(static_cast(arg0->data), arg0->shape[0],
+   static_cast(arg1->data), arg1->shape[0],
+   static_cast(out->data));
+  return 0;
+}
+
+void Mul_(float* a, int len_a, float* b, int len_b, float* c) {
+  for (int i = 0; i < len_a * len_b; i++) {
+c[i] = a[i] * b[i];
+  }
+}
+
+int Mul(TVMValue* value, int* type_code, int nargs) {
+  CHECK_EQ(nargs, 3U) << "Expect 3 args, but get " << nargs << "\n";
+  DLTensor* arg0 = static_cast(value[0].v_handle);
+  DLTensor* arg1 = static_cast(value[1].v_handle);
+  DLTensor* out = static_cast(value[2].v_handle);
+  Mul_(static_cast(arg0->data), arg0->shape[0],
+   static_cast(arg1->data), arg1->shape[0],
+   static_cast(out->data));
+  return 0;
+}
+
+/*!
+ * \brief The example json runtime module. Here we define a simple format for
+ * the computational graph using json for demonstration purpose. Users should
+ * customize their own format.
+ */
+class ExampleJsonModule : public ModuleNode {
+ public:
+  explicit ExampleJsonModule(std::string graph_json) {
+this->graph_json_ = graph_json;
+

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

2019-11-21 Thread GitBox
tqchen 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_r349314361
 
 

 ##
 File path: src/runtime/contrib/exmaple_ext_runtime/example_ext_runtime.cc
 ##
 @@ -0,0 +1,338 @@
+/*
+ * 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 external_runtime_test.cc
+ * \brief Test an example runtime module to interpreting a json string.
+ *
+ * This is an exmaple runtime employed to show how we can interprete and 
execute
+ * a json string that represents a simple computational (sub)graph. Users will
+ * mainly need to implement four functions as follows:
+ *  - GetFunction. It is used to get the packed function from the json runtime
+ * module using a provided function name. This function returns a PackedFunc
+ * that can be directly invoked by feeding it with parameters.
+ *  - SaveToBinary. This function is used to achieve the serialization purpose.
+ * The emitted binary stream can be directly saved to disk so that users can
+ * load then back when needed.
+ *  - LoadFromFile. This is a static function that acts as a helper to create
 
 Review comment:
   LoadFromFile is not necessary, as not all runtime has a json format.
   
   We should emphasize that although we use json as storage format, the example 
works for all other serialization formats


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 (1bd5d71 -> 0cfa3a8)

2019-11-21 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 1bd5d71  Update compile_engine.py (#4393)
 add 0cfa3a8  Add Logan to reviewer (#4390)

No new revisions were added by this update.

Summary of changes:
 CONTRIBUTORS.md | 1 +
 1 file changed, 1 insertion(+)



[GitHub] [incubator-tvm] tqchen merged pull request #4393: [Doc] Fix doc-string in `compile_engine.py`

2019-11-21 Thread GitBox
tqchen merged pull request #4393: [Doc] Fix doc-string in `compile_engine.py`
URL: https://github.com/apache/incubator-tvm/pull/4393
 
 
   


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 #4393: [Doc] Fix doc-string in `compile_engine.py`

2019-11-21 Thread GitBox
tqchen commented on issue #4393: [Doc] Fix doc-string in `compile_engine.py`
URL: https://github.com/apache/incubator-tvm/pull/4393#issuecomment-557264919
 
 
   Thanks @hgt312 @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] tqchen merged pull request #4390: [Community] @weberlo -> reviewer

2019-11-21 Thread GitBox
tqchen merged pull request #4390: [Community] @weberlo -> reviewer
URL: https://github.com/apache/incubator-tvm/pull/4390
 
 
   


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 (0bbdad4 -> 1bd5d71)

2019-11-21 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 0bbdad4  [Relay][Frontend][TF] Fix slice when begin or size is not 
Const (#4372)
 add 1bd5d71  Update compile_engine.py (#4393)

No new revisions were added by this update.

Summary of changes:
 python/tvm/relay/backend/compile_engine.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[GitHub] [incubator-tvm] tqchen commented on issue #4376: correct the instructions/scripts after repository name is changed to incubator-tvm

2019-11-21 Thread GitBox
tqchen commented on issue #4376: correct the instructions/scripts after 
repository name is changed to incubator-tvm
URL: https://github.com/apache/incubator-tvm/issues/4376#issuecomment-557264680
 
 
   great points, can you send a PR to fix this? we need to change that to
   
   ```
   git clone --recursive https://github.com/apache/incubator-tvm tvm
   ```


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] comaniac commented on a change in pull request #4151: [AutoTVM] Added an autotuning Config Library to store autotune results

2019-11-21 Thread GitBox
comaniac commented on a change in pull request #4151: [AutoTVM] Added an 
autotuning Config Library to store autotune results
URL: https://github.com/apache/incubator-tvm/pull/4151#discussion_r349295422
 
 

 ##
 File path: tests/python/unittest/test_autotvm_tuning_job.py
 ##
 @@ -0,0 +1,94 @@
+# 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.
+"""Test Tuning Job"""
+import copy
+import numpy as np
+import random
+import tempfile
+
+from tvm.autotvm.tuner.tuning_job import TuningJob
+
+from test_autotvm_common import get_sample_records
+
+
+class MockTuner:
+pass
+
+
+def test_log_configs():
+r = random.Random()
+r.seed(42)
 
 Review comment:
   ditto


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] comaniac commented on a change in pull request #4151: [AutoTVM] Added an autotuning Config Library to store autotune results

2019-11-21 Thread GitBox
comaniac commented on a change in pull request #4151: [AutoTVM] Added an 
autotuning Config Library to store autotune results
URL: https://github.com/apache/incubator-tvm/pull/4151#discussion_r349293137
 
 

 ##
 File path: python/tvm/autotvm/tuner/tuner.py
 ##
 @@ -86,8 +87,7 @@ def update(self, inputs, results):
 result for measurement
 """
 
-
-def tune(self, n_trial, measure_option, early_stopping=None, callbacks=()):
+def tune(self, n_trial, measure_option, early_stopping=None, callbacks=(), 
allow_skipping=True):
 
 Review comment:
   I think the default value of `allow_skipping` should be `False`, which means 
users have to intentionally skip tasks.


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] comaniac commented on a change in pull request #4151: [AutoTVM] Added an autotuning Config Library to store autotune results

2019-11-21 Thread GitBox
comaniac commented on a change in pull request #4151: [AutoTVM] Added an 
autotuning Config Library to store autotune results
URL: https://github.com/apache/incubator-tvm/pull/4151#discussion_r349291485
 
 

 ##
 File path: python/tvm/autotvm/config_library.py
 ##
 @@ -0,0 +1,279 @@
+# 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 datetime
+#pylint: disable=arguments-differ, method-hidden, 
inconsistent-return-statements
+"""Config Library to store tuning configs"""
+import json
+import os
+from _ctypes import PyObj_FromPtr
+from shutil import copyfile
+from pathlib import Path
+
+import numpy as np
+
+from . import record
+from .task import ApplyHistoryBest
+
+
+class ConfigLibraryException(Exception):
+pass
 
 Review comment:
   Why we need this?


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] comaniac commented on a change in pull request #4151: [AutoTVM] Added an autotuning Config Library to store autotune results

2019-11-21 Thread GitBox
comaniac commented on a change in pull request #4151: [AutoTVM] Added an 
autotuning Config Library to store autotune results
URL: https://github.com/apache/incubator-tvm/pull/4151#discussion_r349291108
 
 

 ##
 File path: python/tvm/autotvm/config_library.py
 ##
 @@ -0,0 +1,279 @@
+# 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 datetime
+#pylint: disable=arguments-differ, method-hidden, 
inconsistent-return-statements
+"""Config Library to store tuning configs"""
+import json
+import os
+from _ctypes import PyObj_FromPtr
+from shutil import copyfile
+from pathlib import Path
+
+import numpy as np
+
+from . import record
+from .task import ApplyHistoryBest
+
+
+class ConfigLibraryException(Exception):
+pass
+
+
+class ConfigLibrary:
+"""A library to store auto-tuning results for any number of 
targets/workloads.
+
+Parameters
+--
+library_dir: str
+Path to the config library directory. If the library does not already
+exist, a new library will be initialised in the directory. This will
+create an 'index.json' file in the directory which contains the 
location
+of all other files used to store configs in the library.
+
+"""
+
+LIBRARY_INDEX_FILE_NAME = "index.json"
+JOBS_INDEX_FILE_NAME = "jobs.json"
+JOBS_DIRECTORY_NAME = "jobs"
+
+def __init__(self, library_dir):
+# Handle if the directory doesn't exist
+if not os.path.isdir(library_dir):
+os.mkdir(library_dir)
+
+index_file = os.path.join(library_dir, self.LIBRARY_INDEX_FILE_NAME)
+if not os.path.isfile(index_file):
+with open(index_file, "w") as f:
+full_index_path = os.path.abspath(f.name)
+index = {
+"root": os.path.dirname(full_index_path),
+"targets": {},
+"jobs_index": self.JOBS_INDEX_FILE_NAME,
+"jobs_dir": self.JOBS_DIRECTORY_NAME,
+}
+json.dump(index, f, indent=4)
+
+with open(os.path.join(library_dir, self.JOBS_INDEX_FILE_NAME), 
"w") as f:
+json.dump({}, f)
+
+self.library_dir = library_dir
+self.library_index = index_file
+self.jobs_dir = os.path.join(self.library_dir, 
self.JOBS_DIRECTORY_NAME)
+self.jobs_index = os.path.join(self.library_dir, 
self.JOBS_INDEX_FILE_NAME)
+if not os.path.isdir(self.jobs_dir):
+os.makedirs(self.jobs_dir)
+
+def load(self, target):
+"""Load the configs for a given TVM target string.
+
+Returns a DispatchContext with the appropriate configs loaded."""
+target_configs = self._load_target_configs(target)
+return ApplyHistoryBest(target_configs)
+
+def _load_target_configs(self, target):
+"""Yield the configs in the library for a given target."""
+target_file = self.get_config_file(target, create=False)
+if target_file:
+with open(target_file) as f:
+configs = json.load(f)
+for config in configs.values():
+row = json.dumps(config)
+yield record.decode(row)
+
+else:
+yield from []
+
+def save_job(self, job, save_history=True):
+"""Save the results of an auto-tuning job to the library.
+
+Parameters
+--
+job: TuningJob
+The auto-tuning job to save.
+save_history: bool
+Whether to save the history log of the job.
+
+"""
+with open(self.jobs_index, 'r+') as f:
+job_index = json.load(f)
+highest_job_id = 0
+for job_id in job_index:
+highest_job_id = max(highest_job_id, 
int(job_index[job_id]["id"]))
+
+job_id = str(highest_job_id + 1)
+job_log = None
+if save_history:
+job_log = self._create_job_log(job_id, job.target)
+copyfile(job.log, job_log)
+
+job_entry = {
+"id": job_id,
+"log": job_log,
+"target": job.target,
+"platform": job.platform,
+  

[GitHub] [incubator-tvm] comaniac commented on a change in pull request #4151: [AutoTVM] Added an autotuning Config Library to store autotune results

2019-11-21 Thread GitBox
comaniac commented on a change in pull request #4151: [AutoTVM] Added an 
autotuning Config Library to store autotune results
URL: https://github.com/apache/incubator-tvm/pull/4151#discussion_r349294111
 
 

 ##
 File path: tests/python/unittest/test_autotvm_config_library.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.
+"""Test Config Library"""
+
+import copy
+import datetime
+import filecmp
+import json
+import os
+import random
+import tempfile
+
+from tvm.autotvm.config_library import ConfigLibrary
+from tvm.autotvm.task.dispatcher import ApplyHistoryBest
+from tvm.autotvm.tuner.callback import log_to_file
+from tvm.autotvm.record import encode
+
+from test_autotvm_common import get_sample_records
+
+
+def get_random_configs(n):
+records = get_sample_records(n)
+random_configs = []
+r = random.Random()
+r.seed(42)
 
 Review comment:
   You can hard code random configs, but do not use random generator in the 
unit tests (fixing the seed number doesn't guarantee the result is 
deterministic on different machines) sicne it is hard to catch the problem by 
all means.


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] kevinthesun merged pull request #4372: [Relay][Frontend][TF] Fix slice when begin or size is not Const

2019-11-21 Thread GitBox
kevinthesun merged pull request #4372: [Relay][Frontend][TF] Fix slice when 
begin or size is not Const
URL: https://github.com/apache/incubator-tvm/pull/4372
 
 
   


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] kevinthesun commented on issue #4372: [Relay][Frontend][TF] Fix slice when begin or size is not Const

2019-11-21 Thread GitBox
kevinthesun commented on issue #4372: [Relay][Frontend][TF] Fix slice when 
begin or size is not Const
URL: https://github.com/apache/incubator-tvm/pull/4372#issuecomment-557222718
 
 
   Thank you @lsy643 This is now 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


With regards,
Apache Git Services


[incubator-tvm] branch master updated (786d799 -> 0bbdad4)

2019-11-21 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 786d799  add GPU checking before compilation for rocm (#4394)
 add 0bbdad4  [Relay][Frontend][TF] Fix slice when begin or size is not 
Const (#4372)

No new revisions were added by this update.

Summary of changes:
 python/tvm/relay/frontend/tensorflow.py  | 10 --
 tests/python/frontend/tensorflow/test_forward.py | 16 +++-
 2 files changed, 23 insertions(+), 3 deletions(-)



[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-21 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_r349259501
 
 

 ##
 File path: apps/ext_runtime/src/ext_json_rt.cc
 ##
 @@ -0,0 +1,264 @@
+/*
+ * 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 external_runtime_test.cc
+ * \brief Test an example runtime module to interpreting a json string.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 Review comment:
   I added the comments for these three fields. We will put more detailed 
explanation and usage in the tutorial after the example 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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] u99127 commented on issue #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-21 Thread GitBox
u99127 commented on issue #4280: [TVM][RUNTIME] A minimum example to generate 
external library wrappers for DSOModule
URL: https://github.com/apache/incubator-tvm/pull/4280#issuecomment-557221217
 
 
   > The directory convention should be something we document in the documents. 
Currently a convention location for the project would be under 
`src/runtime/contrib`.
   > 
   
   And the example added should fit with the documentation ?
   
   > However, as long as the code are linked to the tvm runtime. The example 
can run. @u99127 are you suggesting that we should move the folder directly 
under `src/runtime/contrib`?
   
   Yes or the example should be arranged so that this is a canonical example 
for integration with apps/examples and src/runtime/contrib.
   
   My understanding is that the apps/example that's being put together is for 
the end user to consume TVM or TVM integrated with the 3rd party library 
integration, but the intermediate step of providing the framework for the 
integrator is not being shown or is not obvious to me.
   
   regards
   Ramana


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 issue #4335: [Relay][WIP] ConvertLayout pass.

2019-11-21 Thread GitBox
anijain2305 commented on issue #4335: [Relay][WIP] ConvertLayout pass.
URL: https://github.com/apache/incubator-tvm/pull/4335#issuecomment-557204233
 
 
   @tqchen @yzhliu @zhiics Let me know if you have some cycles to review this. 
It will be good to know if you think the high-level design makes sense.


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] comaniac commented on issue #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-21 Thread GitBox
comaniac commented on issue #4280: [TVM][RUNTIME] A minimum example to generate 
external library wrappers for DSOModule
URL: https://github.com/apache/incubator-tvm/pull/4280#issuecomment-557204068
 
 
   @tqchen thanks for the comments. Do you have any other suggestions to this 
PR, or could we merge 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


With regards,
Apache Git Services


[GitHub] [incubator-tvm] tqchen commented on issue #4382: [TOPI] Fix flaky testcase for floor div

2019-11-21 Thread GitBox
tqchen commented on issue #4382: [TOPI] Fix flaky testcase for floor div
URL: https://github.com/apache/incubator-tvm/pull/4382#issuecomment-557195441
 
 
   Interesting, this could due to the fact that we offload floordiv to 
floor(div(a, b)) and somehow the two was not consistent(perhaps due to the 
number of floating pt bits used?).
   
   If we do np.floor(a / b), it actually matches the tvm's semantics, that 
means numpy's floor div was implemented different from floor(div(a, b)). For 
now, let us also make modulus around 1 as unstable pts, and revisit it later


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 issue #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-21 Thread GitBox
zhiics commented on issue #4280: [TVM][RUNTIME] A minimum example to generate 
external library wrappers for DSOModule
URL: https://github.com/apache/incubator-tvm/pull/4280#issuecomment-557194665
 
 
   yes. Currently, this is an example that provides a demo to tell people how 
we can write minimal DSO and JSON style runtime. I think it makes sense to put 
them under `apps` as then they will show up on the `tvm.ai` website. Or 
production ready codegen/runtime, we will put it under `src/runtime/contrib` as 
@tqchen mentioned above.
   
   These examples are real code that can be compiled and executed. We will 
likely add DNNL later on when we update the other PR (#4258). And that one will 
be under `src/runtime/contrib`.


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] inadob opened a new pull request #4395: [Relay][Frontend][TFlite] Add test for qnn_mul operator

2019-11-21 Thread GitBox
inadob opened a new pull request #4395: [Relay][Frontend][TFlite] Add test for 
qnn_mul operator
URL: https://github.com/apache/incubator-tvm/pull/4395
 
 
   * Add a function to set the qnn output range wrt each elemwise operation.
   * Add comments warning for nonsense clamped output in the tflite/tvm results 
comparison.
   
   A separate output range for each operation has to be defined since if we 
specify a single range that to work in general for all elemwise operations it 
will result in a lower accuracy and clamped outputs when we test those elemwise 
operators whose possible output range is much smaller.
   
   The warning comments point to the the problem with clamping that can be 
easily overlooked because  once tflite clipps the ouput tensor values to 0 or 
255 then that output tensor get consumed by tvm and as a result the 
tflite_ouput and tvm_ouput are the same... so they pass the assertion.
   
   The only things that the future testwriter has to do are:
   1) set all the input tensors to [-100; 100] float 32 in the tf graph 
   2) define the range of the output tensor with respect to the particular 
operation.
   3) pass the uint8 input data to the graph in [0; 255]  


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 #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-21 Thread GitBox
tqchen commented on issue #4280: [TVM][RUNTIME] A minimum example to generate 
external library wrappers for DSOModule
URL: https://github.com/apache/incubator-tvm/pull/4280#issuecomment-557192302
 
 
   The directory convention should be something we document in the documents. 
Currently a convention location for the project would be under 
```src/runtime/contrib```.
   
   However, as long as the code are linked to the tvm runtime. The example can 
run. @u99127 are you suggesting that we should move the folder directly under 
```src/runtime/contrib```?
   


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 #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-21 Thread GitBox
tqchen 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_r349223041
 
 

 ##
 File path: apps/ext_runtime/src/ext_json_rt.cc
 ##
 @@ -0,0 +1,264 @@
+/*
+ * 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 external_runtime_test.cc
+ * \brief Test an example runtime module to interpreting a json string.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 Review comment:
   We will need more comments in this file, in particular, how can others 
implement there own customized runtime, list the functions to change, for 
example:
   
   - GetFunction
   - SaveToBinary
   - LoadFromBinary
   
   
   


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] cchung100m commented on a change in pull request #4385: [Golang][Doc] improve the samples and doc

2019-11-21 Thread GitBox
cchung100m commented on a change in pull request #4385: [Golang][Doc] improve 
the samples and doc
URL: https://github.com/apache/incubator-tvm/pull/4385#discussion_r349151864
 
 

 ##
 File path: golang/sample/gen_mobilenet_lib.py
 ##
 @@ -0,0 +1,55 @@
+# 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 tvm
+from tvm import relay
+import tvm.relay.testing
+
+##
+# Load Neural Network in Relay
+
+
+mod, params = relay.testing.mobilenet.get_workload(batch_size=1)
 
 Review comment:
   Yes, I use the official model and TFLite frontend for the example, instead.


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] cchung100m commented on a change in pull request #4385: [Golang][Doc] improve the samples and doc

2019-11-21 Thread GitBox
cchung100m commented on a change in pull request #4385: [Golang][Doc] improve 
the samples and doc
URL: https://github.com/apache/incubator-tvm/pull/4385#discussion_r349149961
 
 

 ##
 File path: golang/sample/gen_mobilenet_lib.py
 ##
 @@ -0,0 +1,55 @@
+# 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 tvm
+from tvm import relay
+import tvm.relay.testing
+
+##
+# Load Neural Network in Relay
+
 
 Review comment:
   Done and thanks for the 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


[incubator-tvm] branch master updated (464ebb1 -> 786d799)

2019-11-21 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 464ebb1  [QNN] Lowering for Depthwise Convolution. (#4351)
 add 786d799  add GPU checking before compilation for rocm (#4394)

No new revisions were added by this update.

Summary of changes:
 python/tvm/autotvm/measure/measure_methods.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[GitHub] [incubator-tvm] masahi merged pull request #4394: add GPU checking before compilation for rocm

2019-11-21 Thread GitBox
masahi merged pull request #4394: add GPU checking before compilation for rocm
URL: https://github.com/apache/incubator-tvm/pull/4394
 
 
   


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] mbarrett97 commented on issue #4151: [AutoTVM] Added an autotuning Config Library to store autotune results

2019-11-21 Thread GitBox
mbarrett97 commented on issue #4151: [AutoTVM] Added an autotuning Config 
Library to store autotune results
URL: https://github.com/apache/incubator-tvm/pull/4151#issuecomment-557099069
 
 
   @comaniac @eqy Could you please take a look at this?


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] masahi commented on a change in pull request #4394: add GPU checking before compilation for rocm

2019-11-21 Thread GitBox
masahi commented on a change in pull request #4394: add GPU checking before 
compilation for rocm
URL: https://github.com/apache/incubator-tvm/pull/4394#discussion_r349043981
 
 

 ##
 File path: python/tvm/autotvm/measure/measure_methods.py
 ##
 @@ -227,7 +227,8 @@ def set_task(self, task):
 
 def get_build_kwargs(self):
 kwargs = {}
-if 'cuda' in self.task.target.keys or 'opencl' in 
self.task.target.keys:
+if 'cuda' in self.task.target.keys or 'opencl' in 
self.task.target.keys or \
+   'rocm in self.task.target.keys':
 
 Review comment:
   Maybe the first time I saw python type checker in action


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


  1   2   >