Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/Dockerfile-NPU
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY . /workspace/unified-cache-management

RUN pip config set global.index-url ${PIP_INDEX_URL}

RUN export PLATFORM="ascend" && \
RUN export PLATFORM="ascend" ENABLE_SPARSE=true && \
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib && \
pip install -v -e /workspace/unified-cache-management --no-build-isolation

Expand Down
2 changes: 1 addition & 1 deletion ucm/sparse/kvcomp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ else()
endif()

string(TOLOWER "$ENV{PLATFORM}" PLATFORM_ENV)
if(PLATFORM_ENV STREQUAL "cuda")
if(RUNTIME_ENVIRONMENT STREQUAL "cuda")
message(STATUS "Building kvcomp for CUDA...")
add_subdirectory(hash_retrieval)
add_subdirectory(ham_dist)
Expand Down
6 changes: 6 additions & 0 deletions ucm/sparse/kvcomp/ham_dist/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ set(CMAKE_CUDA_COMPILER ${CUDA_ROOT}/bin/nvcc)
set(CMAKE_CUDA_ARCHITECTURES 75 80 86 89 90)
enable_language(CUDA)

# ---- CUDA Toolkit ----
find_package(CUDAToolkit REQUIRED)
message(STATUS "Found CUDAToolkit: ${CUDAToolkit_INCLUDE_DIRS}")

# ---- Python ----
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)

Expand Down Expand Up @@ -52,6 +56,7 @@ set(INCLUDE_DIRS
${PYTORCH_PATH}/include
${PYTORCH_PATH}/include/torch/csrc/api/include
${CMAKE_CURRENT_SOURCE_DIR}
${CUDAToolkit_INCLUDE_DIRS}
)

set(LIBRARY_DIRS
Expand All @@ -66,6 +71,7 @@ set(LIBRARIES
torch_cpu
torch_python
pthread
CUDA::cudart
)

# ---- Build: hamming python module (.so) ----
Expand Down