Skip to content

Commit

Permalink
Merge pull request #126 from DrTimothyAldenDavis/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
DrTimothyAldenDavis authored Apr 10, 2022
2 parents c0825da + 4852f3d commit 05b25d3
Show file tree
Hide file tree
Showing 110 changed files with 36,309 additions and 4,493 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
Apr 10, 2022, SuiteSparse 5.12.0

* GraphBLAS v7.0.3: see GraphBLAS/Doc/ChangeLog for details.
* performance: GrB_mxm, GrB_assign, and transpose
* bug fix: vector iterator for bitmap
* revised ACM TOMS submission: Doc/toms_parallel_grb2.pdf
* spec bug: GrB_Matrix_diag was implemented incorrectly,
thus requiring a version v7.x

Mar 14, 2022, SuiteSparse 5.11.0

* GraphBLAS v6.2.5: see GraphBLAS/Doc/ChangeLog for changes.
Expand Down
41 changes: 41 additions & 0 deletions GraphBLAS/CITATION.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

@article{GraphBLAS7,
author = {Davis, Timothy A.},
title = {Algorithm 10xx: SuiteSparse:GraphBLAS: Graph Algorithms in the Language of Sparse Linear Algebra},
year = {2022},
abstract= {SuiteSparse:GraphBLAS is a full parallel implementation of the GraphBLAS
standard, which defines a set of sparse matrix operations on an extended
algebra of semirings using an almost unlimited variety of operators and types.
When applied to sparse adjacency matrices, these algebraic operations are
equivalent to computations on graphs. A description of the parallel
implementation of SuiteSparse:GraphBLAS is given, including its novel parallel
algorithms for sparse matrix multiply, addition, element-wise multiply,
submatrix extraction and assignment, and the GraphBLAS mask/accumulator
operation. Its performance is illustrated by solving the graph problems in the
GAP Benchmark and by comparing it with other sparse matrix libraries.},
journal = {ACM Trans. Math. Softw.},
month = {(under revision)},
note={See GraphBLAS/Doc/toms_parallel_grb2.pdf},
keywords = {GraphBLAS, Graph algorithms, sparse matrices}
}

@article{10.1145/3322125,
author = {Davis, Timothy A.},
title = {Algorithm 1000: SuiteSparse:GraphBLAS: Graph Algorithms in the Language of Sparse Linear Algebra},
year = {2019},
issue_date = {December 2019},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {45},
number = {4},
issn = {0098-3500},
url = {https://doi.org/10.1145/3322125},
doi = {10.1145/3322125},
abstract = {SuiteSparse:GraphBLAS is a full implementation of the GraphBLAS standard, which defines a set of sparse matrix operations on an extended algebra of semirings using an almost unlimited variety of operators and types. When applied to sparse adjacency matrices, these algebraic operations are equivalent to computations on graphs. GraphBLAS provides a powerful and expressive framework for creating graph algorithms based on the elegant mathematics of sparse matrix operations on a semiring. An overview of the GraphBLAS specification is given, followed by a description of the key features and performance of its implementation in the SuiteSparse:GraphBLAS package.},
journal = {ACM Trans. Math. Softw.},
month = {dec},
articleno = {44},
numpages = {25},
keywords = {GraphBLAS, Graph algorithms, sparse matrices}
}

10 changes: 6 additions & 4 deletions GraphBLAS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ endif ( )
set ( CMAKE_MACOSX_RPATH TRUE )

# version of SuiteSparse:GraphBLAS
set ( GraphBLAS_DATE "Mar 14, 2022" )
set ( GraphBLAS_VERSION_MAJOR 6 )
set ( GraphBLAS_VERSION_MINOR 2 )
set ( GraphBLAS_VERSION_SUB 5 )
set ( GraphBLAS_DATE "Apr 8, 2022" )
set ( GraphBLAS_VERSION_MAJOR 7 )
set ( GraphBLAS_VERSION_MINOR 0 )
set ( GraphBLAS_VERSION_SUB 3 )

message ( STATUS "Building SuiteSparse:GraphBLAS version: v" ${GraphBLAS_VERSION_MAJOR}.${GraphBLAS_VERSION_MINOR}.${GraphBLAS_VERSION_SUB} " date: " ${GraphBLAS_DATE} )

Expand Down Expand Up @@ -511,6 +511,7 @@ if ( DEMO )
add_executable ( wildtype_demo "Demo/Program/wildtype_demo.c" )
add_executable ( reduce_demo "Demo/Program/reduce_demo.c" )
add_executable ( import_demo "Demo/Program/import_demo.c" )
add_executable ( wathen_demo "Demo/Program/wathen_demo.c" )

# Libraries required for Demo programs
target_link_libraries ( openmp_demo PUBLIC graphblas graphblasdemo ${GB_CUDA} ${GB_RMM} )
Expand All @@ -520,6 +521,7 @@ if ( DEMO )
target_link_libraries ( wildtype_demo PUBLIC graphblas ${GB_CUDA} ${GB_RMM} )
target_link_libraries ( reduce_demo PUBLIC graphblas ${GB_CUDA} ${GB_RMM} )
target_link_libraries ( import_demo PUBLIC graphblas graphblasdemo ${GB_CUDA} ${GB_RMM} )
target_link_libraries ( wathen_demo PUBLIC graphblas graphblasdemo ${GB_CUDA} ${GB_RMM} )

else ( )

Expand Down
46 changes: 31 additions & 15 deletions GraphBLAS/CUDA/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.20.1)

project(GRAPHBLAS_CUDA VERSION 0.1 LANGUAGES CXX CUDA)

set(CMAKE_CUDA_FLAGS "-cudart static -lineinfo -G")
set(CMAKE_CUDA_FLAGS "-cudart=static -lineinfo -G")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++17 -fPIC ")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DGBNCPUFEAT")
Expand All @@ -16,7 +16,7 @@ set(CMAKE_C_STANDARD 11)

message(STATUS "${CMAKE_CXX_FLAGS}")

file(GLOB GRAPHBLAS_CUDA_SOURCES "*.cu" "*.c")
file(GLOB GRAPHBLAS_CUDA_SOURCES "*.cu" "*.c" "*.cpp")

add_library(graphblascuda SHARED
${GRAPHBLAS_CUDA_SOURCES}
Expand All @@ -34,12 +34,18 @@ set(GRAPHBLAS_CUDA_INCLUDES

message(STATUS "${GRAPHBLAS_CUDA_INCLUDES}")

target_include_directories(graphblascuda PUBLIC ${CUDA_INCLUDE_DIRECTORIES} ${GRAPHBLAS_CUDA_INCLUDES})
target_include_directories(graphblascuda PUBLIC ${CUDAToolkit_INCLUDE_DIRS} ${GRAPHBLAS_CUDA_INCLUDES})
set_target_properties(graphblascuda PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(graphblascuda PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
set_target_properties(graphblascuda PROPERTIES CUDA_ARCHITECTURES "75")

target_link_libraries(graphblascuda nvrtc cuda)
target_link_libraries(graphblascuda CUDA::nvrtc CUDA::cudart_static)

install ( TARGETS graphblascuda
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} )


# 1. Execute enumify/stringify/jitify logic to compile ptx kernels and compile/link w/ relevant *.cu files.

Expand Down Expand Up @@ -77,8 +83,8 @@ foreach(var ${CUDA_TEST_SUITES})
# easily ignore them from the build
add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/${var}_${semiring}_${kernel}_test_instances.hpp
${CMAKE_CURRENT_BINARY_DIR}/${var}_${semiring}_${kernel}_cuda_tests.cu
${CMAKE_CURRENT_BINARY_DIR}/${var}_${semiring}_test_instances.hpp
${CMAKE_CURRENT_BINARY_DIR}/${var}_${semiring}_cuda_tests.cpp
DEPENDS
jitFactory.hpp
COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/test/testGen_cmake.py "\"${CMAKE_CURRENT_SOURCE_DIR}\"" "\"${var}\"" "\"${CUDA_TEST_MONOIDS}\""
Expand All @@ -87,7 +93,7 @@ foreach(var ${CUDA_TEST_SUITES})
)

# Construct final list of files to compile (in parallel)
list(APPEND CUDA_TEST_CPP_FILES ${CMAKE_CURRENT_BINARY_DIR}/${var}_${semiring}_${kernel}_cuda_tests.cu)
list(APPEND CUDA_TEST_CPP_FILES ${CMAKE_CURRENT_BINARY_DIR}/${var}_${semiring}_cuda_tests.cpp)
endforeach()
endforeach()
endforeach()
Expand All @@ -100,7 +106,13 @@ FetchContent_Declare(
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
FetchContent_GetProperties(googletest)
if(NOT googletest_POPULATED)
FetchContent_Populate(googletest)
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()

#FetchContent_MakeAvailable(googletest EC)


#file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/external_includes)
Expand Down Expand Up @@ -131,14 +143,18 @@ add_dependencies(graphblascuda_test gtest_main)
add_dependencies(graphblascuda_test rmm_wrap)

target_link_libraries(graphblascuda_test
PUBLIC
graphblas
graphblascuda
gtest_main
nvrtc
cuda
${ADDITIONAL_DEPS})

target_include_directories(graphblascuda_test PUBLIC
CUDA::cudart_static
CUDA::nvrtc
${ADDITIONAL_DEPS}
PRIVATE
gtest_main)

target_include_directories(graphblascuda_test
PUBLIC
${ADDITIONAL_INCLUDES}
${CUDA_INCLUDE_DIRECTORIES}
${CUDAToolkit_INCLUDE_DIRS}
${GRAPHBLAS_CUDA_INCLUDES})

Loading

0 comments on commit 05b25d3

Please sign in to comment.