Skip to content

Commit

Permalink
some gpu code added, no changes to cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
galabovaa committed Nov 8, 2024
1 parent ac36f78 commit 01255cc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ if (BUILD_CXX)
message(STATUS "IPO / LTO is not supported at the moment when PDLP is using GPU: LTO disabled.")
endif()

endif()


include(CheckCXXSourceCompiles)
check_cxx_source_compiles(
Expand Down
13 changes: 7 additions & 6 deletions cmake/python-highs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ target_link_libraries(_core PRIVATE pybind11::headers)
# sources for python
target_sources(_core PUBLIC ${sources_python} ${headers_python})

if (CUPDLP_GPU)
enable_language(CXX CUDA)
target_sources(_core PRIVATE ${cuda_sources_python})
# Cuda Python
# if (CUPDLP_GPU)
# enable_language(CXX CUDA)
# target_sources(_core PRIVATE ${cuda_sources_python})

target_include_directories(_core PUBLIC "/usr/local/cuda/include")
set_target_properties(_core PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
endif()
# target_include_directories(_core PUBLIC "/usr/local/cuda/include")
# set_target_properties(_core PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
# endif()


# include directories for python
Expand Down
2 changes: 1 addition & 1 deletion src/pdlp/cupdlp/cupdlp_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define CUPDLP_DEBUG (0)
#define CUPDLP_TIMER

#ifndef CUPDLP_CPU
#ifdef CUPDLP_GPU
#include "cuda/cupdlp_cuda_kernels.cuh"
#include "cuda/cupdlp_cudalinalg.cuh"
#endif
Expand Down

0 comments on commit 01255cc

Please sign in to comment.