Skip to content

Latest commit

 

History

History
87 lines (73 loc) · 4.65 KB

File metadata and controls

87 lines (73 loc) · 4.65 KB
  Copyright 2024 Huawei Technologies Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Introduction to the transition path

ALP/GraphBLAS exposes several of its functionalities via established C interfaces, in order to facilitate the transition of legacy software. Ideally, users of transition interfaces need only re-compile and link their software; in some cases, trivial modifications might be required to migrate to transition interfaces, e.g., changing the prefix of called functions.

The current transition path interfaces is at an experimental prototype phase; in particular, not all primitives in a given standard API are currently implemented. For SparseBLAS in particular, additional support or coverage may freely be requested in GitHub issue #14. For other standard interfaces, feel free to open new issues or to contact the maintainers.

The currently exposed interfaces are:

  • the Sparse BLAS interface as defined by the BLAS forum and in the following paper: Duff, Iain S., Michael A. Heroux, and Roldan Pozo. "An overview of the sparse basic linear algebra subprograms: The new standard from the BLAS technical forum." ACM Transactions on Mathematical Software (TOMS) 28(2), 2002, pp. 239-267. Refer to either of the following for the current implementation status within ALP:
  • the SpBLAS interface-- while not a standard proper, it may be considered a de-facto one as it is implemented by various vendors as well as open source projects and enjoys wide-spread use. Refer to either of the following for the current implementation status within ALP:
  • a non-standard solver interface that currently only exposes the ALP conjugate gradient (CG) algorithm and may be used with any CRS matrix and raw C/C++ vector data. Refer to either of the following for the current implementation status within ALP:

All of these transition libraries show-case ALP's ability to quickly wrap around external APIs, thus simplifying integration of ALP-backed code with existing software. We do note, however, that the direct use of the native C++ ALP API may lead to higher performance than the use of these transition path interfaces, and that in some cases the legacy interface itself is what makes achieving such higher performance impossible.

The transition interfaces are built with the default make. Upon installation, the headers and (static) libraries are installed in <installation directory>/include/transition/ and <installation directory>/lib/sequential/, respectively.

The default library names for the sequential transition path libraries are:

  • libsparseblas_sequential.a for the standard Sparse BLAS implementation,
  • libalp_cspblas_sequential.a for the de-facto standard SpBLAS, and
  • libspsolver_sequential.a for the non-standard solver library.

The default shared-memory parallel transition path libraries are:

  • libsparseblas_shmem_parallel.a for the standard Sparse BLAS,
  • libalp_cspblas_shmem_parallel.a for the de-facto standard SpBLAS,
  • libspsolver_shmem_parallel.a for the non-standard solver library, and
  • libksolver.a for the ALP-generated Kunpeng Library solver implementation.

At present, no dynamic libraries are built -- if this would be useful, please feel free to submit a feature request or to contact the maintainers.