Skip to content

Commit

Permalink
Remove now unnecessary variable (#466)
Browse files Browse the repository at this point in the history
As of #439 the `FIND_KVIKIO_CPP` variable is largely superfluous. In principle we could still choose to support users who want to build the Python package without having the C++ library already available somewhere, but that use case is vanishingly small now that we have C++ wheels and it would require the developer to intentionally build without isolation and omit the C++ wheel from the environment. For advanced use cases like that it is reasonable to ask the user to handle building the C++ library separately on their own and making it available for the Python package to find. None of the normal build cases that we support (conda, pip, devcontainers, DLFW) require this any longer.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #466
  • Loading branch information
vyasr authored Sep 23, 2024
1 parent e926fad commit 42e0d72
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
5 changes: 0 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ if hasArg --pydevelop; then
PYTHON_ARGS_FOR_INSTALL="${PYTHON_ARGS_FOR_INSTALL} -e"
fi

# Append `-DFIND_KVIKIO_CPP=ON` to EXTRA_CMAKE_ARGS unless a user specified the option.
if [[ "${EXTRA_CMAKE_ARGS}" != *"DFIND_KVIKIO_CPP"* ]]; then
EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DFIND_KVIKIO_CPP=ON"
fi

# If clean given, run it prior to any other steps
if hasArg clean; then
# If the dirs to clean are mounted dirs in a container, the
Expand Down
1 change: 0 additions & 1 deletion ci/build_wheel_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ cd "${package_dir}"
echo "libkvikio-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${CPP_WHEELHOUSE}/libkvikio_*.whl)" > ./constraints.txt

PIP_CONSTRAINT="${PWD}/constraints.txt" \
SKBUILD_CMAKE_ARGS="-DFIND_KVIKIO_CPP=ON" \
python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check

mkdir -p final_dist
Expand Down
19 changes: 3 additions & 16 deletions python/kvikio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,20 @@ project(
LANGUAGES CXX CUDA
)

option(FIND_KVIKIO_CPP
"Search for existing KVIKIO C++ installations before defaulting to local files" OFF
)

# TODO: Should we symlink FindcuFile.cmake into python/cmake? find cuFile
include(../../cpp/cmake/Modules/FindcuFile.cmake)

if(FIND_KVIKIO_CPP)
find_package(KvikIO REQUIRED "${RAPIDS_VERSION}")
else()
set(KvikIO_FOUND OFF)
endif()
find_package(KvikIO REQUIRED "${RAPIDS_VERSION}")

find_package(CUDAToolkit REQUIRED)

set(cython_lib_dir kvikio)

if(NOT KvikIO_FOUND)
add_subdirectory(../../cpp kvikio-cpp)
install(TARGETS kvikio DESTINATION ${cython_lib_dir})
endif()

include(rapids-cython-core)
rapids_cython_init()

add_subdirectory(cmake)

set(cython_lib_dir kvikio)

# It would be better to factor nvcomp out into its own wheel. Until that is available, we vendor it
# here.
install_aliased_imported_targets(
Expand Down

0 comments on commit 42e0d72

Please sign in to comment.