[GitHub] [incubator-tvm] masahi merged pull request #4305: [RUNTIME] Proper Device Attribute Query for AMD GPU

2019-11-15 Thread GitBox
masahi merged pull request #4305: [RUNTIME] Proper Device Attribute Query for 
AMD GPU
URL: https://github.com/apache/incubator-tvm/pull/4305
 
 
   


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 (9e04298 -> 022b285)

2019-11-15 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 9e04298  fix install script (#4350)
 add 022b285  proper device query through rocm api (#4305)

No new revisions were added by this update.

Summary of changes:
 src/runtime/rocm/rocm_device_api.cc | 117 +---
 1 file changed, 70 insertions(+), 47 deletions(-)



[GitHub] [incubator-tvm] tqchen merged pull request #4350: fix install script

2019-11-15 Thread GitBox
tqchen merged pull request #4350: fix install script
URL: https://github.com/apache/incubator-tvm/pull/4350
 
 
   


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 (ccde31f -> 9e04298)

2019-11-15 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 ccde31f  AutoTVM: selecting tuning templates when extracting task 
(#4338)
 add 9e04298  fix install script (#4350)

No new revisions were added by this update.

Summary of changes:
 docker/install/install_tvm_cpu.sh | 2 +-
 docker/install/install_tvm_gpu.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



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

2019-11-15 Thread GitBox
wweic commented on issue #4346: [Runtime] Make ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554603605
 
 
   > By aligned storage, I mean we use aligned storage to specify the unit 
size, and allocate an array of aligned storage, whose number of elements can be 
passed in runtime
   
   Thanks @tqchen. I missed the array part. That makes sense. I'm going to 
create a new handler in `memory.h` probably named `ArrayHandler`(suggestions 
welcome) which handles types like this(a header type followed by an array of 
element types). I'll also improve the user facing interface of `ADTObject`. 
(standard container like APIs and handle lifecycle correctly).


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

2019-11-15 Thread GitBox
vinx13 commented on issue #4259: [DEV][DRAFT] TVM v0.6 Release candidate
URL: https://github.com/apache/incubator-tvm/issues/4259#issuecomment-554602399
 
 
   typo: enhence -> enhance


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-15 Thread GitBox
yzhliu commented on issue #4259: [DEV][DRAFT] TVM v0.6 Release candidate
URL: https://github.com/apache/incubator-tvm/issues/4259#issuecomment-554602143
 
 
   I updated the release notes to include recent changes, as well as some known 
issues as @u99127 suggested. please let me know if I missed anything.


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-15 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-15 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-15 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] LYang-666 opened a new issue #4354: Could I change the channel numbers on ResNet18 for pynq implementation

2019-11-15 Thread GitBox
LYang-666 opened a new issue #4354: Could I change the channel numbers on 
ResNet18 for pynq implementation
URL: https://github.com/apache/incubator-tvm/issues/4354
 
 
   Hi!  
 Could I change the channel numbers for resnet18 using the given 
bitstream to implement on pynq. In other words, does the given bitstream (eg.,  
1x16_i8w8a32_15_15_18_17.bit)  has the fixed conv  structure(fixed channels, 
filters number .. ) ?
   
Thank you so much! 


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-15 Thread GitBox
tqchen commented on issue #4346: [Runtime] Make ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554600437
 
 
   By aligned storage, I mean we use aligned storage to specify the unit size, 
and allocate an array of aligned storage, whose number of elements can be 
passed in runtime 


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] Hzfengsy commented on a change in pull request #4353: [Perf] Enhance cudnn and cublas backend and enable TensorCore

2019-11-15 Thread GitBox
Hzfengsy commented on a change in pull request #4353: [Perf] Enhance cudnn and 
cublas backend and enable TensorCore
URL: https://github.com/apache/incubator-tvm/pull/4353#discussion_r347074084
 
 

 ##
 File path: src/runtime/contrib/cublas/cublas.cc
 ##
 @@ -36,6 +36,36 @@ inline cublasOperation_t BooleanToTranspose(bool item) {
   return item ? CUBLAS_OP_T : CUBLAS_OP_N;
 }
 
+inline void TryEnableTensorCore(cublasHandle_t hdl) {
+  // TensorCores are only supported in cublas 9.0 or higher
 
 Review comment:
   Cublas and CuDNN will check it. If we try to use TensorCores on 
non-TensorCore GPUs, it will fallback to the traditional workload. So I think 
there is no need to duplicate this check in 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] vinx13 commented on a change in pull request #4353: [Perf] Enhance cudnn and cublas backend and enable TensorCore

2019-11-15 Thread GitBox
vinx13 commented on a change in pull request #4353: [Perf] Enhance cudnn and 
cublas backend and enable TensorCore
URL: https://github.com/apache/incubator-tvm/pull/4353#discussion_r347074000
 
 

 ##
 File path: python/tvm/contrib/cudnn.py
 ##
 @@ -341,12 +355,16 @@ def conv2d_forward(x,
 algo: int
 Forward algorithm, get index from ```algo_to_index``` function
 if algo == -1, the best algo will be chosen by CUDNN
+dtype: str
 
 Review comment:
   should be `conv_dtype`


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 #4348: [Relay] Add tests in CI which run tests based on specific Relay feature flags

2019-11-15 Thread GitBox
zhiics commented on issue #4348: [Relay] Add tests in CI which run tests based 
on specific Relay feature flags
URL: https://github.com/apache/incubator-tvm/issues/4348#issuecomment-554597492
 
 
   @gussmith23  Thanks for the proposal. I have a few thoughts/questions.
   
   - For the passes, can we just glob them from the registry?
   - How do you plan to represent these meta data? Are we going to just add 
them to `PassInfo`?
   - Do we want to save the states the resultant passes, i.e. if the programs 
changes? 


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 edited a comment on issue #4348: [Relay] Add tests in CI which run tests based on specific Relay feature flags

2019-11-15 Thread GitBox
zhiics edited a comment on issue #4348: [Relay] Add tests in CI which run tests 
based on specific Relay feature flags
URL: https://github.com/apache/incubator-tvm/issues/4348#issuecomment-554597492
 
 
   @gussmith23  Thanks for the proposal. I have a few thoughts/questions.
   
   - For the passes, can we just glob them from the registry?
   - How do you plan to represent these meta data? Are we going to just add 
them to `PassInfo`?
   - Do we want to save the states the resultant passes, i.e. if the program 
changes? 


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 #4352: [Debugger] Sorting op-time breakdown for quicker analysis.

2019-11-15 Thread GitBox
zhiics commented on issue #4352: [Debugger] Sorting op-time breakdown for 
quicker analysis.
URL: https://github.com/apache/incubator-tvm/pull/4352#issuecomment-554596924
 
 
   BTW, if I remember correctly, the correct output is sorted by the occurrence 
of the ops. If so, should we make this configurable, i.e. passing a 
`sort_by_time=False`? For the VM profiler, I had a local change to do this, but 
I forgot to send the PR.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


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

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

 ##
 File path: include/tvm/runtime/memory.h
 ##
 @@ -104,10 +124,22 @@ class SimpleObjAllocator :
   return reinterpret_cast(data);
 }
 
+template
+static T* NewWithExtraSpace(SimpleObjAllocator*, size_t extra, Args&&... 
args) {
+  // TODO(wweic): use aligned_alloc in the future
+  void* data = std::malloc(sizeof(T) + extra);
 
 Review comment:
   @tqchen `fields.size()` is unknown until runtime, so `aligned_storage` won't 
work(it requires the size of memory to be compile time constant) I think. I 
agree with alignment, that's why I left a note of using `aligned_alloc`. But 
our c++ support seems to be c++11. `aligned_alloc` is available after c++17. We 
can have a simple implementation of `aligned_alloc` and switch to it later when 
we have c++17. 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] Laurawly commented on a change in pull request #4353: [Perf] Enhance cudnn and cublas backend and enable TensorCore

2019-11-15 Thread GitBox
Laurawly commented on a change in pull request #4353: [Perf] Enhance cudnn and 
cublas backend and enable TensorCore
URL: https://github.com/apache/incubator-tvm/pull/4353#discussion_r347070174
 
 

 ##
 File path: include/tvm/runtime/util.h
 ##
 @@ -39,6 +39,14 @@ namespace runtime {
 inline bool TypeMatch(TVMType t, int code, int bits, int lanes = 1) {
   return t.code == code && t.bits == bits && t.lanes == lanes;
 }
+/*!
+ * \brief Check whether type matches the given spec.
 
 Review comment:
   Document the functionality differently from `TypeMatch`.


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] Laurawly commented on a change in pull request #4353: [Perf] Enhance cudnn and cublas backend and enable TensorCore

2019-11-15 Thread GitBox
Laurawly commented on a change in pull request #4353: [Perf] Enhance cudnn and 
cublas backend and enable TensorCore
URL: https://github.com/apache/incubator-tvm/pull/4353#discussion_r347069828
 
 

 ##
 File path: src/runtime/contrib/cublas/cublas.cc
 ##
 @@ -124,35 +175,205 @@ struct CublasDgemmBatchOp {
   }
 };
 
+// Check cublas supported mix-precision computation type and return computeType
+bool CheckCublasMixPrecisionType(DLDataType in_dtype, DLDataType out_dtype, 
bool int_support = true) {
 
 Review comment:
   Maybe shorten the name to just `CheckMixPrecisionType` since the function is 
under cublas context


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] Laurawly commented on a change in pull request #4353: [Perf] Enhance cudnn and cublas backend and enable TensorCore

2019-11-15 Thread GitBox
Laurawly commented on a change in pull request #4353: [Perf] Enhance cudnn and 
cublas backend and enable TensorCore
URL: https://github.com/apache/incubator-tvm/pull/4353#discussion_r347069637
 
 

 ##
 File path: src/runtime/contrib/cublas/cublas.cc
 ##
 @@ -36,6 +36,36 @@ inline cublasOperation_t BooleanToTranspose(bool item) {
   return item ? CUBLAS_OP_T : CUBLAS_OP_N;
 }
 
+inline void TryEnableTensorCore(cublasHandle_t hdl) {
+  // TensorCores are only supported in cublas 9.0 or higher
+  int version;
+  CHECK_CUBLAS_ERROR(cublasGetVersion(hdl, ));
+  if (version >= 9000)
+CHECK_CUBLAS_ERROR(cublasSetMathMode(hdl, CUBLAS_TENSOR_OP_MATH));
+}
+
+struct CublasHgemmOp {
+  typedef half TDatatype;
+  cublasHandle_t handle;
+  explicit CublasHgemmOp(cublasHandle_t hdl)
+  : handle(hdl)
+  {}
 
 Review comment:
   fix indent


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] Laurawly commented on a change in pull request #4353: [Perf] Enhance cudnn and cublas backend and enable TensorCore

2019-11-15 Thread GitBox
Laurawly commented on a change in pull request #4353: [Perf] Enhance cudnn and 
cublas backend and enable TensorCore
URL: https://github.com/apache/incubator-tvm/pull/4353#discussion_r347069251
 
 

 ##
 File path: src/runtime/contrib/cublas/cublas.cc
 ##
 @@ -36,6 +36,36 @@ inline cublasOperation_t BooleanToTranspose(bool item) {
   return item ? CUBLAS_OP_T : CUBLAS_OP_N;
 }
 
+inline void TryEnableTensorCore(cublasHandle_t hdl) {
+  // TensorCores are only supported in cublas 9.0 or higher
 
 Review comment:
   Also cuda compute capability is 70 or higher? `__CUDACC_VER_MAJOR__ >= 7`


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] optima2005 commented on issue #4300: [Relay][Frontend][Tensorflow]Add conv2d_transpose

2019-11-15 Thread GitBox
optima2005 commented on issue #4300: [Relay][Frontend][Tensorflow]Add 
conv2d_transpose
URL: https://github.com/apache/incubator-tvm/pull/4300#issuecomment-554591424
 
 
   @srkreddy1238 @yzhliu any further comments? 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] Hzfengsy opened a new pull request #4353: [Perf] Enhance cudnn and cublas backend and enable TensorCore

2019-11-15 Thread GitBox
Hzfengsy opened a new pull request #4353: [Perf] Enhance cudnn and cublas 
backend and enable TensorCore
URL: https://github.com/apache/incubator-tvm/pull/4353
 
 
   Improvement:
   - Enable TensorCore at CuDNN and cublas
   - Add mix precision support at cublas
   - Choose dtype for convDesc to support INT8 conv
   
   Fix:
   - hard code type and tensor format in cudnn support
   
   cc @vinx13 @yzhliu 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-tvm] tqchen edited a comment on issue #4346: [Runtime] Make ADTObject POD container type

2019-11-15 Thread GitBox
tqchen edited a comment on issue #4346: [Runtime] Make ADTObject POD container 
type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554587942
 
 
   The inplace array is indeed somewhat tricky :) Here is one idea to make the 
effort easier for more similar cases: apology for typing in a window. Have fun!
   
   ```c++
   // Curiously recurring template pattern
   template
   class InplaceArray {
  public:
 // caclculate start location
 static_assert(sizeof(ArrayType) % align_of(ElemType));
 ~InplaceArray() {
ArrayType* self = static_cast(this);
if (!std::is_pod::value) {
  // destruct elements
   for (size_t i = 0; i < self->size(); ++i) {
  void* ptr = AddressOf(i);
  reinterpret_cast(ptr)->ElemType::~ElemType();
   }
}
 } 
 ElemType& operator[](size_t i) {
ArrayType* self = static_cast(this);
if (i >= self->size()) { 
   CHECK(i < self->capacity());
   void* ptr = AddressOf(i);
   new (ptr) ElemType();
   return *reinterpret_cast(ptr);
}
return *reinterpret_cast(ptr);
 }
  private:
static constexpr const int kDataStart = sizeof(ArrayType);
void* AddressOf(int i) {
   ArrayType* self = static_cast(this);
   return reinterpret_cast(self) + kDataStart;  
}
   };
   
   class ADTObj : public Object, public InlineArray {
   }
   ```


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-15 Thread GitBox
tqchen commented on issue #4346: [Runtime] Make ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554587942
 
 
   The inplace array is indeed somewhat tricky :) Here is one idea to make the 
effort easier for more similar cases: apology for typing in a window. Have fun!
   
   ```c++
   // Curiously recurring template pattern
   template
   class InplaceArray {
  public:
 // caclculate start location
 static_assert(sizeof(ArrayType) % align_of(ElemType));
 ~InplaceArray() {
ArrayType* self = static_cast(this);
if (!std::is_pod::value) {
  // destruct elements
   for (size_t i = 0; i < self->size(); ++i) {
  void* ptr = AddressOf(i);
  reinterpret_cast(ptr)->ElemType::~ElemType();
   }
}
 } 
 ElemType& operator[](size_t i) {
ArrayType* self = static_cast(this);
if (i >= self->size()) { 
   CHECK(i < self->capacity());
   void* ptr = AddressOf(i);
   new (ptr) ElemType();
   return *reinterpret_cast(ptr);
}
return *reinterpret_cast(ptr);
 }
  private:
static constexpr const int kDataStart = sizeof(ArrayType);
void* AddressOf(int i) {
   ArrayType* self = static_cast(this);
   return reinterpret_cast(self) + kDataStart;  
}
   };
   
   class ADTObj : public Object, public InlineArray {
   }
   ```


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-15 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_r347064867
 
 

 ##
 File path: src/runtime/container.cc
 ##
 @@ -0,0 +1,54 @@
+/*
+ * 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 {
+
+ObjectRef* ADTObj::fields() const {
 
 Review comment:
   You will need to overload destructor of ADTObj to delete the corresponding 
Object locations, by setting them to nullptr.


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-15 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_r347064899
 
 

 ##
 File path: src/runtime/container.cc
 ##
 @@ -0,0 +1,54 @@
+/*
+ * 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 {
+
+ObjectRef* ADTObj::fields() const {
+  if (this->size_ <= 0) {
+return nullptr;
+  }
+  auto p = reinterpret_cast(const_cast(this)) + 2;
+  return reinterpret_cast(p);
+}
+
+ADT::ADT(uint32_t tag, std::vector fields) {
 
 Review comment:
   Add a constructor with initializer list and begin, end


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-15 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_r347065131
 
 

 ##
 File path: src/runtime/container.cc
 ##
 @@ -0,0 +1,54 @@
+/*
+ * 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 {
+
+ObjectRef* ADTObj::fields() const {
+  if (this->size_ <= 0) {
+return nullptr;
+  }
+  auto p = reinterpret_cast(const_cast(this)) + 2;
+  return reinterpret_cast(p);
+}
+
+ADT::ADT(uint32_t tag, std::vector fields) {
+  auto ptr = make_object_with_extra_space(fields.size() * 
sizeof(ObjectRef));
+  ptr->tag_ = tag;
+  ptr->size_ = fields.size();
+  for (size_t i = 0; i < fields.size(); ++i) {
+ptr->fields()[i] = fields[i];
 
 Review comment:
   Direct assignment in here might case a problem. What if the original 
location ObjectRef is not initialized to nullptr? You will need to first fill 
the memory with nullptr before running copy. Or use the inplace memory new 


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-15 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_r347064580
 
 

 ##
 File path: src/runtime/container.cc
 ##
 @@ -0,0 +1,54 @@
+/*
+ * 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 {
+
+ObjectRef* ADTObj::fields() const {
+  if (this->size_ <= 0) {
+return nullptr;
+  }
+  auto p = reinterpret_cast(const_cast(this)) + 2;
 
 Review comment:
   p = reinterpret_cast(const_cast(this)) + sizeof(ADTObj);


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-15 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_r347064715
 
 

 ##
 File path: src/runtime/container.cc
 ##
 @@ -0,0 +1,54 @@
+/*
+ * 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 {
+
+ObjectRef* ADTObj::fields() const {
+  if (this->size_ <= 0) {
 
 Review comment:
   should we directly expose an element accessor API instead? 
```ADTObj::operator[](size_t idx)```. This way we can return const ObjectRef&, 
as Tuple is immutable


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-15 Thread GitBox
tqchen commented on issue #4346: [Runtime] Make ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554585238
 
 
   We care about alignment(otherwise it will leads to mysterious segfaults).
   
   Please use std::aligned_storage, allocate an array of if. Make sure you at 
least get alignof(T), and the requested alignment is dividable by alignof(T)
   
   As an alternative design, we can do
   
   ```c++
   Allocator.make_with_extra_elems(num_elem, args);
   ```
   Which also allows you to get std::align_of the second argument, and use 
https://en.cppreference.com/w/cpp/types/aligned_storage


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 (0a9f7e9 -> ccde31f)

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

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


from 0a9f7e9  Add workgroup size attribute to AMDGPU functions in codegen 
(#4342)
 add ccde31f  AutoTVM: selecting tuning templates when extracting task 
(#4338)

No new revisions were added by this update.

Summary of changes:
 python/tvm/autotvm/task/relay_integration.py   | 30 +++---
 tests/python/relay/test_autotvm_task_extraction.py | 46 ++
 2 files changed, 71 insertions(+), 5 deletions(-)



[GitHub] [incubator-tvm] vinx13 merged pull request #4338: AutoTVM: selecting tuning templates when extracting task

2019-11-15 Thread GitBox
vinx13 merged pull request #4338: AutoTVM: selecting tuning templates when 
extracting task
URL: https://github.com/apache/incubator-tvm/pull/4338
 
 
   


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] vinx13 commented on issue #4338: AutoTVM: selecting tuning templates when extracting task

2019-11-15 Thread GitBox
vinx13 commented on issue #4338: AutoTVM: selecting tuning templates when 
extracting task
URL: https://github.com/apache/incubator-tvm/pull/4338#issuecomment-554585331
 
 
   Thanks @jackwish @comaniac @tmoreau89 this is merged


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-tvm] tqchen edited a comment on issue #4346: [Runtime] Make ADTObject POD container type

2019-11-15 Thread GitBox
tqchen edited a comment on issue #4346: [Runtime] Make ADTObject POD container 
type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554585238
 
 
   We care about alignment(otherwise it will leads to mysterious segfaults).
   
   Please use std::aligned_storage, allocate an array of if. Make sure you at 
least get alignof(T), and the requested alignment is dividable by alignof(T)
   
   As an alternative design, we can also do(so you don't need to pass the 
alignment argument)
   
   ```c++
   Allocator.make_with_extra_elems(num_elem, args);
   ```
   Which also allows you to get std::align_of the second argument, and use 
https://en.cppreference.com/w/cpp/types/aligned_storage


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

2019-11-15 Thread GitBox
petrex commented on issue #4259: [DEV][DRAFT] TVM v0.6 Release candidate
URL: https://github.com/apache/incubator-tvm/issues/4259#issuecomment-554585033
 
 
   @yzhliu @ZihengJiang  I can provide some input for AMD gpu backend. please 
tag me in your PR. 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 a change in pull request #4346: [Runtime] Make ADTObject POD container type

2019-11-15 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_r347062305
 
 

 ##
 File path: include/tvm/runtime/memory.h
 ##
 @@ -104,10 +124,22 @@ class SimpleObjAllocator :
   return reinterpret_cast(data);
 }
 
+template
+static T* NewWithExtraSpace(SimpleObjAllocator*, size_t extra, Args&&... 
args) {
+  // TODO(wweic): use aligned_alloc in the future
+  void* data = std::malloc(sizeof(T) + extra);
 
 Review comment:
   We care about alignment(otherwise it will leads to mysterious segfaults). 
   
   Please use std::aligned_storage, allocate an array of if. Make sure you at 
least get alignof(T), and the requested alignment is dividable by alignof(T)


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-15 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_r347062305
 
 

 ##
 File path: include/tvm/runtime/memory.h
 ##
 @@ -104,10 +124,22 @@ class SimpleObjAllocator :
   return reinterpret_cast(data);
 }
 
+template
+static T* NewWithExtraSpace(SimpleObjAllocator*, size_t extra, Args&&... 
args) {
+  // TODO(wweic): use aligned_alloc in the future
+  void* data = std::malloc(sizeof(T) + extra);
 
 Review comment:
   We care about alignment(otherwise it will leads to mysterious segfaults). 
   
   Please use std::aligned_storage, allocate an array of if. Make sure you at 
least get alignof(T), and the request alignment is dividable by alignof(T)


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-15 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-554580535
 
 
   Also note that my comment about ExampleJSONModule is mainly to serve as 
example ways to integrate for other external runtimes. The module itself is not 
meant to be used in production


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-15 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-554580535
 
 
   Also note that my comment about ExampleJSONModule is mainly to serve as 
example ways to integrate for other external runtimes.


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-15 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-554580370
 
 
   The current interfacing example already looks great. For the JSONModule 
usecase, i was thinking about something like
   
   ```c++
   ExampleJSONModule : runtime::Module {
   void SaveToBinary();
   void LoadFromFile();
   PackedFunc GetFunction(name) {
  if (name="tensortrun") {
for each elem in json:
if (elem.name == "func1") {
   run_trt_func1(func, elem.args);
}  
   ...
 }
   }
   };
   ```
   In this case, because JSONModule directly interprets the json and calls into 
the runtime API, we no longer needs the gcc related components. This is an 
approach that will work better say if the serialized code is a TF blob plus 
some meta data and we just want to call into TF runtime.


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-15 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-554580370
 
 
   The current interfacing example already looks great. For the JSONModule 
usecase, i was thinking about something like
   
   ```c++
   JSONModule : runtime::Module {
   void SaveToBinary();
   void LoadFromFile();
   PackedFunc GetFunction(name) {
  if (name="tensortrun") {
for each elem in json:
if (elem.name == "func1") {
   run_trt_func1(func, elem.args);
}  
   ...
 }
   }
   };
   ```
   In this case, because JSONModule directly interprets the json and calls into 
the runtime API, we no longer needs the gcc related components. This is an 
approach that will work better say if the serialized code is a TF blob plus 
some meta data and we just want to call into TF runtime.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-tvm] anijain2305 opened a new pull request #4352: [Debugger] Sorting op-time breakdown for quicker analysis.

2019-11-15 Thread GitBox
anijain2305 opened a new pull request #4352: [Debugger] Sorting op-time 
breakdown for quicker analysis.
URL: https://github.com/apache/incubator-tvm/pull/4352
 
 
   Profiler output is not sorted by time currently. So, a developer has to 
eyeball and find out the expensive ops. This PR sorts and add total time in the 
log for quicker analysis.
   
   @tqchen @soiferj @yzhliu @icemelon9 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-tvm] petrex commented on issue #4305: [RUNTIME] Proper Device Attribute Query for AMD GPU

2019-11-15 Thread GitBox
petrex commented on issue #4305: [RUNTIME] Proper Device Attribute Query for 
AMD GPU
URL: https://github.com/apache/incubator-tvm/pull/4305#issuecomment-554579203
 
 
   Morning @masahi.  That weird clang-format behavior was due to a missing `{` 
from a manual merging. I've pushed the fix (passing linter and build, now with 
unit tests). Let's wait for the signal from CI. 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] comaniac commented on issue #4280: [TVM][RUNTIME] A minimum example to generate external library wrappers for DSOModule

2019-11-15 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-554579198
 
 
   > @comaniac Thanks for the update! Can you move the ExampleJSONModule into a 
formal module that is compiled by the TVM runtime? Because normally, we will 
need to implement a SaveToBinary and LoadFromBinary instead of pumping things 
into a DSO file
   
   The current implementation expects external codegens to write the JSON 
string directly to the DSO module so that we can have a unified interface. Do 
you mean we should also provide the following JSON module other than DSO module 
for developers to use:
   
   ```c++
   JSONModule : runtime::Module {
   void SaveToBinary();
   void LoadFromFile();
   };
   ```
   
   Now, user would have two JSON files if the user invoke 
json_module.SaveToBinary() and relay.build()? Would this mean that we have to 
change API of graph_runtime.create() to include the second JSON file?
   
   Also, we will generate the following function in the .so.
   
   ```c++
   // JSONModule compatible c function that can be compiled by gcc.
   extern "C" int foo(TVMValue* value, int *type_code, int nargs, std::string 
json_file) {
  CHECK_EQ(nargs, 3);
  DLTensor* arg0 = static_cast(value.v_handle);
  DLTensor* arg1 = static_cast(value.v_handle);
   
  // Parse json_file and use "foo" as the key to get the subgraph JSON.
 std::string subgraph_json = ...;
   
  foo_(static_cast(args0->data), args0->shape[0],
  static_cast(args1->data), args1->shape[0]),
  subgraph_json);
   }
   ```
   
   So that the user codegen is expected to generate the following:
   
   ```c++
   // the original foo you intended to generate
   void foo_(float* a, int N, float* b, int M, float* c, std::string 
subgraph_json) {
   // Launch the external engine with subgraph_json and arguements.
   }
   ```


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 issue #4338: AutoTVM: selecting tuning templates when extracting task

2019-11-15 Thread GitBox
jackwish commented on issue #4338: AutoTVM: selecting tuning templates when 
extracting task
URL: https://github.com/apache/incubator-tvm/pull/4338#issuecomment-554571498
 
 
   Thank you @comaniac ! I will update the tutorials in another PR.
   
   @tmoreau89 @vinx13 Would you like to have a look please :)
   
   


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-15 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-554569511
 
 
   @comaniac Thanks for the update! Can you move the ExampleJSONModule into a 
formal module that is compiled by the TVM runtime? Because normally, we will 
need to implement a SaveToBinary and LoadFromBinary instead of pumping things 
into a DSO file


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-tvm] anijain2305 opened a new pull request #4351: [QNN] Lowering for Depthwise Convolution.

2019-11-15 Thread GitBox
anijain2305 opened a new pull request #4351: [QNN] Lowering for Depthwise 
Convolution.
URL: https://github.com/apache/incubator-tvm/pull/4351
 
 
   Adding the QNN lowering sequence for Depthwise conv2d. This creates 
depthwise conv2d with (u)int8 inputs, opening up path to write schedule using 
Intel VNNI and ARM DOT instructions. 
   
   For older HW that do not have fast in8 support, this lowering will not be 
called (already merged upstream in a different PR).
   
   @FrozenGene @jackwish @tmoreau89 @yzhliu @zhiics 
   
   Note - Will wait for #4292  to get merged first as @u99127 already had to 
resolve conflicts multiple times over past couple of times :) This PR will 
cause conflict too. But we can still get feedback.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


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

2019-11-15 Thread GitBox
wweic commented on issue #4346: [Runtime] Make ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554567596
 
 
   cc @tqchen @zhiics @icemelon9 @junrushao1994


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-tvm] masahi commented on issue #4305: [RUNTIME] Proper Device Attribute Query for AMD GPU

2019-11-15 Thread GitBox
masahi commented on issue #4305: [RUNTIME] Proper Device Attribute Query for 
AMD GPU
URL: https://github.com/apache/incubator-tvm/pull/4305#issuecomment-554567246
 
 
   @petrex can you check indentation issues? I see some weird indentation done 
by clang-format. It should be consistent with the rest of the code base. 


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 issue #4342: Add workgroup size attribute to AMDGPU functions in codegen

2019-11-15 Thread GitBox
masahi commented on issue #4342: Add workgroup size attribute to AMDGPU 
functions in codegen
URL: https://github.com/apache/incubator-tvm/pull/4342#issuecomment-554565709
 
 
   The flaky test is a known issue #4284 . Finding a way to set the optimal 
work group size would be an interesting future work.


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 merged pull request #4342: Add workgroup size attribute to AMDGPU functions in codegen

2019-11-15 Thread GitBox
masahi merged pull request #4342: Add workgroup size attribute to AMDGPU 
functions in codegen
URL: https://github.com/apache/incubator-tvm/pull/4342
 
 
   


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 (d58b733 -> 0a9f7e9)

2019-11-15 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 d58b733  [FIX] Fix for a specific case when loop partitioning with 
indivisble (#4243)
 add 0a9f7e9  Add workgroup size attribute to AMDGPU functions in codegen 
(#4342)

No new revisions were added by this update.

Summary of changes:
 src/codegen/llvm/codegen_amdgpu.cc | 26 ++
 1 file changed, 26 insertions(+)



[GitHub] [incubator-tvm] comaniac opened a new pull request #4350: fix install script

2019-11-15 Thread GitBox
comaniac opened a new pull request #4350: fix install script
URL: https://github.com/apache/incubator-tvm/pull/4350
 
 
   Fix the install scripts with mismatch folder names.
   
   cc @tqchen 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


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

2019-11-15 Thread GitBox
yzhliu 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-554558656
 
 
   @tqchen would you take a look again?


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 (2c5c4da -> d58b733)

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

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


from 2c5c4da  [Relay][VM][Interpreter] Enable first-class constructors in 
VM and interpreter via eta expansion (#4218)
 add d58b733  [FIX] Fix for a specific case when loop partitioning with 
indivisble (#4243)

No new revisions were added by this update.

Summary of changes:
 src/pass/loop_partition.cc| 52 ---
 tests/python/unittest/test_pass_loop_partition.py | 22 ++
 2 files changed, 50 insertions(+), 24 deletions(-)



[GitHub] [incubator-tvm] ZihengJiang merged pull request #4243: Fix broken loop partitioning due to recent changes.

2019-11-15 Thread GitBox
ZihengJiang merged pull request #4243: Fix broken loop partitioning due to 
recent changes.
URL: https://github.com/apache/incubator-tvm/pull/4243
 
 
   


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 (3f6b3db -> 2c5c4da)

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

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


from 3f6b3db  [COMMUNITY] Add DISCLAIMER, KEYS for ASF release (#4345)
 add 2c5c4da  [Relay][VM][Interpreter] Enable first-class constructors in 
VM and interpreter via eta expansion (#4218)

No new revisions were added by this update.

Summary of changes:
 include/tvm/relay/module.h |  14 +--
 include/tvm/relay/transform.h  |   9 +-
 python/tvm/relay/std/prelude.rly   |  15 +--
 python/tvm/relay/transform.py  |  15 ++-
 src/relay/backend/interpreter.cc   |  11 ++
 src/relay/backend/vm/compiler.cc   |   4 +
 src/relay/backend/vm/lambda_lift.cc|  22 ++--
 src/relay/ir/alpha_equal.cc|   2 +-
 src/relay/ir/module.cc |  12 +--
 src/relay/ir/pretty_printer.cc |   6 +-
 src/relay/pass/eta_expand.cc   | 159 ++---
 src/relay/pass/type_infer.cc   |   2 +-
 tests/python/relay/test_ir_text_printer.py |  22 
 tests/python/relay/test_pass_eta_expand.py |  75 +++---
 14 files changed, 276 insertions(+), 92 deletions(-)



[GitHub] [incubator-tvm] icemelon9 merged pull request #4218: [Relay][VM][Interpreter] Enable first-class constructors in VM and interpreter via eta expansion

2019-11-15 Thread GitBox
icemelon9 merged pull request #4218: [Relay][VM][Interpreter] Enable 
first-class constructors in VM and interpreter via eta expansion
URL: https://github.com/apache/incubator-tvm/pull/4218
 
 
   


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] icemelon9 commented on issue #4218: [Relay][VM][Interpreter] Enable first-class constructors in VM and interpreter via eta expansion

2019-11-15 Thread GitBox
icemelon9 commented on issue #4218: [Relay][VM][Interpreter] Enable first-class 
constructors in VM and interpreter via eta expansion
URL: https://github.com/apache/incubator-tvm/pull/4218#issuecomment-554549602
 
 
   Thanks @weberlo @MarisaKirisame. 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


[GitHub] [incubator-tvm] jroesch merged pull request #4345: [COMMUNITY] Add DISCLAIMER, KEYS for ASF release

2019-11-15 Thread GitBox
jroesch merged pull request #4345: [COMMUNITY] Add DISCLAIMER, KEYS for ASF 
release
URL: https://github.com/apache/incubator-tvm/pull/4345
 
 
   


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 (da23619 -> 3f6b3db)

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

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


from da23619  Add check to ensure input file was successfully opened in 
NNVM deploy code demo (#4315)
 add 3f6b3db  [COMMUNITY] Add DISCLAIMER, KEYS for ASF release (#4345)

No new revisions were added by this update.

Summary of changes:
 DISCLAIMER| 12 +++
 KEYS  | 74 +++
 NOTICE|  7 +++-
 tests/lint/check_file_type.py |  2 ++
 4 files changed, 94 insertions(+), 1 deletion(-)
 create mode 100644 DISCLAIMER
 create mode 100644 KEYS



[GitHub] [incubator-tvm] slyubomirsky edited a comment on issue #4348: [Relay] Add tests in CI which run tests based on specific Relay feature flags

2019-11-15 Thread GitBox
slyubomirsky edited a comment on issue #4348: [Relay] Add tests in CI which run 
tests based on specific Relay feature flags
URL: https://github.com/apache/incubator-tvm/issues/4348#issuecomment-554540987
 
 
   I think you can iterate through the passes by looking at the defined members 
of `tvm.relay.transform` and having exceptions for the members that are not 
passes. This way, if anyone adds a pass to that package, they would have to 
hardcode an exception and should have a justification for it (we can put a 
comment in there to remind reviewers of that)
   
   I.e., `dir(tvm.relay.transform)`


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] slyubomirsky commented on issue #4348: [Relay] Add tests in CI which run tests based on specific Relay feature flags

2019-11-15 Thread GitBox
slyubomirsky commented on issue #4348: [Relay] Add tests in CI which run tests 
based on specific Relay feature flags
URL: https://github.com/apache/incubator-tvm/issues/4348#issuecomment-554540987
 
 
   I think you can iterate through the passes by looking at the defined members 
of `tvm.relay.transform` and having exceptions for the members that are not 
passes. This way, if anyone adds a pass to that package, they would have to 
hardcode an exception and should have a justification for it (we can put a 
comment in there to remind reviewers of that)


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] t-vi commented on issue #4342: Add workgroup size attribute to AMDGPU functions in codegen

2019-11-15 Thread GitBox
t-vi commented on issue #4342: Add workgroup size attribute to AMDGPU functions 
in codegen
URL: https://github.com/apache/incubator-tvm/pull/4342#issuecomment-554533046
 
 
   So for me it says "All checks have passed 1 successful check".
   


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-15 Thread GitBox
anijain2305 commented on issue #4335: [Relay][WIP] ConvertLayout pass.
URL: https://github.com/apache/incubator-tvm/pull/4335#issuecomment-554532864
 
 
   Ok, let me spend some more time thinking about 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] gussmith23 commented on issue #4348: [Relay] Add tests in CI which run tests based on specific Relay feature flags

2019-11-15 Thread GitBox
gussmith23 commented on issue #4348: [Relay] Add tests in CI which run tests 
based on specific Relay feature flags
URL: https://github.com/apache/incubator-tvm/issues/4348#issuecomment-554509200
 
 
   Talking with Steven and Marisa:
   - Tests should be automatically run over all passes, so that we don't have 
to rely on submitters/reviewers to add new passes to existing tests
 + What's a clean way to get all of the passes automatically?
   - Passes need to be modified to include the three fields that Marisa 
describes in the original PR: supported features, added features, removed 
features
   - Passes need to be modified with machinery to check the three fields above
   - Existing passes need to be modified to state what features they 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] anijain2305 commented on a change in pull request #4339: Added tflite frontend support for quantized mean

2019-11-15 Thread GitBox
anijain2305 commented on a change in pull request #4339: Added tflite frontend 
support for quantized mean
URL: https://github.com/apache/incubator-tvm/pull/4339#discussion_r346978076
 
 

 ##
 File path: python/tvm/relay/frontend/tflite.py
 ##
 @@ -659,7 +659,23 @@ def _convert_reduce(self, relay_op, op):
 reduce_options.Init(op_options.Bytes, op_options.Pos)
 keep_dims = reduce_options.KeepDims()
 
+if input_tensor.qnn_params:
+in_expr = _qnn.op.dequantize(data=in_expr,
 
 Review comment:
   Similar concern as that of @FrozenGene 
   From maths size, it looks safe to me, but let me know if it wrong
   
   
   Initial Quantized tensor - QA - shape (N, dtype='int8') 
   
   Mean would be 
   
   scale_output * (Qout - zp_out) = scale_in * [(QA[0] + QA[1]  + QA[N-1]) 
- N* zp_in]/N
   
   scale_output * (Qout - zp_out) = scale_in * (Mean(QA) - zp_in)
   
   
   So, basically, upcast the quantized tensor to int32, call Int Mean, and then 
requantize if the output scale/zp are different.
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


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

2019-11-15 Thread GitBox
wweic commented on issue #4346: [Runtime] Make ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554491747
 
 
   > NOTE: You will likely need to change memory.h::Allocator interface to allow
   > 
   > ```
   > Allocator::make_with_extra_space(alignof(ObjectRef), size * 
sizeof(ObjectRef))
   > ```
   
   Thanks for coming up with the name. :-)


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 #4315: Add check to ensure input file was successfully opened in NNVM deploy…

2019-11-15 Thread GitBox
tqchen merged pull request #4315: Add check to ensure input file was 
successfully opened in NNVM deploy…
URL: https://github.com/apache/incubator-tvm/pull/4315
 
 
   


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] hcho3 opened a new pull request #4349: Fix docstring in topi.nn.fifo_buffer

2019-11-15 Thread GitBox
hcho3 opened a new pull request #4349: Fix docstring in topi.nn.fifo_buffer
URL: https://github.com/apache/incubator-tvm/pull/4349
 
 
   Rendered output:
   
   ![Screen Shot 2019-11-15 at 11 14 18 
AM](https://user-images.githubusercontent.com/2532981/68969178-33e11080-0799-11ea-8c6d-11ca3a001e20.png)
   


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

2019-11-15 Thread GitBox
tqchen edited a comment on issue #4346: [Runtime] Make ADTObject POD container 
type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554488600
 
 
   NOTE: You will likely need to change memory.h::Allocator interface to allow
   
   Allocator::make_with_extra_space(alignof(ObjectRef), size * 
sizeof(ObjectRef),)


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

2019-11-15 Thread GitBox
tqchen edited a comment on issue #4346: [Runtime] Make ADTObject POD container 
type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554488600
 
 
   NOTE: You will likely need to change memory.h::Allocator interface to allow
   ```
   Allocator::make_with_extra_space(alignof(ObjectRef), size * 
sizeof(ObjectRef))
   ```


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-15 Thread GitBox
tqchen commented on issue #4346: [Runtime] Make ADTObject POD container type
URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554488600
 
 
   NOTE: You will likely need to change memory.h::Allocator interface to allow
   
   Allocator::make_with_extra_space(size * sizeof(ObjectRef), 
alignof(ObjectRef))


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 (b0b16a0 -> 888a3c3)

2019-11-15 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 b0b16a0  [CodeGen] Add build config option disable_assert to control 
whether to generate assert (#4340)
 add 888a3c3  Bump up CUDA log version in tophub.py (#4347)

No new revisions were added by this update.

Summary of changes:
 python/tvm/autotvm/tophub.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[GitHub] [incubator-tvm] tqchen merged pull request #4347: Bump up CUDA log version in tophub.py

2019-11-15 Thread GitBox
tqchen merged pull request #4347: Bump up CUDA log version in tophub.py
URL: https://github.com/apache/incubator-tvm/pull/4347
 
 
   


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] weberlo commented on issue #4218: [Relay][VM][Interpreter] Enable first-class constructors in VM and interpreter via eta expansion

2019-11-15 Thread GitBox
weberlo commented on issue #4218: [Relay][VM][Interpreter] Enable first-class 
constructors in VM and interpreter via eta expansion
URL: https://github.com/apache/incubator-tvm/pull/4218#issuecomment-554483679
 
 
   @icemelon9 CI is green again


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] gussmith23 opened a new issue #4348: [Relay] Add tests in CI which run tests based on specific Relay feature flags

2019-11-15 Thread GitBox
gussmith23 opened a new issue #4348: [Relay] Add tests in CI which run tests 
based on specific Relay feature flags
URL: https://github.com/apache/incubator-tvm/issues/4348
 
 
   A persistent problem in Relay is what @MarisaKirisame calls the 
"split-brain" problem: the developers of Relay and the users of Relay are of 
two minds on how Relay works. Specifically, Relay developers want to support 
advanced features that didn't exist in NNVM, while Relay users often treat 
Relay as NNVM. For example, Relay users will write Relay passes that work like 
NNVM over Relay features that also existed in NNVM, and will break/behave 
incorrectly over new Relay features.
   
   In response to this problem, @MarisaKirisame has added [a feature 
manager](https://github.com/apache/incubator-tvm/pull/3238), which users can 
use to check the features of a Relay program. The associated issue also 
discusses modifying the pass manager such that each pass would need to specify 
what features a pass can handle, what features a pass may add, and which 
features a pass may remove. 
   
   We'd like to start adding tests into the CI which use Relay's feature sets 
to test newly added passes. We will test new passes on Relay programs with a 
variety of feature sets, to test whether they break programs which they claim 
they should support, given their feature set. New passes will only be tested on 
Relay programs with features they explicitly support. These new CI tests should 
help us ensure that pass developers appropriately mark which features their 
passes support and don't support. 
   
   **Task list**
   - [ ] Collect programs which have different feature sets
 + list features here...
   - [ ] Create infrastructure for testing all new passes


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 #4340: [CodeGen] Add build config option disable_assert to control whether to generate assert

2019-11-15 Thread GitBox
tqchen merged pull request #4340: [CodeGen] Add build config option 
disable_assert to control whether to generate assert
URL: https://github.com/apache/incubator-tvm/pull/4340
 
 
   


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 #4340: [CodeGen] Add build config option disable_assert to control whether to generate assert

2019-11-15 Thread GitBox
tqchen commented on issue #4340: [CodeGen] Add build config option 
disable_assert to control whether to generate assert
URL: https://github.com/apache/incubator-tvm/pull/4340#issuecomment-554466791
 
 
   Thanks @FrozenGene !


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 (a8e6ee9 -> b0b16a0)

2019-11-15 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 a8e6ee9  fix inconsistent tag name (#4134)
 add b0b16a0  [CodeGen] Add build config option disable_assert to control 
whether to generate assert (#4340)

No new revisions were added by this update.

Summary of changes:
 include/tvm/build_module.h|  4 +++
 include/tvm/ir_pass.h |  7 ++
 python/tvm/build_module.py|  3 ++-
 src/codegen/build_module.cc   |  1 +
 src/codegen/codegen.cc| 12 -
 src/pass/{detect_device.cc => skip_assert.cc} | 35 ---
 6 files changed, 46 insertions(+), 16 deletions(-)
 copy src/pass/{detect_device.cc => skip_assert.cc} (66%)



[incubator-tvm] branch master updated (5b1ca85 -> a8e6ee9)

2019-11-15 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 5b1ca85  [VTA] Bug fix for padded load with large inputs (#4293)
 add a8e6ee9  fix inconsistent tag name (#4134)

No new revisions were added by this update.

Summary of changes:
 tests/python/relay/test_op_level2.py | 48 
 topi/python/topi/arm_cpu/depthwise_conv2d.py |  4 +--
 2 files changed, 50 insertions(+), 2 deletions(-)



[GitHub] [incubator-tvm] kevinthesun merged pull request #4134: [TOPI] fix inconsistent tag name

2019-11-15 Thread GitBox
kevinthesun merged pull request #4134: [TOPI] fix inconsistent tag name
URL: https://github.com/apache/incubator-tvm/pull/4134
 
 
   


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 #4134: [TOPI] fix inconsistent tag name

2019-11-15 Thread GitBox
kevinthesun commented on issue #4134: [TOPI] fix inconsistent tag name
URL: https://github.com/apache/incubator-tvm/pull/4134#issuecomment-554464671
 
 
   Thanks @ziyu-guo 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 (9e6371f -> 5b1ca85)

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

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


from 9e6371f  imp module is deprecated (#4275)
 add 5b1ca85  [VTA] Bug fix for padded load with large inputs (#4293)

No new revisions were added by this update.

Summary of changes:
 .../chisel/src/main/scala/core/TensorLoad.scala|  29 +++---
 vta/tests/python/unittest/test_vta_insn.py | 116 +++--
 2 files changed, 75 insertions(+), 70 deletions(-)



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

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

 ##
 File path: topi/python/topi/transform.py
 ##
 @@ -155,6 +157,78 @@ def strided_slice(a, begin, end, strides=None):
 strides = []
 return cpp.strided_slice(a, begin, end, strides)
 
+@tvm.tag_scope(tag=tag.INJECTIVE+",strided_set")
+def strided_set(a, v, begin, end, strides=None):
+"""Set slice of an array.
+
+Parameters
+--
+a : tvm.Tensor
+The tensor to be sliced.
+
+v : tvm.Tensor
+The values to set
+
+begin: list of Expr
+The indices to begin with in the slicing.
+
+end: list of Expr
+Indicies indicating end of the slice.
+
+strides: list of Expr, optional
+Specifies the stride values, it can be negative
+in that case, the input tensor will be reversed
+in that particular axis.
+
+Returns
+---
+ret : tvm.Tensor
+"""
+n = len(a.shape)
+if strides is None:
+strides = [1] * n
+
+if len(begin) != n:
+raise ValueError("size mismatch")
+if len(end) != n:
+raise ValueError("size mismatch")
+if len(strides) != n:
+raise ValueError("size mismatch")
+
+begin = list(map(tvm.convert, begin))
+end = list(map(tvm.convert, end))
+strides = list(map(tvm.convert, strides))
+
+def _max(a, b):
+return tvm.expr.Select(a > b, a, b)
+
+# Convert negative indexes
+for i in range(n):
+begin[i] = tvm.if_then_else(begin[i] < 0,
+begin[i] + a.shape[i],
 
 Review comment:
   Yep, I don’t have much idea about this either


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] vegaluisjose commented on issue #4293: [VTA] Bug fix for padded load with large inputs

2019-11-15 Thread GitBox
vegaluisjose commented on issue #4293: [VTA] Bug fix for padded load with large 
inputs
URL: https://github.com/apache/incubator-tvm/pull/4293#issuecomment-554463825
 
 
   LGTM


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


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

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

 ##
 File path: python/tvm/relay/op/_transform.py
 ##
 @@ -304,6 +305,31 @@ def compute_argwhere(attrs, inputs, output_type, _):
 new_output_type = tvm.relay.ty.TensorType(output_shape, "int32")
 return [topi.argwhere(new_output_type, inputs[0])]
 
+@_reg.register_compute("strided_set")
+def compute_strided_set(attrs, inputs, output_type, _):
+"""Compute definition of strided_set"""
+begin = attrs.begin
+end = attrs.end
+strides = attrs.strides
+n = len(inputs[0].shape)
+ls = len(strides)
+if ls < n:
+strides = list(strides)
+strides[ls:] = [1] * (n - ls)
+lb = len(begin)
+if lb < n:
+begin = list(begin)
+for i in range(lb, n):
+begin.append(0 if strides[i] >= 0 else inputs.shape[i])
 
 Review comment:
   It’s fine, no worries :-)


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-15 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-554462420
 
 
   @abergeron ack, I'll investigate to see what causes the failure at the 
moment. Will report back by Tuesday.


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 #4293: [VTA] Bug fix for padded load with large inputs

2019-11-15 Thread GitBox
tmoreau89 commented on issue #4293: [VTA] Bug fix for padded load with large 
inputs
URL: https://github.com/apache/incubator-tvm/pull/4293#issuecomment-554462047
 
 
   Thanks. @vegaluisjose pending your approval I'll merge the changes.


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 #4338: AutoTVM: selecting tuning templates when extracting task

2019-11-15 Thread GitBox
comaniac commented on issue #4338: AutoTVM: selecting tuning templates when 
extracting task
URL: https://github.com/apache/incubator-tvm/pull/4338#issuecomment-554459503
 
 
   Thanks. LGTM.
   btw, would you update the tutorial 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] tqchen commented on issue #4275: imp module is deprecated

2019-11-15 Thread GitBox
tqchen commented on issue #4275: imp module is deprecated
URL: https://github.com/apache/incubator-tvm/pull/4275#issuecomment-554447028
 
 
   Thanks @were @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 #4275: imp module is deprecated

2019-11-15 Thread GitBox
tqchen merged pull request #4275: imp module is deprecated
URL: https://github.com/apache/incubator-tvm/pull/4275
 
 
   


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] iotamudelta commented on a change in pull request #4342: Add workgroup size attribute to AMDGPU functions in codegen

2019-11-15 Thread GitBox
iotamudelta commented on a change in pull request #4342: Add workgroup size 
attribute to AMDGPU functions in codegen
URL: https://github.com/apache/incubator-tvm/pull/4342#discussion_r346923874
 
 

 ##
 File path: src/codegen/llvm/codegen_amdgpu.cc
 ##
 @@ -36,13 +36,39 @@
 namespace tvm {
 namespace codegen {
 
+namespace {
+
+// calls the device api to get the max threads per block
+static inline int DetectROCMmaxThreadsPerBlock() {
+  TVMContext tvm_ctx;
+  tvm_ctx.device_type = kDLROCM;
+  tvm_ctx.device_id = 0;
+  tvm::runtime::DeviceAPI* api = tvm::runtime::DeviceAPI::Get(tvm_ctx, true);
+  if (api != nullptr) {
+TVMRetValue val;
+api->GetAttr(tvm_ctx, tvm::runtime::kExist, );
+if (val.operator int() == 1) {
+  tvm::runtime::DeviceAPI::Get(tvm_ctx)->
+GetAttr(tvm_ctx, tvm::runtime::kMaxThreadsPerBlock, );
+  return val.operator int();
+}
+  }
+  LOG(WARNING) << "Cannot get maximum number of threads for AMD codegen";
+  return 1024;
 
 Review comment:
   No. As said, NV doesn't have this issue since they compile to PTX IR and any 
__launch_bounds__ annotation is simply a performance optimization. This is 
independent of HIP - if you want to use a work group size >256, you must tell 
LC about it. __launch_bounds__ is the way to do it for HIP source kernels, 
there are obviously equivalent processes along to stack to get said information 
to LC.
   
   There is nothing inherently unstable with our HW with work group sizes >256 
- you simply must use it correctly.


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 #4271: [Relay][Frontend][ONNX] operator support: DepthToSpace, SpaceToDepth

2019-11-15 Thread GitBox
zhiics commented on issue #4271: [Relay][Frontend][ONNX] operator support: 
DepthToSpace, SpaceToDepth
URL: https://github.com/apache/incubator-tvm/pull/4271#issuecomment-554439968
 
 
   Thanks @cchung100m @jwfromm 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-tvm] zhiics merged pull request #4271: [Relay][Frontend][ONNX] operator support: DepthToSpace, SpaceToDepth

2019-11-15 Thread GitBox
zhiics merged pull request #4271: [Relay][Frontend][ONNX] operator support: 
DepthToSpace, SpaceToDepth
URL: https://github.com/apache/incubator-tvm/pull/4271
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


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

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

 ##
 File path: topi/python/topi/transform.py
 ##
 @@ -155,6 +157,78 @@ def strided_slice(a, begin, end, strides=None):
 strides = []
 return cpp.strided_slice(a, begin, end, strides)
 
+@tvm.tag_scope(tag=tag.INJECTIVE+",strided_set")
+def strided_set(a, v, begin, end, strides=None):
+"""Set slice of an array.
+
+Parameters
+--
+a : tvm.Tensor
+The tensor to be sliced.
+
+v : tvm.Tensor
+The values to set
+
+begin: list of Expr
+The indices to begin with in the slicing.
+
+end: list of Expr
+Indicies indicating end of the slice.
+
+strides: list of Expr, optional
+Specifies the stride values, it can be negative
+in that case, the input tensor will be reversed
+in that particular axis.
+
+Returns
+---
+ret : tvm.Tensor
+"""
+n = len(a.shape)
+if strides is None:
+strides = [1] * n
+
+if len(begin) != n:
+raise ValueError("size mismatch")
+if len(end) != n:
+raise ValueError("size mismatch")
+if len(strides) != n:
+raise ValueError("size mismatch")
+
+begin = list(map(tvm.convert, begin))
+end = list(map(tvm.convert, end))
+strides = list(map(tvm.convert, strides))
+
+def _max(a, b):
+return tvm.expr.Select(a > b, a, b)
+
+# Convert negative indexes
+for i in range(n):
+begin[i] = tvm.if_then_else(begin[i] < 0,
+begin[i] + a.shape[i],
 
 Review comment:
   By OOB do you mean out of bounds of the indexed array?  If yes, that is not 
a problem because the code will never try to fetch indices that are out the 
array shape.
   
   This code just tries to handle numpy-style negative indexing (starts from 
the end of the array) just like strided_slice does.


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] vinx13 merged pull request #4317: [Test][Relay][Pass] Add test case for lambda lift

2019-11-15 Thread GitBox
vinx13 merged pull request #4317: [Test][Relay][Pass] Add test case for lambda 
lift
URL: https://github.com/apache/incubator-tvm/pull/4317
 
 
   


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 (0235d28 -> 135587a)

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

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


from 0235d28  [RUNTIME] Add device query for AMD GcnArch (#4341)
 add 135587a  [Test][Relay][Pass] Add test case for lambda lift (#4317)

No new revisions were added by this update.

Summary of changes:
 .../test_pass_lambda_lift.py}  | 32 +++---
 1 file changed, 16 insertions(+), 16 deletions(-)
 copy tests/python/{unittest/test_runtime_vm_profiler.py => 
relay/test_pass_lambda_lift.py} (65%)



  1   2   >