From 1a40c64671776d04140470a5a3759da34892b691 Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Sat, 22 Jan 2022 21:28:52 -0500 Subject: [PATCH 01/14] add mxnet; skip cuda builds --- recipes/mxnet/build.sh | 74 ++++++++ recipes/mxnet/conda_build_config.yaml | 4 + recipes/mxnet/meta.yaml | 167 ++++++++++++++++++ ...-use-existing-onednn-and-make-shared.patch | 63 +++++++ .../mxnet/patches/0002-edit-setup-py.patch | 25 +++ .../mxnet/patches/0003-put-dlpack-away.patch | 33 ++++ .../patches/0004-put-dmlc-away-maybe.patch | 61 +++++++ .../patches/0005-put-tvm-away-maybe.patch | 106 +++++++++++ recipes/mxnet/scripts/activate.sh | 8 + recipes/mxnet/scripts/deactivate.sh | 3 + 10 files changed, 544 insertions(+) create mode 100644 recipes/mxnet/build.sh create mode 100644 recipes/mxnet/conda_build_config.yaml create mode 100644 recipes/mxnet/meta.yaml create mode 100644 recipes/mxnet/patches/0001-use-existing-onednn-and-make-shared.patch create mode 100644 recipes/mxnet/patches/0002-edit-setup-py.patch create mode 100644 recipes/mxnet/patches/0003-put-dlpack-away.patch create mode 100644 recipes/mxnet/patches/0004-put-dmlc-away-maybe.patch create mode 100644 recipes/mxnet/patches/0005-put-tvm-away-maybe.patch create mode 100644 recipes/mxnet/scripts/activate.sh create mode 100644 recipes/mxnet/scripts/deactivate.sh diff --git a/recipes/mxnet/build.sh b/recipes/mxnet/build.sh new file mode 100644 index 0000000000000..481bdecba65de --- /dev/null +++ b/recipes/mxnet/build.sh @@ -0,0 +1,74 @@ +#!/bin/env bash + +if [[ "$OSTYPE" == "darwin"* ]]; then + export CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" + if [[ "$target_platform" == "osx-arm64" ]]; then + cp config/distribution/darwin_cpu.cmake config.cmake + else + cp config/distribution/darwin_cpu_mkl.cmake config.cmake + export MKL_INCLUDE_DIR=${CONDA_PREFIX}/include + fi +elif [[ "$OSTYPE" == "linux-gnu"* ]]; then + # if want to add mkl to cuda builds: + CMAKE_ARGS_BLAS=-DUSE_BLAS='mkl' + export MKL_INCLUDE_DIR=${CONDA_PREFIX}/include + if [[ "$cuda_compiler_version" == "None" ]]; then + cp config/distribution/linux_cpu_mkl.cmake config.cmake + elif [[ $cuda_compiler_version == 11.0 ]]; then + cp config/distribution/linux_cu110.cmake config.cmake + elif [[ $cuda_compiler_version == 11.2 ]]; then + cp config/distribution/linux_cu112.cmake config.cmake + fi +fi + +rm -rf build; mkdir build && cd build + +cmake \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR="lib" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_INCLUDE_PATH=$PREFIX/include \ + -DUSE_CPP_PACKAGE=ON \ + -DUSE_OPENMP=ON \ + -DBLA_STATIC=OFF \ + -DBUILD_SHARED_LIBS=ON \ + ${CMAKE_ARGS_BLAS} \ + ${CMAKE_ARGS} \ +.. + +make -j ${CPU_COUNT} +make install + +cd ../python +# ${PYTHON} setup.py install + +if [[ "$OSTYPE" == "darwin"* ]]; then + export MXNET_LIBRARY_PATH=${PREFIX}/lib/libmxnet.dylib +else + export MXNET_LIBRARY_PATH=${PREFIX}/lib/libmxnet.so +fi + +export MXNET_INCLUDE_PATH=${PREFIX}/include/mxnet + +${PYTHON} -m pip install . -vv + +# +# if [[ "$OSTYPE" == "darwin"* ]]; then +# ln ${PREFIX}/lib/libmxnet.dylib $SP_DIR/mxnet/libmxnet.dylib +# find ${PREFIX} | grep libmxnet.dylib | grep -v $PREFIX/lib/libmxnet.dylib | xargs rm -f +# +# else +# ln ${PREFIX}/lib/libmxnet.so $SP_DIR/mxnet/libmxnet.so +# find ${PREFIX} | grep libmxnet.so | grep -v $PREFIX/lib/libmxnet.so | xargs rm -f +# +# fi +# + +# Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. +# This will allow them to be run on environment activation. +for CHANGE in "activate" "deactivate" +do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/scripts/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" +done diff --git a/recipes/mxnet/conda_build_config.yaml b/recipes/mxnet/conda_build_config.yaml new file mode 100644 index 0000000000000..f17f422d3ac37 --- /dev/null +++ b/recipes/mxnet/conda_build_config.yaml @@ -0,0 +1,4 @@ +MACOSX_DEPLOYMENT_TARGET: # [osx] + - '10.13' # [osx] +cudnn: + - '8' diff --git a/recipes/mxnet/meta.yaml b/recipes/mxnet/meta.yaml new file mode 100644 index 0000000000000..a75ca9d43ba13 --- /dev/null +++ b/recipes/mxnet/meta.yaml @@ -0,0 +1,167 @@ +{% set name = "mxnet" %} +{% set version = "2.0.0.beta0.rc1" %} +{% set sha256 = "dfb741a07971b2607474b299ac880ba07e9fdaf217404c7d20bd5a4762324f26" %} +{% set build_number = "0" %} +{% set proc_type = "cuda" if cuda_compiler_version != "None" else "cpu" %} + +package: + name: mxnet + version: {{ version }} + +source: + - url: https://github.com/apache/incubator-{{ name }}/archive/refs/tags/v{{ version }}.tar.gz + sha256: {{ sha256 }} + # build as provided upstream: + # see some discussion here: + # https://github.com/apache/incubator-mxnet/issues/19610 + - url: https://github.com/dmlc/dmlc-core/archive/5df8305.tar.gz + sha256: a8046f752f36005564d2924b4b6f73e1aea3cce7ff10f9e19d99ad6a22a045b2 + folder: 3rdparty/dmlc-core + - url: https://github.com/dmlc/ps-lite/archive/34fd45c.tar.gz + sha256: ec5d5baab8bbf0c3983ad5f18d7f963f15ae7cd4d154ec204b03c1dceccf209b + folder: 3rdparty/ps-lite + - url: https://github.com/dmlc/dlpack/archive/3efc489.tar.gz + sha256: b59586ce69bcf3efdbf3cf4803fadfeaae4948044e2b8d89cf912194cf28f233 + folder: 3rdparty/dlpack + - url: https://github.com/google/googletest/archive/eb9225c.tar.gz + sha256: a4cb4b0c3ebb191b798594aca674ad47eee255dcb4c26885cf7f49777703484f + folder: 3rdparty/googletest + - url: https://github.com/apache/incubator-tvm/archive/efdac94.tar.gz + sha256: 656c38d66baeab885b0212602148bb55ad3cf7d22f52ded8ece53f88e103a2f5 + folder: 3rdparty/tvm + - url: https://github.com/onnx/onnx-tensorrt/archive/2eb74d9.tar.gz + sha256: df99819727445c247fb5c21c2fd825ded3269376867457ae84fa6d6f1c0ae331 + folder: 3rdparty/onnx-tensorrt + - url: https://github.com/NVlabs/cub/archive/0158fa1.tar.gz + sha256: 43424c4c17a997d1d730c89ec14688671245de7941e02b388d7d3df6ea53777a + folder: 3rdparty/nvidia_cub + - url: https://github.com/nih-at/libzip/releases/download/v1.8.0/libzip-1.8.0.tar.gz + sha256: 30ee55868c0a698d3c600492f2bea4eb62c53849bcf696d21af5eb65f3f3839e + folder: 3rdparty/libzip + - url: https://github.com/kpu/intgemm/archive/8f28282.tar.gz + sha256: bc8bd8015613a13747eb769876385ec53e8c1ea7ae3f8414521dc53b8fcdfc65 + folder: 3rdparty/intgemm + # this onednn folder is unneeded, but somewhere cmake looks for it... + # so keep it for now + - url: https://github.com/oneapi-src/oneDNN/archive/f40443c.tar.gz + sha256: da1dd1bb68ce3318db11e57971f975653e84adcb7d65cd879e558f2245e6de9a + folder: 3rdparty/onednn + - patches: + # must be in order + # start with onednn and shared stuff + # 0001 will stop it from building onednn + - patches/0001-use-existing-onednn-and-make-shared.patch + # it still builds other libraries above + - patches/0002-edit-setup-py.patch + # then aarch64 and ppc64le specific + # then osx-64 specific + # then linux-64 specific + - patches/0003-put-dlpack-away.patch # [unix and (target_platform != "osx-arm64")] + - patches/0004-put-dmlc-away-maybe.patch # [unix and x86_64] + # - patches/0005-put-tvm-away-maybe.patch # [unix and x86_64] + +build: + number: {{ build_number }} + skip: True # [win or cuda_compiler_version != "None"] + string: py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ proc_type }} # [cuda_compiler_version == "None"] + string: py{{ CONDA_PY }}{{ cuda_compiler_version|replace('.', '') }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ proc_type }} # [cuda_compiler_version != "None"] + run_exports: + # ensure matching proc-type + - mxnet =*=*_{{ proc_type }} + +requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('fortran') }} + - {{ compiler('cuda') }} # [cuda_compiler_version != "None"] + - make + - cmake + - ccache + - pkgconfig + - pkg-config + + host: + # for library pkg, libmxnet + - openblas + - llvm-openmp # [unix] + - mkl # [target_platform != "osx-arm64"] + - mkl-include # [target_platform != "osx-arm64"] + - libopencv + - graphviz + - onednn + - cudnn # [cuda_compiler_version != "None"] + - nccl # [cuda_compiler_version != "None"] + - cutensor # [cuda_compiler_version != "None"] + - libjpeg-turbo + - libprotobuf + # for python pkg, mxnet + - python + - pip + - setuptools + - requests >=2.20.0,<3 + # for 3rdparty stuff + - dlpack # [unix and (target_platform != "osx-arm64")] + - dmlc # [unix and (target_platform != "osx-arm64")] + # - libtvm # [unix and x86_64] + # - tvm-py # [unix and x86_64] + # - nnvm # [unix and x86_64] + + run: + # for library pkg, libmxnet + - {{ pin_compatible('openblas') }} + - {{ pin_compatible('llvm-openmp') }} # [unix] + - {{ pin_compatible('mkl') }} # [target_platform != "osx-arm64"] + - {{ pin_compatible('libopencv') }} + - {{ pin_compatible('graphviz') }} + - {{ pin_compatible('onednn') }} + - {{ pin_compatible('cudnn') }} # [cuda_compiler_version != "None"] + - {{ pin_compatible('nccl') }} # [cuda_compiler_version != "None"] + - {{ pin_compatible('cutensor') }} # [cuda_compiler_version != "None"] + - {{ pin_compatible('libjpeg-turbo') }} + - {{ pin_compatible('libprotobuf') }} + # for python pkg, mxnet + - python + - numpy >=1.17 + - requests >=2.20.0,<3 + - python-graphviz >=0.8.1,<0.9.0 + # for 3rdparty stuff + - {{ pin_compatible('dlpack') }} # [unix and (target_platform != "osx-arm64")] + - {{ pin_compatible('dmlc') }} # [unix and (target_platform != "osx-arm64")] + # - {{ pin_compatible('libtvm') }} # [unix and x86_64] + # - {{ pin_compatible('tvm-py') }} # [unix and x86_64] + # - {{ pin_compatible('nnvm') }} # [unix and x86_64] + +test: + imports: + - mxnet + requires: + - pip + commands: + - pip check + - test -f "${PREFIX}/lib/libmxnet${SHLIB_EXT}" # [unix] + - python -c "import mxnet as mx; print(mx.runtime.feature_list())" + +about: + home: http://mxnet.io + license: Apache-2.0 + license_family: Apache + license_file: LICENSE + summary: MXNet is a deep learning framework designed for both efficiency and flexibility + description: | + Apache MXNet (incubating) is a deep learning framework designed for both + efficiency and flexibility. It allows you to mix symbolic and imperative + programming to maximize efficiency and productivity. At its core, MXNet + contains a dynamic dependency scheduler that automatically parallelizes both + symbolic and imperative operations on the fly. A graph optimization layer on + top of that makes symbolic execution fast and memory efficient. MXNet is + portable and lightweight, scaling effectively to multiple GPUs and multiple + machines. MXNet is also more than a deep learning project. It is also a + collection of blue prints and guidelines for building deep learning systems, + and interesting insights of DL systems for hackers. + doc_url: https://mxnet.incubator.apache.org/ + dev_url: https://github.com/apache/incubator-mxnet + +extra: + recipe-maintainers: + - ngam diff --git a/recipes/mxnet/patches/0001-use-existing-onednn-and-make-shared.patch b/recipes/mxnet/patches/0001-use-existing-onednn-and-make-shared.patch new file mode 100644 index 0000000000000..4810a075c067a --- /dev/null +++ b/recipes/mxnet/patches/0001-use-existing-onednn-and-make-shared.patch @@ -0,0 +1,63 @@ +From bf3f559d0019db4675473d2ed9c88da6aa111683 Mon Sep 17 00:00:00 2001 +From: ngam <67342040+ngam@users.noreply.github.com> +Date: Sat, 22 Jan 2022 18:55:03 -0500 +Subject: [PATCH 1/5] use existing onednn and make shared + +--- + CMakeLists.txt | 14 +++++--------- + 1 file changed, 5 insertions(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 196e0078a..780392ea1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -290,7 +290,7 @@ if(USE_ONEDNN) + set(DNNL_BUILD_EXAMPLES OFF CACHE INTERNAL "" FORCE) + set(DNNL_ARCH_OPT_FLAGS "" CACHE INTERNAL "" FORCE) + set(DNNL_ENABLE_JIT_PROFILING OFF CACHE INTERNAL "" FORCE) +- set(DNNL_LIBRARY_TYPE STATIC CACHE INTERNAL "" FORCE) ++ set(DNNL_LIBRARY_TYPE SHARED CACHE INTERNAL "" FORCE) + set(DNNL_ENABLE_CONCURRENT_EXEC ON CACHE INTERNAL "" FORCE) + set(DNNL_ENABLE_PRIMITIVE_CACHE ON CACHE INTERNAL "" FORCE) + +@@ -298,15 +298,11 @@ if(USE_ONEDNN) + set(DNNL_CPU_RUNTIME SEQ CACHE INTERNAL "" FORCE) + endif() + +- set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/onednn") +- add_subdirectory(3rdparty/onednn) ++ set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include") + endfunction() + load_onednn() +- include_directories(3rdparty/onednn/include) +- include_directories(${PROJECT_BINARY_DIR}/3rdparty/onednn/include) + add_definitions(-DMXNET_USE_ONEDNN=1) + list(APPEND mxnet_LINKER_LIBS dnnl) +- set_target_properties(dnnl PROPERTIES CXX_CLANG_TIDY "") # don't lint 3rdparty dependency + endif() + + if(USE_CPP_PACKAGE) +@@ -673,7 +669,7 @@ if(UNIX) + if(MXNET_BUILD_SHARED_LIBS) + add_library(mxnet SHARED ${SOURCE}) + else() +- add_library(mxnet STATIC ${SOURCE}) ++ add_library(mxnet SHARED ${SOURCE}) + endif() + target_link_libraries(mxnet PUBLIC mshadow) + target_link_libraries(mxnet PUBLIC ${CMAKE_DL_LIBS}) +@@ -856,9 +852,9 @@ endif() + if(USE_ONEDNN) + add_custom_command(TARGET mxnet POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy +- ${CMAKE_BINARY_DIR}/3rdparty/onednn/include/oneapi/dnnl/dnnl_config.h ${CMAKE_SOURCE_DIR}/include/onednn/oneapi/dnnl/ ++ ${CMAKE_INSTALL_PREFIX}/include/dnnl_config.h ${CMAKE_SOURCE_DIR}/include/onednn/oneapi/dnnl/ + COMMAND ${CMAKE_COMMAND} -E copy +- ${CMAKE_BINARY_DIR}/3rdparty/onednn/include/oneapi/dnnl/dnnl_version.h ${CMAKE_SOURCE_DIR}/include/onednn/oneapi/dnnl/) ++ ${CMAKE_INSTALL_PREFIX}/include/dnnl_version.h ${CMAKE_SOURCE_DIR}/include/onednn/oneapi/dnnl/) + endif() + + if(USE_INTGEMM) +-- +2.34.1 + diff --git a/recipes/mxnet/patches/0002-edit-setup-py.patch b/recipes/mxnet/patches/0002-edit-setup-py.patch new file mode 100644 index 0000000000000..1bfb115d96606 --- /dev/null +++ b/recipes/mxnet/patches/0002-edit-setup-py.patch @@ -0,0 +1,25 @@ +From 67375a7ba098885591eed781c8c38c1e7d0ff356 Mon Sep 17 00:00:00 2001 +From: ngam <67342040+ngam@users.noreply.github.com> +Date: Sat, 22 Jan 2022 20:36:55 -0500 +Subject: [PATCH 2/5] edit setup py + +--- + python/setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/python/setup.py b/python/setup.py +index ce1130ba8..08769aca9 100644 +--- a/python/setup.py ++++ b/python/setup.py +@@ -121,7 +121,7 @@ setup(name='mxnet', + version=__version__, + description=open(os.path.join(CURRENT_DIR, 'README.md')).read(), + packages=find_packages(), +- data_files=[('mxnet', [LIB_PATH[0]])], ++ data_files=[('mxnet', [])], + url='https://github.com/apache/incubator-mxnet', + ext_modules=config_cython(), + classifiers=[ +-- +2.34.1 + diff --git a/recipes/mxnet/patches/0003-put-dlpack-away.patch b/recipes/mxnet/patches/0003-put-dlpack-away.patch new file mode 100644 index 0000000000000..7cd8200a2b45b --- /dev/null +++ b/recipes/mxnet/patches/0003-put-dlpack-away.patch @@ -0,0 +1,33 @@ +From 6fb748ca325387ca38849d15742bee2fbe0cad29 Mon Sep 17 00:00:00 2001 +From: ngam <67342040+ngam@users.noreply.github.com> +Date: Sat, 22 Jan 2022 20:55:20 -0500 +Subject: [PATCH 3/5] put dlpack away + +--- + CMakeLists.txt | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 780392ea1..4c6da9af4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -342,7 +342,6 @@ include_directories("include") + include_directories("3rdparty/tvm/nnvm/include") + include_directories("3rdparty/tvm/include") + include_directories("3rdparty/dmlc-core/include") +-include_directories("3rdparty/dlpack/include") + + if(UNIX) + find_library(RTLIB rt) +@@ -939,7 +938,7 @@ install(TARGETS mxnet + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT MXNET_Development + ) +-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dlpack/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/include/dlpack/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dmlc-core/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/mshadow/mshadow/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mshadow) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mxnet) +-- +2.34.1 + diff --git a/recipes/mxnet/patches/0004-put-dmlc-away-maybe.patch b/recipes/mxnet/patches/0004-put-dmlc-away-maybe.patch new file mode 100644 index 0000000000000..71ef67dc35ed1 --- /dev/null +++ b/recipes/mxnet/patches/0004-put-dmlc-away-maybe.patch @@ -0,0 +1,61 @@ +From d24618a9fe2259caec27f13b5dc7d2273267920d Mon Sep 17 00:00:00 2001 +From: ngam <67342040+ngam@users.noreply.github.com> +Date: Sat, 22 Jan 2022 21:00:21 -0500 +Subject: [PATCH 4/5] put dmlc away maybe + +--- + CMakeLists.txt | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4c6da9af4..22a825c1c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -341,7 +341,6 @@ endforeach() + include_directories("include") + include_directories("3rdparty/tvm/nnvm/include") + include_directories("3rdparty/tvm/include") +-include_directories("3rdparty/dmlc-core/include") + + if(UNIX) + find_library(RTLIB rt) +@@ -497,11 +496,6 @@ if(USE_CUTENSOR) + endif() + endif() + +-if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dmlc-core/cmake) +- add_subdirectory("3rdparty/dmlc-core") +- set_target_properties(dmlc PROPERTIES CXX_CLANG_TIDY "") # don't lint 3rdparty dependency +-endif() +- + FILE(GLOB_RECURSE SOURCE "src/*.cc" "src/*.h" "include/*.h") + FILE(GLOB_RECURSE CUDA "src/*.cu" "src/*.cuh") + +@@ -786,7 +780,6 @@ elseif(MSVC) + target_link_libraries(mxnet PUBLIC mshadow) + endif() + endif() +-target_compile_definitions(mxnet PUBLIC DMLC_LOG_FATAL_THROW=$) + + # extension libraries (custom operators, custom subgraphs) are built by default + add_library(customop_lib SHARED ${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/gemm_lib.cc ${CMAKE_CURRENT_SOURCE_DIR}/src/lib_api.cc) +@@ -939,7 +932,7 @@ install(TARGETS mxnet + COMPONENT MXNET_Development + ) + install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/include/dlpack/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dmlc-core/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/include/dmlc/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/mshadow/mshadow/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mshadow) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mxnet) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/tvm/nnvm/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +@@ -991,7 +984,6 @@ endif() + find_package(Python3) + set(LINT_DIRS "include src plugin tests") + set(EXCLUDE_PATH "src/operator/contrib/ctc_include") +-add_custom_target(mxnet_lint COMMAND ${CMAKE_COMMAND} -DMSVC=${MSVC} -DPYTHON_EXECUTABLE=${Python3_EXECUTABLE} -DLINT_DIRS=${LINT_DIRS} -DPROJECT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DPROJECT_NAME=mxnet -DEXCLUDE_PATH=${EXCLUDE_PATH} -P ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/dmlc-core/cmake/lint.cmake) + + if(BUILD_CYTHON_MODULES) + include(cmake/BuildCythonModules.cmake) +-- +2.34.1 + diff --git a/recipes/mxnet/patches/0005-put-tvm-away-maybe.patch b/recipes/mxnet/patches/0005-put-tvm-away-maybe.patch new file mode 100644 index 0000000000000..663cdda4acf32 --- /dev/null +++ b/recipes/mxnet/patches/0005-put-tvm-away-maybe.patch @@ -0,0 +1,106 @@ +From 175be49002a6f656891b401aabf1bdc433046176 Mon Sep 17 00:00:00 2001 +From: ngam <67342040+ngam@users.noreply.github.com> +Date: Sat, 22 Jan 2022 21:09:49 -0500 +Subject: [PATCH 5/5] put tvm away maybe + +--- + CMakeLists.txt | 43 +------------------------------------------ + 1 file changed, 1 insertion(+), 42 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 22a825c1c..c31750d0d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -339,8 +339,6 @@ foreach(var ${C_CXX_INCLUDE_DIRECTORIES}) + endforeach() + + include_directories("include") +-include_directories("3rdparty/tvm/nnvm/include") +-include_directories("3rdparty/tvm/include") + + if(UNIX) + find_library(RTLIB rt) +@@ -499,36 +497,16 @@ endif() + FILE(GLOB_RECURSE SOURCE "src/*.cc" "src/*.h" "include/*.h") + FILE(GLOB_RECURSE CUDA "src/*.cu" "src/*.cuh") + +-if(MSVC) +- FILE(GLOB_RECURSE TVM_BRIDGE_SOURCE "src/*/tvm_bridge.cc") +- list(REMOVE_ITEM SOURCE ${TVM_BRIDGE_SOURCE}) +-endif() +- + if(NOT USE_INTGEMM) + FILE(GLOB_RECURSE INTGEMM_OPERATOR_SOURCE "src/operator/contrib/intgemm/*.cc" "src/operator/contrib/intgemm/*.h") + list(REMOVE_ITEM SOURCE ${INTGEMM_OPERATOR_SOURCE}) + endif() + +-# add nnvm to source +-FILE(GLOB_RECURSE NNVMSOURCE +- 3rdparty/tvm/nnvm/src/c_api/*.cc +- 3rdparty/tvm/nnvm/src/core/*.cc +- 3rdparty/tvm/nnvm/src/pass/*.cc +- 3rdparty/tvm/nnvm/src/c_api/*.h +- 3rdparty/tvm/nnvm/src/core/*.h +- 3rdparty/tvm/nnvm/src/pass/*.h +- 3rdparty/tvm/nnvm/include/*.h) +-add_library(nnvm OBJECT ${NNVMSOURCE}) +-set_target_properties(nnvm PROPERTIES CXX_CLANG_TIDY "") # don't lint 3rdparty dependency +-list(APPEND SOURCE $) +- + add_library(miniz STATIC "3rdparty/miniz/miniz.c") + target_include_directories(miniz PUBLIC "3rdparty/miniz") + list(APPEND mxnet_LINKER_LIBS miniz) + + # add source group +-FILE(GLOB_RECURSE GROUP_SOURCE "src/*.cc" "3rdparty/tvm/nnvm/*.cc" "plugin/*.cc") +-FILE(GLOB_RECURSE GROUP_Include "src/*.h" "3rdparty/tvm/nnvm/*.h" "3rdparty/mshadow/mshadow/*.h" "plugin/*.h") + FILE(GLOB_RECURSE GROUP_CUDA "src/*.cu" "src/*.cuh" "3rdparty/mshadow/mshadow/*.cuh" "plugin/*.cu" + "plugin/*.cuh" "3rdparty/nvidia_cub/cub/*.cuh") + assign_source_group("Source" ${GROUP_SOURCE}) +@@ -853,34 +831,15 @@ if(USE_INTGEMM) + target_link_libraries(mxnet PRIVATE intgemm) + endif() + +-function(BuildTVMOP) +- # scope the variables in BuildTVM.cmake to avoid conflict +- include(cmake/BuildTVM.cmake) +- add_subdirectory("3rdparty/tvm") +- set_target_properties(tvm PROPERTIES CXX_CLANG_TIDY "") # don't lint 3rdparty dependency +- set_target_properties(tvm_runtime PROPERTIES CXX_CLANG_TIDY "") # don't lint 3rdparty dependency +-endfunction() +- + if(USE_TVM_OP) + list(APPEND mxnet_LINKER_LIBS tvm_runtime) +- BuildTVMOP() + find_package(Python3 REQUIRED) +- set(TVM_OP_COMPILE_OPTIONS "-o${CMAKE_CURRENT_BINARY_DIR}" "--config" "${CMAKE_CURRENT_BINARY_DIR}/tvmop.conf" "-L" "${CMAKE_CURRENT_BINARY_DIR}/3rdparty/tvm") + if(UNIX AND NOT APPLE) + set(LD_LIBRARY_PATH "LD_LIBRARY_PATH") + elseif(APPLE) + set(LD_LIBRARY_PATH "DYLD_LIBRARY_PATH") + endif() +- if(USE_CUDA) +- set(TVM_OP_COMPILE_OPTIONS "${TVM_OP_COMPILE_OPTIONS}" "--cuda-arch" "\"${CUDA_ARCH_FLAGS}\"") +- endif() + +- add_custom_command(TARGET mxnet POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E env +- PYTHONPATH="${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/tvm/python:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/tvm/topi/python:${CMAKE_CURRENT_SOURCE_DIR}/contrib" +- ${LD_LIBRARY_PATH}=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_BINARY_DIR}/3rdparty/tvm:$ENV{${LD_LIBRARY_PATH}} +- ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/contrib/tvmop/compile.py ${TVM_OP_COMPILE_OPTIONS} +- ) + endif() + + if(USE_PLUGINS_WARPCTC) +@@ -935,7 +894,7 @@ install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/include/dlpack/ DESTINATION ${CMAKE_IN + install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/include/dmlc/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/mshadow/mshadow/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mshadow) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mxnet) +-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/tvm/nnvm/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/tvm/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + if(INSTALL_EXAMPLES) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/example DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}) + endif() +-- +2.34.1 + diff --git a/recipes/mxnet/scripts/activate.sh b/recipes/mxnet/scripts/activate.sh new file mode 100644 index 0000000000000..81fdf850fbc6a --- /dev/null +++ b/recipes/mxnet/scripts/activate.sh @@ -0,0 +1,8 @@ +if [[ "$OSTYPE" == "darwin"* ]]; then + export MXNET_LIBRARY_PATH="$CONDA_PREFIX/lib/libmxnet.dylib" +else + export MXNET_LIBRARY_PATH="$CONDA_PREFIX/lib/libmxnet.so" +fi + +export MXNET_INCLUDE_PATH="$CONDA_PREFIX/include/mxnet" + diff --git a/recipes/mxnet/scripts/deactivate.sh b/recipes/mxnet/scripts/deactivate.sh new file mode 100644 index 0000000000000..f7d2dcba6b73c --- /dev/null +++ b/recipes/mxnet/scripts/deactivate.sh @@ -0,0 +1,3 @@ +unset MXNET_LIBRARY_PATH +unset MXNET_INCLUDE_PATH + From 0a3d215f64b5e47a7f7bf2bb77d1792c47a41eff Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Sun, 23 Jan 2022 21:02:49 -0500 Subject: [PATCH 02/14] potential fix for future cuda builds Details: - run failes around 90% through cmake with around 5.5 hours - complains about not finding `libnvidia-ml.so.1` - we have `libnvidia-ml.so` in /usr/local/cuda/lib64/stubs - we could maybe make symlink here too? --- recipes/mxnet/build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/recipes/mxnet/build.sh b/recipes/mxnet/build.sh index 481bdecba65de..c06fcaabe8835 100644 --- a/recipes/mxnet/build.sh +++ b/recipes/mxnet/build.sh @@ -16,8 +16,16 @@ elif [[ "$OSTYPE" == "linux-gnu"* ]]; then cp config/distribution/linux_cpu_mkl.cmake config.cmake elif [[ $cuda_compiler_version == 11.0 ]]; then cp config/distribution/linux_cu110.cmake config.cmake + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64/stubs elif [[ $cuda_compiler_version == 11.2 ]]; then cp config/distribution/linux_cu112.cmake config.cmake + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64/stubs + # setting LD_LIBRARY_PATH to potential fix future cuda builds. + # Details from CI runs (limited to 6 hours): + # - run fails around 90% through cmake with around 5.5 hours + # - complains about not finding `libnvidia-ml.so.1` + # - we have `libnvidia-ml.so` in /usr/local/cuda/lib64/stubs + # - we could maybe make symlink here too? fi fi From b93ffcae7da1596e4cddf48023ac9ea13daacdef Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Mon, 24 Jan 2022 00:07:46 -0500 Subject: [PATCH 03/14] fix ps-lite fail --- recipes/mxnet/build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/mxnet/build.sh b/recipes/mxnet/build.sh index c06fcaabe8835..b27adbc5505bc 100644 --- a/recipes/mxnet/build.sh +++ b/recipes/mxnet/build.sh @@ -31,6 +31,10 @@ fi rm -rf build; mkdir build && cd build +# consider adding: -DBUILD_SHARED_LIBS=ON \ +# causing ps-lite to fail? +# need to maybe add ps-lite pkg to cf + cmake \ -DCMAKE_PREFIX_PATH=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ @@ -40,7 +44,6 @@ cmake \ -DUSE_CPP_PACKAGE=ON \ -DUSE_OPENMP=ON \ -DBLA_STATIC=OFF \ - -DBUILD_SHARED_LIBS=ON \ ${CMAKE_ARGS_BLAS} \ ${CMAKE_ARGS} \ .. @@ -49,7 +52,6 @@ make -j ${CPU_COUNT} make install cd ../python -# ${PYTHON} setup.py install if [[ "$OSTYPE" == "darwin"* ]]; then export MXNET_LIBRARY_PATH=${PREFIX}/lib/libmxnet.dylib From b75e6f17de3607ed3ce7b63a6f6e02a07b8f3937 Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Wed, 9 Mar 2022 12:48:29 -0500 Subject: [PATCH 04/14] Update meta.yaml --- recipes/mxnet/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/mxnet/meta.yaml b/recipes/mxnet/meta.yaml index a75ca9d43ba13..854d610e5ee0d 100644 --- a/recipes/mxnet/meta.yaml +++ b/recipes/mxnet/meta.yaml @@ -1,5 +1,5 @@ {% set name = "mxnet" %} -{% set version = "2.0.0.beta0.rc1" %} +{% set version = "2.0.0.beta1.rc1" %} {% set sha256 = "dfb741a07971b2607474b299ac880ba07e9fdaf217404c7d20bd5a4762324f26" %} {% set build_number = "0" %} {% set proc_type = "cuda" if cuda_compiler_version != "None" else "cpu" %} @@ -123,8 +123,8 @@ requirements: # for python pkg, mxnet - python - numpy >=1.17 - - requests >=2.20.0,<3 - - python-graphviz >=0.8.1,<0.9.0 + - requests # >=2.20.0,<3 + - python-graphviz # >=0.8.1,<0.9.0 # for 3rdparty stuff - {{ pin_compatible('dlpack') }} # [unix and (target_platform != "osx-arm64")] - {{ pin_compatible('dmlc') }} # [unix and (target_platform != "osx-arm64")] From bb9ceb01de8bdbc93cfb2eccdb9efbb6e4e0a716 Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Wed, 9 Mar 2022 12:54:50 -0500 Subject: [PATCH 05/14] Update meta.yaml --- recipes/mxnet/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mxnet/meta.yaml b/recipes/mxnet/meta.yaml index 854d610e5ee0d..b85a8fbe8b73a 100644 --- a/recipes/mxnet/meta.yaml +++ b/recipes/mxnet/meta.yaml @@ -87,7 +87,7 @@ requirements: - llvm-openmp # [unix] - mkl # [target_platform != "osx-arm64"] - mkl-include # [target_platform != "osx-arm64"] - - libopencv + - libopencv <4.5.5 - graphviz - onednn - cudnn # [cuda_compiler_version != "None"] From d60080db3e1eb59c8e560d9c53106953ddbb46ad Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Wed, 9 Mar 2022 17:56:19 +0000 Subject: [PATCH 06/14] remove random recipes --- recipes/celer/meta.yaml | 55 -------------------- recipes/download/LICENSE | 21 -------- recipes/download/meta.yaml | 43 --------------- recipes/griffe/meta.yaml | 44 ---------------- recipes/jupyterview/meta.yaml | 40 -------------- recipes/libsvmdata/meta.yaml | 44 ---------------- recipes/mkdocstrings-python-legacy/meta.yaml | 45 ---------------- recipes/mkdocstrings-python-legacy/tests.py | 7 --- recipes/mkdocstrings-python/meta.yaml | 47 ----------------- recipes/mkdocstrings-python/tests.py | 5 -- recipes/opam/build.sh | 2 - recipes/opam/conda_build_config.yaml | 4 -- recipes/opam/meta.yaml | 50 ------------------ 13 files changed, 407 deletions(-) delete mode 100644 recipes/celer/meta.yaml delete mode 100644 recipes/download/LICENSE delete mode 100644 recipes/download/meta.yaml delete mode 100644 recipes/griffe/meta.yaml delete mode 100644 recipes/jupyterview/meta.yaml delete mode 100644 recipes/libsvmdata/meta.yaml delete mode 100644 recipes/mkdocstrings-python-legacy/meta.yaml delete mode 100644 recipes/mkdocstrings-python-legacy/tests.py delete mode 100644 recipes/mkdocstrings-python/meta.yaml delete mode 100644 recipes/mkdocstrings-python/tests.py delete mode 100644 recipes/opam/build.sh delete mode 100644 recipes/opam/conda_build_config.yaml delete mode 100644 recipes/opam/meta.yaml diff --git a/recipes/celer/meta.yaml b/recipes/celer/meta.yaml deleted file mode 100644 index bcb99649d5640..0000000000000 --- a/recipes/celer/meta.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{% set name = "celer" %} -{% set version = "0.6.1" %} - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/celer-{{ version }}.tar.gz - sha256: 0a726e120f09dfdba871efa8f93c9d3db218b8926c20362a9d36022e3fc44ea6 - -build: - script: {{ PYTHON }} -m pip install . -vv - number: 0 - -requirements: - build: - - {{ compiler('cxx') }} - host: - - python - - pip - - cython >=0.26 - - numpy - - scipy >=0.18.0 - - scikit-learn >=1.0 - run: - - python - - cython >=0.26 - - {{ pin_compatible('numpy') }} - - scipy >=0.18.0 - - scikit-learn >=1.0 - - matplotlib-base >=2.0.0 - - seaborn >=0.7 - - tqdm - - xarray - - download - - libsvmdata >=0.3 - -test: - imports: - - celer - commands: - - pip check - requires: - - pip - -about: - home: https://mathurinm.github.io/celer - summary: Fast algorithm with dual extrapolation for sparse problems - license: BSD-3-Clause - license_file: LICENSE - -extra: - recipe-maintainers: - - mfansler diff --git a/recipes/download/LICENSE b/recipes/download/LICENSE deleted file mode 100644 index aedcc0eeb38a0..0000000000000 --- a/recipes/download/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Chris Holdgraf - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/recipes/download/meta.yaml b/recipes/download/meta.yaml deleted file mode 100644 index b2e93c1951b12..0000000000000 --- a/recipes/download/meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ -{% set name = "download" %} -{% set version = "0.3.5" %} - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/download-{{ version }}.tar.gz - sha256: 884a885475b3cdbec0aa277e41643995c3394a1e064a0816f53fffae4a382130 - -build: - noarch: python - script: {{ PYTHON }} -m pip install . -vv - number: 0 - -requirements: - host: - - pip - - python >=3.6 - run: - - python >=3.6 - - requests - - six - - tqdm - -test: - imports: - - download - commands: - - pip check - requires: - - pip - -about: - home: https://github.com/choldgraf/download - summary: A quick module to help downloading files using python. - license: MIT - license_file: LICENSE - -extra: - recipe-maintainers: - - mfansler diff --git a/recipes/griffe/meta.yaml b/recipes/griffe/meta.yaml deleted file mode 100644 index 85c5b99c28b89..0000000000000 --- a/recipes/griffe/meta.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{% set name = "griffe" %} -{% set version = "0.14.0" %} - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/griffe-{{ version }}.tar.gz - sha256: 6da7274ee20f98102a5836113211cf4a4a5aeb08573c15b682c052bbc08c647e - -build: - skip: true # [py<37] - script: {{ PYTHON }} -m pip install . -vv - number: 0 - -requirements: - host: - - pip - - python - - pdm - run: - - python - - cached_property # [py<38] - -test: - imports: - - griffe - commands: - - pip check - requires: - - pip - -about: - home: https://mkdocstrings.github.io/griffe - doc_url: https://mkdocstrings.github.io/griffe - dev_url: https://github.com/mkdocstrings/griffe - summary: Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API. - license: MIT - license_file: LICENSE - -extra: - recipe-maintainers: - - bandersen23 diff --git a/recipes/jupyterview/meta.yaml b/recipes/jupyterview/meta.yaml deleted file mode 100644 index c3db0bf200382..0000000000000 --- a/recipes/jupyterview/meta.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{% set name = "jupyterview" %} -{% set version = "0.4.0" %} - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - sha256: 633c1e815eca1cac0d306c33671478a9a14dd1d0a844fcc514dd1fea4238a87a - -build: - noarch: python - number: 0 - script: "{{ PYTHON }} -m pip install . -vv" - -requirements: - host: - - python >=3.6 - - pip - - jupyter-packaging =0.10 - run: - - python >=3.6 - -test: - imports: - - jupyterview - -about: - home: https://github.com/trungleduc/jupyterview - license: BSD-3-Clause - license_family: BSD - license_file: LICENSE - summary: A VTK Data visualization extension for JupyterLab - doc_url: https://trungleduc.github.io/jupyterview - dev_url: https://github.com/trungleduc/jupyterview - -extra: - recipe-maintainers: - - trungleduc diff --git a/recipes/libsvmdata/meta.yaml b/recipes/libsvmdata/meta.yaml deleted file mode 100644 index fea5e8a11b453..0000000000000 --- a/recipes/libsvmdata/meta.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{% set name = "libsvmdata" %} -{% set version = "0.3" %} - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/libsvmdata-{{ version }}.tar.gz - sha256: 65c742b40053b5d9c5a88a1bab54097d3f70d31e510a71d1e33b29e7e69d12ba - -build: - noarch: python - script: {{ PYTHON }} -m pip install . -vv - number: 0 - -requirements: - host: - - pip - - python >=3.6 - run: - - download - - numpy >=1.12 - - python >=3.6 - - scikit-learn - - scipy - -test: - imports: - - libsvmdata - commands: - - pip check - requires: - - pip - -about: - home: https://pypi.org/project/libsvmdata/ - summary: Fetcher for LIBSVM datasets - license: BSD-3-Clause - license_file: LICENSE - -extra: - recipe-maintainers: - - mfansler diff --git a/recipes/mkdocstrings-python-legacy/meta.yaml b/recipes/mkdocstrings-python-legacy/meta.yaml deleted file mode 100644 index 273f29f163add..0000000000000 --- a/recipes/mkdocstrings-python-legacy/meta.yaml +++ /dev/null @@ -1,45 +0,0 @@ -{% set name = "mkdocstrings-python-legacy" %} -{% set version = "0.2.1" %} - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/mkdocstrings-python-legacy-{{ version }}.tar.gz - sha256: d8b032e1d1b4c75a601fcc5837249e2b2dc2cb21c9ad32a313ffaa54d5838242 - -build: - noarch: python - script: {{ PYTHON }} -m pip install . -vv - number: 0 - -requirements: - host: - - pip - - python >=3.7 - - pdm - run: - - mkdocstrings >=0.18 - - python >=3.7 - - pytkdocs >=0.14 - -test: - commands: - - pytest tests.py - - pip check - requires: - - pip - - pytest - files: - - tests.py - -about: - home: https://pypi.org/project/mkdocstrings-python-legacy/ - summary: A legacy Python handler for mkdocstrings. - license: MIT - license_file: LICENSE - -extra: - recipe-maintainers: - - bandersen23 diff --git a/recipes/mkdocstrings-python-legacy/tests.py b/recipes/mkdocstrings-python-legacy/tests.py deleted file mode 100644 index a0fe80486458c..0000000000000 --- a/recipes/mkdocstrings-python-legacy/tests.py +++ /dev/null @@ -1,7 +0,0 @@ -from mkdocstrings.handlers.base import CollectionError -from mkdocstrings.handlers.python import collector -import pytest - -def test_init(): - """Test init for collector.PythonCollector.""" - assert collector.PythonCollector() diff --git a/recipes/mkdocstrings-python/meta.yaml b/recipes/mkdocstrings-python/meta.yaml deleted file mode 100644 index eb7bc098f527a..0000000000000 --- a/recipes/mkdocstrings-python/meta.yaml +++ /dev/null @@ -1,47 +0,0 @@ -{% set name = "mkdocstrings-python" %} -{% set version = "0.5.2" %} - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/mkdocstrings-python-{{ version }}.tar.gz - sha256: 782b6ea41f86cfcc7d8d4a05cecc865fa21dfb5367f1457d7d3e448517958609 - -build: - noarch: python - script: {{ PYTHON }} -m pip install . -vv - number: 0 - -requirements: - host: - - pip - - python >=3.7 - - pdm - run: - - python >=3.7 - - mkdocstrings >=0.18 - - griffe >=0.11.1 - -test: - commands: - - pip check - - pytest tests.py - requires: - - pip - - pytest - files: - - tests.py - -about: - home: https://pypi.org/project/mkdocstrings-python-legacy/ - doc_url: https://mkdocstrings.github.io/python - dev_url: https://github.com/mkdocstrings/python - summary: A Python handler for mkdocstrings. - license: MIT - license_file: LICENSE - -extra: - recipe-maintainers: - - bandersen23 diff --git a/recipes/mkdocstrings-python/tests.py b/recipes/mkdocstrings-python/tests.py deleted file mode 100644 index d369ca8194cf7..0000000000000 --- a/recipes/mkdocstrings-python/tests.py +++ /dev/null @@ -1,5 +0,0 @@ -import pytest -from mkdocstrings_handlers.python.collector import PythonCollector - -def test_collect_module(): - collector = PythonCollector() diff --git a/recipes/opam/build.sh b/recipes/opam/build.sh deleted file mode 100644 index 3cfe50b6b6933..0000000000000 --- a/recipes/opam/build.sh +++ /dev/null @@ -1,2 +0,0 @@ -# from https://github.com/Homebrew/homebrew-core/blob/master/Formula/opam.rb#L24-L27 -./configure --prefix=$PREFIX && make lib-ext && make && make install diff --git a/recipes/opam/conda_build_config.yaml b/recipes/opam/conda_build_config.yaml deleted file mode 100644 index 299c883d3b1fa..0000000000000 --- a/recipes/opam/conda_build_config.yaml +++ /dev/null @@ -1,4 +0,0 @@ -cxx_compiler_version: # [linux] - - 9 # [linux] -cxx_compiler_version: # [osx] - - 11 # [osx] diff --git a/recipes/opam/meta.yaml b/recipes/opam/meta.yaml deleted file mode 100644 index f4fb6a1abb0d4..0000000000000 --- a/recipes/opam/meta.yaml +++ /dev/null @@ -1,50 +0,0 @@ -{% set name = "opam" %} -{% set version = "2.1.2" %} - - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - url: https://github.com/ocaml/opam/releases/download/{{ version }}/opam-full-{{ version }}.tar.gz - sha256: de1e3efffd5942e0101ef83dcdead548cc65a93e13986aecb4a264a059457ede - -build: - number: 0 - skip: true # [win] - skip: true # [osx] - -requirements: - build: - # Note: Conda-forge's default compiler versions are being overridden in recipe/conda_build_config.yaml - - {{ compiler('cxx') }} # C++ definitely needed: https://github.com/ocaml/opam/issues/4452 - - ocaml >=4.11 - - make >=4.3 - - patch >=2.7.6 # needed by `make ext-lib` - host: - run: - - rsync >=3.2 - - git >=2.30 - - mercurial >=5.6 - - m4 >=1.4.18 - - diffutils >=3.7 - - unzip >=6 - - patch >=2.7.6 - -test: - commands: - - opam - -about: - home: https://github.com/ocaml/opam - summary: A package manager for OCaml - description: | - opam is a source-based package manager. It supports multiple simultaneous compiler - installations, flexible package constraints, and a Git-friendly development workflow. - license: LGPL-2.1-only - license_file: LICENSE - -extra: - recipe-maintainers: - - fasiha From a8c8f0f50eb4a3fd475a09fc04876e016fc6ccf2 Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Wed, 9 Mar 2022 13:07:08 -0500 Subject: [PATCH 07/14] Update meta.yaml --- recipes/mxnet/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mxnet/meta.yaml b/recipes/mxnet/meta.yaml index b85a8fbe8b73a..117613176c82a 100644 --- a/recipes/mxnet/meta.yaml +++ b/recipes/mxnet/meta.yaml @@ -9,7 +9,7 @@ package: version: {{ version }} source: - - url: https://github.com/apache/incubator-{{ name }}/archive/refs/tags/v{{ version }}.tar.gz + - url: https://github.com/apache/incubator-{{ name }}/archive/refs/tags/{{ version }}.tar.gz sha256: {{ sha256 }} # build as provided upstream: # see some discussion here: From 1a53e901578192a85400d705040854f02a76a9ef Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Wed, 9 Mar 2022 13:17:26 -0500 Subject: [PATCH 08/14] add sha, loosen reqs --- recipes/mxnet/meta.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/mxnet/meta.yaml b/recipes/mxnet/meta.yaml index 117613176c82a..ee1dac030cc2c 100644 --- a/recipes/mxnet/meta.yaml +++ b/recipes/mxnet/meta.yaml @@ -1,6 +1,6 @@ {% set name = "mxnet" %} {% set version = "2.0.0.beta1.rc1" %} -{% set sha256 = "dfb741a07971b2607474b299ac880ba07e9fdaf217404c7d20bd5a4762324f26" %} +{% set sha256 = "81ea41d64fd0fd2c984726f0c597b006e7c1f5a9cbbf4d44a1a17af787775345" %} {% set build_number = "0" %} {% set proc_type = "cuda" if cuda_compiler_version != "None" else "cpu" %} @@ -87,6 +87,7 @@ requirements: - llvm-openmp # [unix] - mkl # [target_platform != "osx-arm64"] - mkl-include # [target_platform != "osx-arm64"] + # something broke between libopencv and libproto.. something - libopencv <4.5.5 - graphviz - onednn @@ -123,8 +124,8 @@ requirements: # for python pkg, mxnet - python - numpy >=1.17 - - requests # >=2.20.0,<3 - - python-graphviz # >=0.8.1,<0.9.0 + - requests >=2.20.0,<3 + - python-graphviz >=0.8.1,<0.9.0 # for 3rdparty stuff - {{ pin_compatible('dlpack') }} # [unix and (target_platform != "osx-arm64")] - {{ pin_compatible('dmlc') }} # [unix and (target_platform != "osx-arm64")] From af0589df55e6102a2a7fe21d9eac94aec60ea2b4 Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Wed, 9 Mar 2022 13:34:03 -0500 Subject: [PATCH 09/14] fix patch --- ...-use-existing-onednn-and-make-shared.patch | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/recipes/mxnet/patches/0001-use-existing-onednn-and-make-shared.patch b/recipes/mxnet/patches/0001-use-existing-onednn-and-make-shared.patch index 4810a075c067a..93e0653f5de2c 100644 --- a/recipes/mxnet/patches/0001-use-existing-onednn-and-make-shared.patch +++ b/recipes/mxnet/patches/0001-use-existing-onednn-and-make-shared.patch @@ -11,17 +11,17 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 196e0078a..780392ea1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -290,7 +290,7 @@ if(USE_ONEDNN) - set(DNNL_BUILD_EXAMPLES OFF CACHE INTERNAL "" FORCE) - set(DNNL_ARCH_OPT_FLAGS "" CACHE INTERNAL "" FORCE) - set(DNNL_ENABLE_JIT_PROFILING OFF CACHE INTERNAL "" FORCE) -- set(DNNL_LIBRARY_TYPE STATIC CACHE INTERNAL "" FORCE) -+ set(DNNL_LIBRARY_TYPE SHARED CACHE INTERNAL "" FORCE) - set(DNNL_ENABLE_CONCURRENT_EXEC ON CACHE INTERNAL "" FORCE) - set(DNNL_ENABLE_PRIMITIVE_CACHE ON CACHE INTERNAL "" FORCE) +@@ -316,7 +316,7 @@ if(USE_ONEDNN) + set(ONEDNN_BUILD_EXAMPLES OFF CACHE INTERNAL "" FORCE) + set(ONEDNN_ARCH_OPT_FLAGS "" CACHE INTERNAL "" FORCE) + set(ONEDNN_ENABLE_JIT_PROFILING OFF CACHE INTERNAL "" FORCE) +- set(ONEDNN_LIBRARY_TYPE STATIC CACHE INTERNAL "" FORCE) ++ set(ONEDNN_LIBRARY_TYPE SHARED CACHE INTERNAL "" FORCE) + set(ONEDNN_ENABLE_CONCURRENT_EXEC ON CACHE INTERNAL "" FORCE) + set(ONEDNN_ENABLE_PRIMITIVE_CACHE ON CACHE INTERNAL "" FORCE) -@@ -298,15 +298,11 @@ if(USE_ONEDNN) - set(DNNL_CPU_RUNTIME SEQ CACHE INTERNAL "" FORCE) +@@ -324,15 +324,11 @@ if(USE_ONEDNN) + set(ONEDNN_CPU_RUNTIME SEQ CACHE INTERNAL "" FORCE) endif() - set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/onednn") @@ -37,7 +37,7 @@ index 196e0078a..780392ea1 100644 endif() if(USE_CPP_PACKAGE) -@@ -673,7 +669,7 @@ if(UNIX) +@@ -699,7 +695,7 @@ if(UNIX) if(MXNET_BUILD_SHARED_LIBS) add_library(mxnet SHARED ${SOURCE}) else() @@ -46,7 +46,7 @@ index 196e0078a..780392ea1 100644 endif() target_link_libraries(mxnet PUBLIC mshadow) target_link_libraries(mxnet PUBLIC ${CMAKE_DL_LIBS}) -@@ -856,9 +852,9 @@ endif() +@@ -882,9 +878,9 @@ endif() if(USE_ONEDNN) add_custom_command(TARGET mxnet POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy From d58110d2dce7bad1572887e1a8515540741cbeb4 Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Mon, 14 Mar 2022 00:02:29 -0400 Subject: [PATCH 10/14] trying skipping some python and cuda versions --- recipes/mxnet/meta.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/mxnet/meta.yaml b/recipes/mxnet/meta.yaml index ee1dac030cc2c..478e34720e7c5 100644 --- a/recipes/mxnet/meta.yaml +++ b/recipes/mxnet/meta.yaml @@ -62,7 +62,9 @@ source: build: number: {{ build_number }} - skip: True # [win or cuda_compiler_version != "None"] + skip: True # [win] + skip: True # [py<39] + skip: True # [cuda_compiler_version in ("10.2", "11.0", "11.1")] string: py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ proc_type }} # [cuda_compiler_version == "None"] string: py{{ CONDA_PY }}{{ cuda_compiler_version|replace('.', '') }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ proc_type }} # [cuda_compiler_version != "None"] run_exports: From f59001868122119d1632d92f70d768005711a73e Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Wed, 16 Mar 2022 01:20:57 -0400 Subject: [PATCH 11/14] Update meta.yaml --- recipes/mxnet/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/mxnet/meta.yaml b/recipes/mxnet/meta.yaml index 478e34720e7c5..dd7c1f16020e4 100644 --- a/recipes/mxnet/meta.yaml +++ b/recipes/mxnet/meta.yaml @@ -62,6 +62,7 @@ source: build: number: {{ build_number }} + # to make build faster in staged-recipes skip: True # [win] skip: True # [py<39] skip: True # [cuda_compiler_version in ("10.2", "11.0", "11.1")] From e27e5966b413e694dca17fb73fd09ae15d5d9b99 Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Sat, 26 Mar 2022 11:05:52 -0400 Subject: [PATCH 12/14] skip all cuda builds, enable tvm --- recipes/mxnet/meta.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/mxnet/meta.yaml b/recipes/mxnet/meta.yaml index dd7c1f16020e4..9d0efef2b20cd 100644 --- a/recipes/mxnet/meta.yaml +++ b/recipes/mxnet/meta.yaml @@ -65,7 +65,7 @@ build: # to make build faster in staged-recipes skip: True # [win] skip: True # [py<39] - skip: True # [cuda_compiler_version in ("10.2", "11.0", "11.1")] + skip: True # [cuda_compiler_version in ("10.2", "11.0", "11.1", "11.2")] string: py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ proc_type }} # [cuda_compiler_version == "None"] string: py{{ CONDA_PY }}{{ cuda_compiler_version|replace('.', '') }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ proc_type }} # [cuda_compiler_version != "None"] run_exports: @@ -107,8 +107,8 @@ requirements: # for 3rdparty stuff - dlpack # [unix and (target_platform != "osx-arm64")] - dmlc # [unix and (target_platform != "osx-arm64")] - # - libtvm # [unix and x86_64] - # - tvm-py # [unix and x86_64] + - libtvm # [unix and x86_64] + - tvm-py # [unix and x86_64] # - nnvm # [unix and x86_64] run: @@ -132,8 +132,8 @@ requirements: # for 3rdparty stuff - {{ pin_compatible('dlpack') }} # [unix and (target_platform != "osx-arm64")] - {{ pin_compatible('dmlc') }} # [unix and (target_platform != "osx-arm64")] - # - {{ pin_compatible('libtvm') }} # [unix and x86_64] - # - {{ pin_compatible('tvm-py') }} # [unix and x86_64] + - {{ pin_compatible('libtvm') }} # [unix and x86_64] + - {{ pin_compatible('tvm-py') }} # [unix and x86_64] # - {{ pin_compatible('nnvm') }} # [unix and x86_64] test: From 642a8de54d8299196bd2f24bdbcaa0d195317737 Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Sat, 26 Mar 2022 11:08:21 -0400 Subject: [PATCH 13/14] Update meta.yaml --- recipes/mxnet/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mxnet/meta.yaml b/recipes/mxnet/meta.yaml index 9d0efef2b20cd..14e218fb7831d 100644 --- a/recipes/mxnet/meta.yaml +++ b/recipes/mxnet/meta.yaml @@ -58,7 +58,7 @@ source: # then linux-64 specific - patches/0003-put-dlpack-away.patch # [unix and (target_platform != "osx-arm64")] - patches/0004-put-dmlc-away-maybe.patch # [unix and x86_64] - # - patches/0005-put-tvm-away-maybe.patch # [unix and x86_64] + - patches/0005-put-tvm-away-maybe.patch # [unix and x86_64] build: number: {{ build_number }} From 84446ef1fcb172d449e4ca74223593b37457278f Mon Sep 17 00:00:00 2001 From: ngam <67342040+ngam@users.noreply.github.com> Date: Sat, 26 Mar 2022 11:09:00 -0400 Subject: [PATCH 14/14] re-enable cuda 11.2 --- recipes/mxnet/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mxnet/meta.yaml b/recipes/mxnet/meta.yaml index 14e218fb7831d..863c4ea91f59e 100644 --- a/recipes/mxnet/meta.yaml +++ b/recipes/mxnet/meta.yaml @@ -65,7 +65,7 @@ build: # to make build faster in staged-recipes skip: True # [win] skip: True # [py<39] - skip: True # [cuda_compiler_version in ("10.2", "11.0", "11.1", "11.2")] + skip: True # [cuda_compiler_version in ("10.2", "11.0", "11.1")] string: py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ proc_type }} # [cuda_compiler_version == "None"] string: py{{ CONDA_PY }}{{ cuda_compiler_version|replace('.', '') }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ proc_type }} # [cuda_compiler_version != "None"] run_exports: