This repository was archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
cmake: staticbuild for binary distribution #17448
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # 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. | ||
|
|
||
| set(CMAKE_BUILD_TYPE "Distribution" CACHE STRING "Build type") | ||
| set(CFLAGS "-mno-avx" CACHE STRING "CFLAGS") | ||
| set(CXXFLAGS "-mno-avx" CACHE STRING "CXXFLAGS") | ||
|
|
||
| set(USE_CUDA OFF CACHE BOOL "Build with CUDA support") | ||
| set(USE_OPENCV ON CACHE BOOL "Build with OpenCV support") | ||
| set(USE_OPENMP ON CACHE BOOL "Build with Openmp support") | ||
| set(USE_MKL_IF_AVAILABLE OFF CACHE BOOL "Use Intel MKL if found") | ||
| set(USE_MKLDNN ON CACHE BOOL "Build with MKL-DNN support") | ||
| set(USE_LAPACK ON CACHE BOOL "Build with lapack support") | ||
| set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") | ||
| set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") | ||
| set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # 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. | ||
|
|
||
| set(CMAKE_BUILD_TYPE "Distribution" CACHE STRING "Build type") | ||
| set(CFLAGS "-mno-avx" CACHE STRING "CFLAGS") | ||
| set(CXXFLAGS "-mno-avx" CACHE STRING "CXXFLAGS") | ||
|
|
||
| set(USE_CUDA ON CACHE BOOL "Build with CUDA support") | ||
| set(USE_CUDNN ON CACHE BOOL "Build with CUDA support") | ||
| set(USE_OPENCV ON CACHE BOOL "Build with OpenCV support") | ||
| set(USE_OPENMP ON CACHE BOOL "Build with Openmp support") | ||
| set(USE_MKL_IF_AVAILABLE OFF CACHE BOOL "Use Intel MKL if found") | ||
| set(USE_MKLDNN ON CACHE BOOL "Build with MKL-DNN support") | ||
| set(USE_LAPACK ON CACHE BOOL "Build with lapack support") | ||
| set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") | ||
| set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") | ||
| set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") | ||
|
|
||
| set(CUDACXX "/usr/local/cuda-10.0/bin/nvcc" CACHE STRING "Cuda compiler") | ||
| set(MXNET_CUDA_ARCH "3.0;5.0;6.0;7.0;7.5" CACHE STRING "Cuda architectures") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # 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. | ||
|
|
||
| set(CMAKE_BUILD_TYPE "Distribution" CACHE STRING "Build type") | ||
| set(CFLAGS "-mno-avx" CACHE STRING "CFLAGS") | ||
| set(CXXFLAGS "-mno-avx" CACHE STRING "CXXFLAGS") | ||
| set(CFLAGS "-mno-avx" CACHE STRING "CFLAGS") | ||
| set(CXXFLAGS "-mno-avx" CACHE STRING "CXXFLAGS") | ||
|
|
||
| set(USE_CUDA ON CACHE BOOL "Build with CUDA support") | ||
| set(USE_CUDNN ON CACHE BOOL "Build with CUDA support") | ||
| set(USE_OPENCV ON CACHE BOOL "Build with OpenCV support") | ||
| set(USE_OPENMP ON CACHE BOOL "Build with Openmp support") | ||
| set(USE_MKL_IF_AVAILABLE OFF CACHE BOOL "Use Intel MKL if found") | ||
| set(USE_MKLDNN ON CACHE BOOL "Build with MKL-DNN support") | ||
| set(USE_LAPACK ON CACHE BOOL "Build with lapack support") | ||
| set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") | ||
| set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") | ||
| set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") | ||
|
|
||
| set(CUDACXX "/usr/local/cuda-10.1/bin/nvcc" CACHE STRING "Cuda compiler") | ||
| set(MXNET_CUDA_ARCH "3.0;5.0;6.0;7.0;7.5" CACHE STRING "Cuda architectures") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # 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. | ||
|
|
||
| set(CMAKE_BUILD_TYPE "Distribution" CACHE STRING "Build type") | ||
| set(CFLAGS "-mno-avx" CACHE STRING "CFLAGS") | ||
| set(CXXFLAGS "-mno-avx" CACHE STRING "CXXFLAGS") | ||
|
|
||
| set(USE_CUDA ON CACHE BOOL "Build with CUDA support") | ||
| set(USE_CUDNN ON CACHE BOOL "Build with CUDA support") | ||
| set(USE_OPENCV ON CACHE BOOL "Build with OpenCV support") | ||
| set(USE_OPENMP ON CACHE BOOL "Build with Openmp support") | ||
| set(USE_MKL_IF_AVAILABLE OFF CACHE BOOL "Use Intel MKL if found") | ||
| set(USE_MKLDNN ON CACHE BOOL "Build with MKL-DNN support") | ||
| set(USE_LAPACK ON CACHE BOOL "Build with lapack support") | ||
| set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") | ||
| set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") | ||
| set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") | ||
|
|
||
| set(CUDACXX "/usr/local/cuda-10.2/bin/nvcc" CACHE STRING "Cuda compiler") | ||
| set(MXNET_CUDA_ARCH "3.0;5.0;6.0;7.0;7.5" CACHE STRING "Cuda architectures") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # 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. | ||
|
|
||
| set(CMAKE_BUILD_TYPE "Distribution" CACHE STRING "Build type") | ||
| set(CFLAGS "-mno-avx" CACHE STRING "CFLAGS") | ||
| set(CXXFLAGS "-mno-avx" CACHE STRING "CXXFLAGS") | ||
|
|
||
| set(USE_CUDA ON CACHE BOOL "Build with CUDA support") | ||
| set(USE_CUDNN ON CACHE BOOL "Build with CUDA support") | ||
| set(USE_OPENCV ON CACHE BOOL "Build with OpenCV support") | ||
| set(USE_OPENMP ON CACHE BOOL "Build with Openmp support") | ||
| set(USE_MKL_IF_AVAILABLE OFF CACHE BOOL "Use Intel MKL if found") | ||
| set(USE_MKLDNN ON CACHE BOOL "Build with MKL-DNN support") | ||
| set(USE_LAPACK ON CACHE BOOL "Build with lapack support") | ||
| set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") | ||
| set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") | ||
| set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") | ||
|
|
||
| set(CUDACXX "/usr/local/cuda-7.5/bin/nvcc" CACHE STRING "Cuda compiler") | ||
| set(MXNET_CUDA_ARCH "3.0;3.5;5.0;5.2" CACHE STRING "Cuda architectures") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # 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. | ||
|
|
||
| set(CMAKE_BUILD_TYPE "Distribution" CACHE STRING "Build type") | ||
| set(CFLAGS "-mno-avx" CACHE STRING "CFLAGS") | ||
| set(CXXFLAGS "-mno-avx" CACHE STRING "CXXFLAGS") | ||
|
|
||
| set(USE_CUDA ON CACHE BOOL "Build with CUDA support") | ||
| set(USE_CUDNN ON CACHE BOOL "Build with CUDA support") | ||
| set(USE_OPENCV ON CACHE BOOL "Build with OpenCV support") | ||
| set(USE_OPENMP ON CACHE BOOL "Build with Openmp support") | ||
| set(USE_MKL_IF_AVAILABLE OFF CACHE BOOL "Use Intel MKL if found") | ||
| set(USE_MKLDNN ON CACHE BOOL "Build with MKL-DNN support") | ||
| set(USE_LAPACK ON CACHE BOOL "Build with lapack support") | ||
| set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") | ||
| set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") | ||
| set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") | ||
|
|
||
| set(CUDACXX "/usr/local/cuda-8.0/bin/nvcc" CACHE STRING "Cuda compiler") | ||
| set(MXNET_CUDA_ARCH "3.0;5.0;6.0;6.2" CACHE STRING "Cuda architectures") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we already install cmake somewhere else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not on the machines testing static build pipeline. It's installed in ubuntu_core.sh, but that's not executed for static build pipeline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ubuntu 14.04 is used for static build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we maybe extract that part into an own script so we can install the same cmake version for publishing as well as ci?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's sensible to separate Ubuntu 14.04 and "recent" Ubuntu code. Many workarounds are needed on Ubuntu 14.04, see for example #17474
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but shall we try to aim to make the two environments as similar as possible? I think we want to avoid running into issues caused by diverging environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, let's tackle it in a separate PR though once the CI runs stable again. (Refactoring the CI build scripts may introduce bugs at first and it's hard to find them if a lot of pipelines fail randomly as currently)