Skip to content

Commit 1be00f5

Browse files
committed
clean up and nuget failure
1 parent 0861bcc commit 1be00f5

File tree

6 files changed

+17
-32
lines changed

6 files changed

+17
-32
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,10 @@ if(NOT(${HIGHS_NO_DEFAULT_THREADS} STREQUAL "OFF"))
406406
endif()
407407

408408
# For debug of cuda locally
409-
add_compile_options("$<$<AND:$<CONFIG:Debug,RelWithDebInfo>,$<COMPILE_LANGUAGE:CUDA>>:-G>")
409+
410+
# does not work with older CMake
411+
# add_compile_options("$<$<AND:$<CONFIG:Debug,RelWithDebInfo>,$<COMPILE_LANGUAGE:CUDA>>:-G>")
412+
410413
# add_compile_options("$<$<COMPILE_LANGUAGE:CUDA>:-G>")
411414

412415
if (CUPDLP_GPU AND UNIX)

cmake/python-highs.cmake

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,6 @@ target_link_libraries(_core PRIVATE pybind11::headers)
4545
# sources for python
4646
target_sources(_core PUBLIC ${sources_python} ${headers_python})
4747

48-
# Cuda Python
49-
# if (CUPDLP_GPU)
50-
# enable_language(CXX CUDA)
51-
# target_sources(_core PRIVATE ${cuda_sources_python})
52-
53-
# target_include_directories(_core PUBLIC "/usr/local/cuda/include")
54-
# set_target_properties(_core PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
55-
# endif()
56-
57-
5848
# include directories for python
5949
target_include_directories(_core PUBLIC ${include_dirs_python})
6050

src/pdlp/CupdlpWrapper.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@ HighsStatus solveLpCupdlp(const HighsOptions& options, HighsTimer& timer,
154154

155155
cupdlp_float scaling_time = getTimeStamp();
156156

157-
// PDHG_Scale_Data(local_log_level, csc_cpu, ifScaling, scaling, cost,
158-
// lower, upper, rhs);
159-
160157
PDHG_Scale_Data(csc_cpu, ifScaling, scaling, cost, lower, upper, rhs);
161158

162159
scaling_time = getTimeStamp() - scaling_time;
@@ -209,7 +206,6 @@ HighsStatus solveLpCupdlp(const HighsOptions& options, HighsTimer& timer,
209206
highs_solution.row_dual.data(), &value_valid, &dual_valid, ifSaveSol,
210207
fp_sol, constraint_new_idx, constraint_type, &pdlp_model_status,
211208
&pdlp_num_iter);
212-
213209
highs_info.pdlp_iteration_count = pdlp_num_iter;
214210

215211
model_status = HighsModelStatus::kUnknown;

src/pdlp/README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,16 @@ nvidia-smi
1818

1919
This should print a table of GPU-related stats. If it doesn't don't worry: installing the Cuda Toolkit from https://developer.nvidia.com/cuda-toolkit should help!
2020

21-
### Install CUDA from website
21+
### Install CUDA and Driver from the Nvidia website
2222

23-
Download Cuda from https://developer.nvidia.com/cuda-toolkit for the appropriate OS and architecture.
23+
Download Cuda Tooklit and the Nvidia driver from https://developer.nvidia.com/cuda-toolkit for the appropriate OS and architecture.
2424

2525
Note, that installing the `nvidia-cuda-toolkit` package from apt will work on many Linux installations, *but* if the drivers are missing and you attempt to install them with
2626
```
2727
apt install nvidia-cuda-toolkit
2828
apt install nvidia-utils-515
2929
```
30-
or `nvidia-utils-some-other-number`, this may lead to errors with versions of cuda libraries on versions of Lunux that are resolved by cleaning up the cuda drivers and toolkit from the machine and installing the toolkit from the website, which should give you the drivers as well.
31-
32-
If you run into any trouble, please get in touch with Ivet right away so we can look at it together. Ivet did have some trouble getting it all to work on her laptop and is still learning about supporting different versions of Cuda on different operating systems.
30+
or `nvidia-utils-some-other-number`, this may lead to errors with versions of cuda libraries on versions of Lunux that are resolved by cleaning up the cuda drivers and toolkit from the machine and installing again from the website.
3331

3432
Check again that the drivers are present by running
3533
```
@@ -44,14 +42,12 @@ nvcc --version
4442

4543
If you see a version, this means that the cuda compiler nvcc is up and running.
4644

47-
When both work, you should check that `/usr/local/cuda` exists.
45+
When both work, on Linux, you should check that `/usr/local/cuda` exists.
4846

4947
#### Build
5048

51-
* Checkout the HiGHS codebase from Github, and use the branch `cuda-updates`
52-
* From your HiGHS build directory, run
53-
5449
```
55-
cmake -DCUPDLP_GPU=ON -DALL_TESTS=ON ..; make
50+
cmake -S . -B build -DCUPDLP_GPU=ON -DALL_TESTS=ON ..
51+
cmake --build build --parallel
5652
```
5753

src/pdlp/cupdlp/cuda/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ target_compile_definitions(cudalin
1818
$<$<CONFIG:Debug>:-DCUPDLP_DEBUG=1>
1919
)
2020

21-
if (WIN32)
22-
target_link_libraries(cudalin ${CUDA_LIBRARY})
23-
else()
24-
target_link_libraries(cudalin ${CUDA_LIBRARY} m)
25-
endif()
21+
if (WIN32)
22+
target_link_libraries(cudalin ${CUDA_LIBRARY})
23+
else()
24+
target_link_libraries(cudalin ${CUDA_LIBRARY} m)
25+
endif()
2626

2727
# add a test
2828
add_executable(testcudalin test_cuda_linalg.c)

src/pdlp/cupdlp/cupdlp_linalg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ void Ax_single_gpu(CUPDLPwork *w, cusparseDnVecDescr_t vecX,
395395

396396
switch (w->problem->data->matrix_format) {
397397
case CSR_CSC:
398-
cuda_csr_Ax(w->cusparsehandle, w->problem->data->csr_matrix->cuda_csr,
398+
cuda_csr_Ax(w->cusparsehandle, w->problem->data->csr_matrix->cuda_csr,
399399
vecX, vecAx, w->dBuffer_csr_Ax, alpha, beta);
400400
break;
401401
case CSC:
@@ -427,7 +427,7 @@ void ATy_single_gpu(CUPDLPwork *w, cusparseDnVecDescr_t vecY,
427427

428428
switch (w->problem->data->matrix_format) {
429429
case CSR_CSC:
430-
cuda_csc_ATy(w->cusparsehandle, w->problem->data->csc_matrix->cuda_csc,
430+
cuda_csc_ATy(w->cusparsehandle, w->problem->data->csc_matrix->cuda_csc,
431431
vecY, vecATy, w->dBuffer_csc_ATy, alpha, beta);
432432
break;
433433
case CSC:

0 commit comments

Comments
 (0)