Skip to content

Commit

Permalink
GraphBLAS v5.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed May 18, 2021
1 parent 92fd7ab commit 538273c
Show file tree
Hide file tree
Showing 23 changed files with 307 additions and 418 deletions.
2 changes: 1 addition & 1 deletion CHOLMOD/Tcov/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ l_super_solve.o: ../Supernodal/cholmod_super_solve.c
cholmod_gpu_kernels.o: ../GPU/cholmod_gpu_kernels.c \
../GPU/cholmod_gpu_kernels.cu
$(C) -DDLONG -c $(I) $<
$(NVCC) -I../../SuiteSparse_config -Xcompiler -fPIC -O3 -gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_35,code=sm_35 -c ../GPU/cholmod_gpu_kernels.cu
$(NVCC) -I../../SuiteSparse_config -Xcompiler -fPIC -O3 -c ../GPU/cholmod_gpu_kernels.cu

#-------------------------------------------------------------------------------

Expand Down
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
May 17, 2021, SuiteSparse 5.10.1

* CUDA: remove sm_30 from SuiteSparse_config.mk
* GraphBLAS v5.0.5: minor bug fix
* minor changes to Makefiles

May 16, 2021, SuiteSparse 5.10.0

* GraphBLAS v5.0.4: many new features, much faster performance
Expand Down
4 changes: 2 additions & 2 deletions GraphBLAS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ endif ( )
set ( CMAKE_MACOSX_RPATH TRUE )

# version of SuiteSparse:GraphBLAS
set ( GraphBLAS_DATE "May 13, 2021")
set ( GraphBLAS_DATE "May 17, 2021")
set ( GraphBLAS_VERSION_MAJOR 5 )
set ( GraphBLAS_VERSION_MINOR 0 )
set ( GraphBLAS_VERSION_SUB 4 )
set ( GraphBLAS_VERSION_SUB 5 )

# GraphBLAS C API Specification version, at graphblas.org
set ( GraphBLAS_API_DATE "Sept 25, 2019" )
Expand Down
9 changes: 9 additions & 0 deletions GraphBLAS/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
Version 5.0.5, May 17, 2021

* (26) performance bug fix: reduce-to-vector where A is hypersparse CSR
with a transposed descriptor (or CSC with no transpose), and some cases
for GrB_mxm/mxv/vxm when computing C=A*B with A hypersparse CSC and B
bitmap/full (or A bitmap/full and B hypersparse CSR), the wrong
internal method was being selected via the auto-selection strategy,
resulting in a significant slowdown in some cases.

Version 5.0.4, May 13, 2021

* @GrB MATLAB interface: changed license from Apache-2.0
Expand Down
Binary file modified GraphBLAS/Doc/GraphBLAS_UserGuide.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions GraphBLAS/Doc/GraphBLAS_UserGuide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@ \subsection{Release Notes}

\begin{itemize}

\item Version 5.0.5 (May 17, 2021)

\begin{packed_itemize}
\item (26) performance bug fix: reduce-to-vector where \verb'A' is
hypersparse CSR with a transposed descriptor (or CSC with no
transpose), and some cases for \verb'GrB_mxm/mxv/vxm' when computing
\verb'C=A*B' with A hypersparse CSC and \verb'B' bitmap/full (or
\verb'A' bitmap/full and \verb'B' hypersparse CSR), the wrong internal
method was being selected via the auto-selection strategy, resulting in
a significant slowdown in some cases.
\end{packed_itemize}

\item Version 5.0.4 (May 13, 2021)

\begin{packed_itemize}
Expand Down
4 changes: 2 additions & 2 deletions GraphBLAS/Doc/GraphBLAS_version.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% version of SuiteSparse:GraphBLAS
\date{VERSION
5.0.4,
May 13, 2021}
5.0.5,
May 17, 2021}

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

# version of SuiteSparse:GraphBLAS
set ( GraphBLAS_DATE "May 13, 2021")
set ( GraphBLAS_DATE "May 17, 2021")
set ( GraphBLAS_VERSION_MAJOR 5 )
set ( GraphBLAS_VERSION_MINOR 0 )
set ( GraphBLAS_VERSION_SUB 4 )
set ( GraphBLAS_VERSION_SUB 5 )

# GraphBLAS C API Specification version, at graphblas.org
set ( GraphBLAS_API_DATE "Sept 25, 2019" )
Expand Down
4 changes: 2 additions & 2 deletions GraphBLAS/Include/GraphBLAS.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@

// The version of this implementation, and the GraphBLAS API version:
#define GxB_IMPLEMENTATION_NAME "SuiteSparse:GraphBLAS"
#define GxB_IMPLEMENTATION_DATE "May 13, 2021"
#define GxB_IMPLEMENTATION_DATE "May 17, 2021"
#define GxB_IMPLEMENTATION_MAJOR 5
#define GxB_IMPLEMENTATION_MINOR 0
#define GxB_IMPLEMENTATION_SUB 4
#define GxB_IMPLEMENTATION_SUB 5
#define GxB_SPEC_DATE "Sept 25, 2019"
#define GxB_SPEC_MAJOR 1
#define GxB_SPEC_MINOR 3
Expand Down
2 changes: 1 addition & 1 deletion GraphBLAS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

VERSION 5.0.4, May 13, 2021
VERSION 5.0.5, May 17, 2021

SuiteSparse:GraphBLAS is a complete implementation of the GraphBLAS standard,
which defines a set of sparse matrix operations on an extended algebra of
Expand Down
95 changes: 77 additions & 18 deletions GraphBLAS/Source/GB_AxB_meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,43 +628,102 @@ GrB_Info GB_AxB_meta // C<M>=A*B meta algorithm
{

//----------------------------------------------------------------------
// C<M> = A*B
// select the method for C<M> = A*B
//----------------------------------------------------------------------

if (allow_scale && M == NULL
&& !GB_IS_BITMAP (A) // TODO: A*D colscale with A bitmap
&& GB_is_diagonal (B, Context))
{
// C = A*D, column scale
GBURBLE ("C%s=A*B, colscale ", M_str) ;
GB_OK (GB_AxB_colscale (C, A, B, semiring, flipxy, Context)) ;
axb_method = GB_USE_COLSCALE ;
}
else if (allow_scale && M == NULL
&& !GB_IS_BITMAP (B) // TODO: D*B rowscale with B bitmap
&& GB_is_diagonal (A, Context))
{
// C = D*B, row scale
GBURBLE ("C%s=A*B, rowscale ", M_str) ;
GB_OK (GB_AxB_rowscale (C, A, B, semiring, flipxy, Context)) ;
axb_method = GB_USE_ROWSCALE ;
}
else if (AxB_method == GxB_AxB_DOT)
{
// C<M>=A*B via dot product, or C_in<M>+=A*B if in-place.
// only use the dot product method if explicitly requested
GBURBLE ("C%s=A*B', dot_product (transposed %s) ", M_str, A_str) ;
GB_OK (GB_transpose (&AT, atype_required, true, A, // AT static
NULL, NULL, NULL, false, Context)) ;
GB_OK (GB_AxB_dot (C, (can_do_in_place) ? C_in : NULL,
M, Mask_comp, Mask_struct, AT, B, semiring, flipxy,
mask_applied, done_in_place, Context)) ;
axb_method = GB_USE_DOT ;
}
else
else if (AxB_method == GxB_AxB_SAXPY
|| AxB_method == GxB_AxB_HASH
|| AxB_method == GxB_AxB_GUSTAVSON)
{
// C = A*B via saxpy: Gustavson + Hash method
GBURBLE ("C%s=A*B, saxpy ", M_str) ;
GB_OK (GB_AxB_saxpy (C, M, Mask_comp, Mask_struct,
A, B, semiring, flipxy, mask_applied, AxB_method, do_sort,
Context)) ;
// C<M>=A*B via saxpy
axb_method = GB_USE_SAXPY ;
}
else
{
// C = A*B: auto selection: select saxpy or dot
if (GB_IS_HYPERSPARSE (A) && (GB_IS_BITMAP (B) || GB_IS_FULL (B)))
{
// If A is hyper and B is bitmap/full, then saxpy will compute
// C as sparse or bitmap. If bitmap, use saxpy; if sparse, use
// dot product instead.
int ignore, saxpy_method ;
GB_AxB_saxpy_sparsity (&ignore, &saxpy_method, M, Mask_comp,
A, B, Context) ;
if (saxpy_method == GB_SAXPY_METHOD_BITMAP)
{
// bitmap = hyper * (bitmap or full) is very efficient
// to do via GB_bitmap_AxB_saxpy.
axb_method = GB_USE_SAXPY ;
}
else
{
// sparse = hyper * (bitmap or full) would use
// GB_AxB_saxpy3, which can be slow, so use dot instead.
axb_method = GB_USE_DOT ;
}
}
else
{
// otherwise, always use GB_AxB_saxpy
axb_method = GB_USE_SAXPY ;
}
}

//----------------------------------------------------------------------
// C<M> = A*B
//----------------------------------------------------------------------

switch (axb_method)
{
case GB_USE_COLSCALE :
// C = A*D, column scale
GBURBLE ("C%s=A*B, colscale ", M_str) ;
GB_OK (GB_AxB_colscale (C, A, B, semiring, flipxy, Context)) ;
break ;

case GB_USE_ROWSCALE :
// C = D*B, row scale
GBURBLE ("C%s=A*B, rowscale ", M_str) ;
GB_OK (GB_AxB_rowscale (C, A, B, semiring, flipxy, Context)) ;
break ;

case GB_USE_DOT :
// C<M>=A*B via dot product, or C_in<M>+=A*B if in-place.
GBURBLE ("C%s=A*B', dot_product (transposed %s) ",
M_str, A_str) ;
GB_OK (GB_transpose (&AT, atype_required, true, A, // AT static
NULL, NULL, NULL, false, Context)) ;
GB_OK (GB_AxB_dot (C, (can_do_in_place) ? C_in : NULL,
M, Mask_comp, Mask_struct, AT, B, semiring, flipxy,
mask_applied, done_in_place, Context)) ;
break ;

default :
// C = A*B via saxpy: Gustavson + Hash method
GBURBLE ("C%s=A*B, saxpy ", M_str) ;
GB_OK (GB_AxB_saxpy (C, M, Mask_comp, Mask_struct,
A, B, semiring, flipxy, mask_applied, AxB_method, do_sort,
Context)) ;
break ;
}
}

Expand Down
2 changes: 1 addition & 1 deletion GraphBLAS/Source/GB_AxB_saxpy_sparsity.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void GB_AxB_saxpy_sparsity // determine C_sparsity and method to use
case GxB_SPARSE :
// S = {S,H} * {B,F} : if A is very sparse
// B = {S,H} * {B,F} : otherwise C is bitmap
(*C_sparsity) = (anz < m) ? GxB_SPARSE : GxB_BITMAP ;
(*C_sparsity) = (anz < m/20) ? GxB_SPARSE : GxB_BITMAP ;
break ;
case GxB_BITMAP :
case GxB_FULL :
Expand Down
120 changes: 0 additions & 120 deletions GraphBLAS/Tcov/log_13May2021.txt

This file was deleted.

Loading

0 comments on commit 538273c

Please sign in to comment.