SIGN IN SIGN UP
apache / mxnet UNCLAIMED

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more

[MXNET-545] Fix broken cython build (#10951) * Fix broken build with cython 0.28 * Fix setup.py to be compatible with cython 0.28 * Fix broken cython ndarray module * Revised comments * Replace hard coded library path with one obtained by find_lib_path * Add documentation for MXNET_ENABLE_CYTHON and MXNET_ENFORCE_CYTHON * Add cython build to CI * Fix for cython CI * Adjust python environment for cython CI * Add make variables to set python executable * Fix typo * Fix nnvm include path * Does not use ccache for cython * Fix issues with the wildcards in the library list in Jenkinsfile * Fix issues with the wildcards in the library list in Jenkinsfile (continued) * Fix issues with the wildcards in the library list in Jenkinsfile (continued) * Intentionally introduce a bug to check that the tests actually runwith cython * Remove the intentionally introduced bug * Update installation doc * Retrigger CI * Run cython CI in ubuntu environment instead of CentOS environment * Commit a missed file * Fix a bug in check_cython * Refine environments for cython CI * Restore unrelated changes * Fix a problem occurring when the cython modules for python 2 and 3 are built successively * Trigger CI * Pin the cython version in the CI * Catch up #11320 * Remove optional arguments unused after #11320 * Trigger CI * Trigger CI * Trigger CI * Remove unnecessary stype argument from the NDArrayBase constructor * Revise confusing initialization of `_ndarray_cls` * Add cython build for python3 in CI * Fix misplaced cython build in CI * Adjust CI environments for cython * Fix invalid path for cython generated .so files in cmake build * Revert invalid fix * Revise docs * Revise check_cython * Temporaily use make instead of cmake for debugging * Temporal changes for debugging * Temporal changes for debugging * Temporaily use ctypes instead of cython modules for debugging * Temporaily disable ccache for debugging * Temporaily use make (DEV = 0) instead of cmake for debugging * Temporaily disable cudnn for debugging * Restore temporal changes * Temporarily disable coverage report * Adapt to Jenkinsfile_utils * Adapt to Jenkinsfile_utils (cont.) * Restore unrelated changes * Restore temporal changes * Resolving conflict * Test with the cmake build is removed * Add MXNET_ENABLE_CYTHON=0 to tensorrt test * Fix typo * Trigger CI * Trigger CI * Adapt to Jenkinsfile refactoring * Adapt to Jenkinsfile refactoring (cont.) * Trigger CI * Trigger CI * Stash missing cython modules * Trigger CI * CMake build of cython modules without unit tests * Fix typo * Trigger CI * Fix a mistake introduced in merging process * trigger test * Update Jenkinsfile_utils.groovy * Trigger CI * Trigger CI * Trigger CI * Trigger tests * Trigger tests * Trigger tests * Trigger tests * Trigger tests * Trigger tests * Trigger tests * Trigger tests
2019-05-25 07:36:30 +09:00
# 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.
function(add_cython_modules python_version)
find_package(Python3)
find_program(CYTHON_EXECUTABLE NAMES cython cython.bat cython3)
if(CYTHON_EXECUTABLE AND Python3_EXECUTABLE)
add_custom_command(COMMAND ${CMAKE_COMMAND} POST_BUILD
-E env MXNET_LIBRARY_PATH=${CMAKE_BINARY_DIR}/libmxnet.so
${Python3_EXECUTABLE} setup.py build_ext --inplace --with-cython
TARGET mxnet
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/python")
message("-- Cython modules will be built")
[MXNET-545] Fix broken cython build (#10951) * Fix broken build with cython 0.28 * Fix setup.py to be compatible with cython 0.28 * Fix broken cython ndarray module * Revised comments * Replace hard coded library path with one obtained by find_lib_path * Add documentation for MXNET_ENABLE_CYTHON and MXNET_ENFORCE_CYTHON * Add cython build to CI * Fix for cython CI * Adjust python environment for cython CI * Add make variables to set python executable * Fix typo * Fix nnvm include path * Does not use ccache for cython * Fix issues with the wildcards in the library list in Jenkinsfile * Fix issues with the wildcards in the library list in Jenkinsfile (continued) * Fix issues with the wildcards in the library list in Jenkinsfile (continued) * Intentionally introduce a bug to check that the tests actually runwith cython * Remove the intentionally introduced bug * Update installation doc * Retrigger CI * Run cython CI in ubuntu environment instead of CentOS environment * Commit a missed file * Fix a bug in check_cython * Refine environments for cython CI * Restore unrelated changes * Fix a problem occurring when the cython modules for python 2 and 3 are built successively * Trigger CI * Pin the cython version in the CI * Catch up #11320 * Remove optional arguments unused after #11320 * Trigger CI * Trigger CI * Trigger CI * Remove unnecessary stype argument from the NDArrayBase constructor * Revise confusing initialization of `_ndarray_cls` * Add cython build for python3 in CI * Fix misplaced cython build in CI * Adjust CI environments for cython * Fix invalid path for cython generated .so files in cmake build * Revert invalid fix * Revise docs * Revise check_cython * Temporaily use make instead of cmake for debugging * Temporal changes for debugging * Temporal changes for debugging * Temporaily use ctypes instead of cython modules for debugging * Temporaily disable ccache for debugging * Temporaily use make (DEV = 0) instead of cmake for debugging * Temporaily disable cudnn for debugging * Restore temporal changes * Temporarily disable coverage report * Adapt to Jenkinsfile_utils * Adapt to Jenkinsfile_utils (cont.) * Restore unrelated changes * Restore temporal changes * Resolving conflict * Test with the cmake build is removed * Add MXNET_ENABLE_CYTHON=0 to tensorrt test * Fix typo * Trigger CI * Trigger CI * Adapt to Jenkinsfile refactoring * Adapt to Jenkinsfile refactoring (cont.) * Trigger CI * Trigger CI * Stash missing cython modules * Trigger CI * CMake build of cython modules without unit tests * Fix typo * Trigger CI * Fix a mistake introduced in merging process * trigger test * Update Jenkinsfile_utils.groovy * Trigger CI * Trigger CI * Trigger CI * Trigger tests * Trigger tests * Trigger tests * Trigger tests * Trigger tests * Trigger tests * Trigger tests * Trigger tests
2019-05-25 07:36:30 +09:00
else()
message(FATAL_ERROR "-- Cython not found")
[MXNET-545] Fix broken cython build (#10951) * Fix broken build with cython 0.28 * Fix setup.py to be compatible with cython 0.28 * Fix broken cython ndarray module * Revised comments * Replace hard coded library path with one obtained by find_lib_path * Add documentation for MXNET_ENABLE_CYTHON and MXNET_ENFORCE_CYTHON * Add cython build to CI * Fix for cython CI * Adjust python environment for cython CI * Add make variables to set python executable * Fix typo * Fix nnvm include path * Does not use ccache for cython * Fix issues with the wildcards in the library list in Jenkinsfile * Fix issues with the wildcards in the library list in Jenkinsfile (continued) * Fix issues with the wildcards in the library list in Jenkinsfile (continued) * Intentionally introduce a bug to check that the tests actually runwith cython * Remove the intentionally introduced bug * Update installation doc * Retrigger CI * Run cython CI in ubuntu environment instead of CentOS environment * Commit a missed file * Fix a bug in check_cython * Refine environments for cython CI * Restore unrelated changes * Fix a problem occurring when the cython modules for python 2 and 3 are built successively * Trigger CI * Pin the cython version in the CI * Catch up #11320 * Remove optional arguments unused after #11320 * Trigger CI * Trigger CI * Trigger CI * Remove unnecessary stype argument from the NDArrayBase constructor * Revise confusing initialization of `_ndarray_cls` * Add cython build for python3 in CI * Fix misplaced cython build in CI * Adjust CI environments for cython * Fix invalid path for cython generated .so files in cmake build * Revert invalid fix * Revise docs * Revise check_cython * Temporaily use make instead of cmake for debugging * Temporal changes for debugging * Temporal changes for debugging * Temporaily use ctypes instead of cython modules for debugging * Temporaily disable ccache for debugging * Temporaily use make (DEV = 0) instead of cmake for debugging * Temporaily disable cudnn for debugging * Restore temporal changes * Temporarily disable coverage report * Adapt to Jenkinsfile_utils * Adapt to Jenkinsfile_utils (cont.) * Restore unrelated changes * Restore temporal changes * Resolving conflict * Test with the cmake build is removed * Add MXNET_ENABLE_CYTHON=0 to tensorrt test * Fix typo * Trigger CI * Trigger CI * Adapt to Jenkinsfile refactoring * Adapt to Jenkinsfile refactoring (cont.) * Trigger CI * Trigger CI * Stash missing cython modules * Trigger CI * CMake build of cython modules without unit tests * Fix typo * Trigger CI * Fix a mistake introduced in merging process * trigger test * Update Jenkinsfile_utils.groovy * Trigger CI * Trigger CI * Trigger CI * Trigger tests * Trigger tests * Trigger tests * Trigger tests * Trigger tests * Trigger tests * Trigger tests * Trigger tests
2019-05-25 07:36:30 +09:00
endif()
endfunction()