Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use proper include path for cholmod.h. #364

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
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 LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (C) 2020-2024 Advanced Micro Devices, Inc.
Copyright (C) 2020-2025 Advanced Micro Devices, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 6 additions & 2 deletions library/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ prepend_path(".." hipsolver_headers_public relative_hipsolver_headers_public)

if(NOT USE_CUDA)
set(hipsolver_source
"${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/dlopen/cholmod.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/dlopen/rocsparse.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/hipsolver_conversions.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/hipsolver.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/hipsolver_dense.cpp"
Expand All @@ -52,6 +50,12 @@ if(NOT USE_CUDA)
"${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/hipsolver_sparse.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/common/hipsolver_dense_common.cpp"
)
if(NOT BUILD_WITH_SPARSE)
list(APPEND hipsolver_source
"${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/dlopen/cholmod.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/amd_detail/dlopen/rocsparse.cpp"
)
endif()
else()
set(hipsolver_source
"${CMAKE_CURRENT_SOURCE_DIR}/nvidia_detail/hipsolver_conversions.cpp"
Expand Down
2 changes: 1 addition & 1 deletion library/src/amd_detail/dlopen/cholmod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "lib_macros.hpp"

#ifdef HAVE_ROCSPARSE
#include <suitesparse/cholmod.h>
#include <cholmod.h>
#else

// constants
Expand Down
7 changes: 5 additions & 2 deletions library/src/cmake/suitesparse/FindCHOLMOD.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ########################################################################
# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
# Copyright (C) 2024-2025 Advanced Micro Devices, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -45,7 +45,10 @@ This module defines the following variables:

#]=======================================================================]

find_path(CHOLMOD_INCLUDE_DIR suitesparse/cholmod.h)
find_path(CHOLMOD_INCLUDE_DIR
NAMES cholmod.h
PATH_SUFFIXES suitesparse
)
find_library(CHOLMOD_LIBRARY cholmod)

include(FindPackageHandleStandardArgs)
Expand Down
7 changes: 5 additions & 2 deletions library/src/cmake/suitesparse/FindSuiteSparse_config.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ########################################################################
# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
# Copyright (C) 2024-2025 Advanced Micro Devices, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -45,7 +45,10 @@ This module defines the following variables:

#]=======================================================================]

find_path(SUITESPARSE_CONFIG_INCLUDE_DIR suitesparse/SuiteSparse_config.h)
find_path(SUITESPARSE_CONFIG_INCLUDE_DIR
NAMES SuiteSparse_config.h
PATH_SUFFIXES suitesparse
)
find_library(SUITESPARSE_CONFIG_LIBRARY suitesparseconfig)

include(FindPackageHandleStandardArgs)
Expand Down