Add conda build option and CUDA target includes#6316
Conversation
|
| Filename | Overview |
|---|---|
| CMakeLists.txt | Adds find_package(CUDAToolkit REQUIRED), BUILD_FOR_CONDA option, and conda-specific RPATH handling; removes the CUDA_TOOLKIT_INCLUDE_MAJOR_DIRECTORY if/else but leaves its SEMICOLON_POS guard as dead code on line 49. |
| cmake/Dependencies.common.cmake | Guards libtar static-preference and FFTS/CocoAPI builds behind BUILD_FOR_CONDA and PREBUILD_DALI_LIBS checks; straightforward and correct. |
| dali/core/CMakeLists.txt | cuda.h and cufile.h stub generators updated to CUDAToolkit_TARGET_DIR; nvcomp stub (line 108) still uses the old CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES_DIRECTIVE, so that computation block remains necessary. |
| dali/util/CMakeLists.txt | nvml.h stub updated to CUDAToolkit_TARGET_DIR; the SEMICOLON_POS / CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES_DIRECTIVE computation block (lines 84-93) is now dead code. |
| dali/nvimgcodec/nvimgcodec_wrap.cc | Correctly toggles lib/lib64 path via FOR_CONDA_ENABLED macro and provides conda install guidance on dlopen failure. |
| dali/operators/operators.cc | Adds conda-specific version-requirement error message with single-quoted conda spec; non-conda branch restructured with inline CUDA_VERSION computation. |
Reviews (3): Last reviewed commit: "Add conda build option and CUDA target i..." | Re-trigger Greptile
5666d1a to
c985677
Compare
|
@greptile review |
c985677 to
71390d0
Compare
|
CI MESSAGE: [49621159]: BUILD STARTED |
|
CI MESSAGE: [49621159]: BUILD FAILED |
|
CI MESSAGE: [49621159]: BUILD PASSED |
71390d0 to
832f595
Compare
|
CI MESSAGE: [49643983]: BUILD STARTED |
|
CI MESSAGE: [49643983]: BUILD FAILED |
832f595 to
2b83881
Compare
|
CI MESSAGE: [49679151]: BUILD STARTED |
|
CI MESSAGE: [49679151]: BUILD FAILED |
|
CI MESSAGE: [49679151]: BUILD PASSED |
2b83881 to
8a6a7ef
Compare
|
CI MESSAGE: [53088284]: BUILD STARTED |
|
CI MESSAGE: [53088284]: BUILD FAILED |
|
CI MESSAGE: [53103732]: BUILD STARTED |
|
CI MESSAGE: [53103732]: BUILD PASSED |
Add BUILD_FOR_CONDA and pass it from the conda recipes so conda-forge packaging can opt into its own dependency layout without changing default builds. When enabled, prefer shared libtar, use conda's nvImageCodec lib directory in runtime lookup and RPATH, and emit conda install guidance for dynamically loaded CUDA toolkit libraries. Require CUDAToolkit package discovery and use CUDAToolkit_TARGET_DIR/include directly for generated CUDA-family stubs and CUDA include directories. This avoids relying on the trimmed CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES value while still honoring explicit CUDA target directories. Also skip bundled FFTS and cocoapi static targets when prebuilt DALI libs are used, and fix a typo in the NVML loader diagnostic. Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
8a6a7ef to
e2a4ea1
Compare
Adds a conda packaging build option and switches CUDA-header consumers to
the CMake CUDAToolkit target directory.
It absorbs https://github.com/conda-forge/nvidia-dali-python-feedstock/tree/main/recipe/patches.
Category:
Other (Build / Configuration)
Description:
This change adds
BUILD_FOR_CONDA, enables it from the conda native-libs andPython-bindings recipes, and keeps the default source and wheel build behavior
unchanged when the option is disabled.
When
BUILD_FOR_CONDA=ON, the build:liblayout for nvImageCodec runtime lookup and RPATH;libtarlibrary instead of forcinglibtar.a;The change also requires CMake's
CUDAToolkitpackage and usesCUDAToolkit_TARGET_DIR/includedirectly for CUDA-family generated stubs andinclude directories. This covers the CUDA, cuFile, cuFFT, NPP, nvImageCodec,
NVML, and nvCUVID stub generation paths without depending on the trimmed
CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIESvalue.For the split conda package build, bundled FFTS and cocoapi static targets are
not rebuilt when
PREBUILD_DALI_LIBS=ON.Additional information:
Affected modules and functionalities:
CMakeLists.txtcmake/Dependencies.common.cmakeconda/dali_native_libs/recipe/build.shconda/dali_python_bindings/recipe/build.shdali/core/CMakeLists.txtdali/kernels/signal/fft/CMakeLists.txtdali/npp/CMakeLists.txtdali/nvimgcodec/CMakeLists.txtdali/operators/video/dynlink_nvcuvid/CMakeLists.txtdali/util/CMakeLists.txtdali/core/dynlink_cufile.ccdali/core/dynlink_nvcomp.ccdali/kernels/signal/fft/cufft_wrap.ccdali/npp/npp_wrap.ccdali/nvimgcodec/nvimgcodec_wrap.ccdali/operators/operators.ccdali/util/nvml_wrap.ccKey points relevant for the review:
BUILD_FOR_CONDAdefaults toOFF; default builds should retain existingbehavior.
propagate_option(BUILD_FOR_CONDA), whichproduces
FOR_CONDA_ENABLEDfor the C++ loader diagnostics.find_package(CUDAToolkit REQUIRED)is now used so the build can consistentlyreference
CUDAToolkit_TARGET_DIR/include.Tests:
Previously configured successfully with:
BUILD_FOR_CONDA=ONBUILD_FOR_CONDA=ONwith explicitCUDAToolkit_TARGET_DIRFor this metadata refresh,
git diff --check upstream/main...HEADpasses.Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-4681