AMGX icon indicating copy to clipboard operation
AMGX copied to clipboard

[Build] OKay to ENABLE NvToolsExt for Windows?

Open wanjunling168 opened this issue 1 year ago • 1 comments

Describe the issue

A clear and concise description of what the issue is.

Environment information:

  • OS: Windows 10
  • Compiler version: VS 2022
  • CMake version: 3.27
  • CUDA used for AMGX compilation: CUDA 11.6.2
  • MPI version (if applicable): MS-MPI v10.1.2
  • AMGX version or commit hash 716bcd597b44a0e546e1b9f90d7926f857131512
  • Any related environment variables information

Configuration information

Compilation information

Issue information

Additional context

since AMGX commit 76fcbe69b52a5ea929c6f468fa4845e69fc65f3d introduced some nvtxRangePush and nvtxRangePop in files like csr_multiply.cu, can we just remove the if-statement at line 151~154 in CMakeLists.txt to define NVTX_RANGES macro:

# Enable NVTX ranges on Linux
if(NOT WIN32)
  set(NVTXRANGE_FLAG -DNVTX_RANGES)
endif()

and change line 268~274 to link nvToolsExt on Windows:

IF (WIN32)
  target_link_libraries(amgx CUDA::cublas CUDA::cusparse CUDA::cusolver)
  target_link_libraries(amgxsh CUDA::cublas CUDA::cusparse CUDA::cusolver)
ELSE (WIN32)
  target_link_libraries(amgx CUDA::cublas CUDA::cusparse CUDA::cusolver CUDA::nvToolsExt m pthread)
  target_link_libraries(amgxsh CUDA::cublas CUDA::cusparse CUDA::cusolver CUDA::nvToolsExt m pthread)
ENDIF(WIN32)

to make AMGX compiles again on Windows?

wanjunling168 avatar Jan 16 '24 14:01 wanjunling168