You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/10/12 01:19:48 UTC
[GitHub] [incubator-mxnet] sxjscience opened a new pull request #19334: [Cmake] Create FindCUTENSOR.cmake
sxjscience opened a new pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334
## Description ##
Fix the cmake template to reflect the recent change of cutensor. @MoisesHer
## Checklist ##
### Essentials ###
- [x] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
- [x] Changes are complete (i.e. I finished coding on this PR)
- [ ] All changes have test coverage
- [ ] Code is well-documented
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] sxjscience commented on pull request #19334: [Cmake] Create FindCUTENSOR.cmake
Posted by GitBox <gi...@apache.org>.
sxjscience commented on pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334#issuecomment-707482138
To install cutensor, we need to use the following command:
```bash
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt update
sudo apt -y install libcutensor1 libcutensor-dev libcutensor-doc
# In addition, we can choose to link libcutensor.so to the 10.2 version
update-alternatives --set libcutensor.so.1.2.1 /usr/lib/x86_64-linux-gnu/libcutensor/10.2/libcutensor.so.1.2.1
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] sxjscience commented on a change in pull request #19334: [Cmake] Create FindCUTENSOR.cmake
Posted by GitBox <gi...@apache.org>.
sxjscience commented on a change in pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334#discussion_r503500761
##########
File path: config/linux_gpu.cmake
##########
@@ -41,6 +41,7 @@
#---------------------------------------------
set(USE_CUDA ON CACHE BOOL "Build with CUDA support")
set(USE_CUDNN ON CACHE BOOL "Build with cudnn support, if found")
+set(USE_CUTENSOR OFF CACHE BOOL "Build with cutensor support, if found")
Review comment:
Revised.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on a change in pull request #19334: [Cmake] Create FindCUTENSOR.cmake
Posted by GitBox <gi...@apache.org>.
leezu commented on a change in pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334#discussion_r503359068
##########
File path: config/linux_gpu.cmake
##########
@@ -41,6 +41,7 @@
#---------------------------------------------
set(USE_CUDA ON CACHE BOOL "Build with CUDA support")
set(USE_CUDNN ON CACHE BOOL "Build with cudnn support, if found")
+set(USE_CUTENSOR OFF CACHE BOOL "Build with cutensor support, if found")
Review comment:
Let's turn this `ON`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] sxjscience commented on pull request #19334: [Fix][CMake] Create FindCUTENSOR.cmake
Posted by GitBox <gi...@apache.org>.
sxjscience commented on pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334#issuecomment-708104909
I've checked manually and find that cutensor is used.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on a change in pull request #19334: [Fix][CMake] Create FindCUTENSOR.cmake
Posted by GitBox <gi...@apache.org>.
leezu commented on a change in pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334#discussion_r504153869
##########
File path: config/linux_gpu.cmake
##########
@@ -41,6 +41,7 @@
#---------------------------------------------
set(USE_CUDA ON CACHE BOOL "Build with CUDA support")
set(USE_CUDNN ON CACHE BOOL "Build with cudnn support, if found")
+set(USE_CUTENSOR OFF CACHE BOOL "Build with cutensor support, if found")
Review comment:
Why revert this commit?
##########
File path: CMakeLists.txt
##########
@@ -49,12 +49,12 @@ Format: Auto | Common | All | LIST(ARCH_AND_PTX ...)
- NUM: Any number. Only those pairs are currently accepted by NVCC though:
2.0 2.1 3.0 3.2 3.5 3.7 5.0 5.2 5.3 6.0 6.2 7.0 7.2 7.5")
option(USE_NCCL "Use NVidia NCCL with CUDA" OFF)
+option(USE_CUTENSOR "Use cuTENSOR" OFF)
option(USE_OPENCV "Build with OpenCV support" ON)
option(USE_OPENMP "Build with Openmp support" ON)
option(USE_FATBIN_COMPRESSION "Compress nvcc fatbin output" ON)
cmake_dependent_option(USE_NVML "Build with nvml support if found" ON "USE_CUDA" OFF)
cmake_dependent_option(USE_CUDNN "Build with cudnn support" ON "USE_CUDA" OFF) # one could set CUDNN_ROOT for search path
-cmake_dependent_option(USE_CUTENSOR "Build with cuTENSOR support" ON "USE_CUDA" OFF) # one could set CUTENSOR_ROOT for search path
Review comment:
Why revert this commit? The prior approach was correct?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on a change in pull request #19334: [Cmake] Create FindCUTENSOR.cmake
Posted by GitBox <gi...@apache.org>.
leezu commented on a change in pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334#discussion_r503515407
##########
File path: config/linux_gpu.cmake
##########
@@ -41,6 +41,7 @@
#---------------------------------------------
set(USE_CUDA ON CACHE BOOL "Build with CUDA support")
set(USE_CUDNN ON CACHE BOOL "Build with cudnn support, if found")
+set(USE_CUTENSOR OFF CACHE BOOL "Build with cutensor support, if found")
Review comment:
It seems you haven't pushed the change in linux_gpu.cmake?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #19334: [Cmake] Create FindCUTENSOR.cmake
Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334#issuecomment-706805484
Hey @sxjscience , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:
- To trigger all jobs: @mxnet-bot run ci [all]
- To trigger specific jobs: @mxnet-bot run ci [job1, job2]
***
**CI supported jobs**: [centos-gpu, unix-cpu, windows-cpu, windows-gpu, clang, centos-cpu, sanity, edge, website, unix-gpu, miscellaneous]
***
_Note_:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be 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:
users@infra.apache.org
[GitHub] [incubator-mxnet] sxjscience edited a comment on pull request #19334: [Fix][CMake] Create FindCUTENSOR.cmake
Posted by GitBox <gi...@apache.org>.
sxjscience edited a comment on pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334#issuecomment-707482138
To install cutensor, we need to use the following command:
```bash
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt update
sudo apt -y install libcutensor1 libcutensor-dev libcutensor-doc
# In addition, we can choose to link libcutensor.so to the 10.2 version
sudo update-alternatives --set libcutensor.so.1.2.1 /usr/lib/x86_64-linux-gnu/libcutensor/10.2/libcutensor.so.1.2.1
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] leezu merged pull request #19334: [Fix][CMake] Create FindCUTENSOR.cmake
Posted by GitBox <gi...@apache.org>.
leezu merged pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] sxjscience commented on a change in pull request #19334: [Cmake] Create FindCUTENSOR.cmake
Posted by GitBox <gi...@apache.org>.
sxjscience commented on a change in pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334#discussion_r503501064
##########
File path: cmake/Modules/FindCUTENSOR.cmake
##########
@@ -0,0 +1,33 @@
+# 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.
+
+include(FindPackageHandleStandardArgs)
+
+set(CUTENSOR_ROOT "/usr/local/cuda/include" CACHE PATH "cuTensor root folder")
+
+find_path(CUTENSOR_INCLUDE cutensor.h
+ PATHS ${CUTENSOR_ROOT} $ENV{CUTENSOR_ROOT}
+ DOC "Path to cuTensor include directory." )
+
+find_library(CUTENSOR_LIBRARY NAMES libcutensor.so libcutensor_static.a # libcudnn_static.a
Review comment:
Removed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] sxjscience commented on a change in pull request #19334: [Fix][CMake] Create FindCUTENSOR.cmake
Posted by GitBox <gi...@apache.org>.
sxjscience commented on a change in pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334#discussion_r504218839
##########
File path: CMakeLists.txt
##########
@@ -49,12 +49,12 @@ Format: Auto | Common | All | LIST(ARCH_AND_PTX ...)
- NUM: Any number. Only those pairs are currently accepted by NVCC though:
2.0 2.1 3.0 3.2 3.5 3.7 5.0 5.2 5.3 6.0 6.2 7.0 7.2 7.5")
option(USE_NCCL "Use NVidia NCCL with CUDA" OFF)
+option(USE_CUTENSOR "Use cuTENSOR" OFF)
option(USE_OPENCV "Build with OpenCV support" ON)
option(USE_OPENMP "Build with Openmp support" ON)
option(USE_FATBIN_COMPRESSION "Compress nvcc fatbin output" ON)
cmake_dependent_option(USE_NVML "Build with nvml support if found" ON "USE_CUDA" OFF)
cmake_dependent_option(USE_CUDNN "Build with cudnn support" ON "USE_CUDA" OFF) # one could set CUDNN_ROOT for search path
-cmake_dependent_option(USE_CUTENSOR "Build with cuTENSOR support" ON "USE_CUDA" OFF) # one could set CUTENSOR_ROOT for search path
Review comment:
There is no need to revert.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] leezu commented on a change in pull request #19334: [Cmake] Create FindCUTENSOR.cmake
Posted by GitBox <gi...@apache.org>.
leezu commented on a change in pull request #19334:
URL: https://github.com/apache/incubator-mxnet/pull/19334#discussion_r503358627
##########
File path: cmake/Modules/FindCUTENSOR.cmake
##########
@@ -0,0 +1,33 @@
+# 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.
+
+include(FindPackageHandleStandardArgs)
+
+set(CUTENSOR_ROOT "/usr/local/cuda/include" CACHE PATH "cuTensor root folder")
+
+find_path(CUTENSOR_INCLUDE cutensor.h
+ PATHS ${CUTENSOR_ROOT} $ENV{CUTENSOR_ROOT}
+ DOC "Path to cuTensor include directory." )
+
+find_library(CUTENSOR_LIBRARY NAMES libcutensor.so libcutensor_static.a # libcudnn_static.a
Review comment:
Please remove `libcutensor_static.a` due to licensing. When static linking cutensor, the resulting binary is not compatible with ASF requirements and to avoid static linking by mistake, we can choose to only support dynamic linking cutensor until NVidia grants a special license.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org