Giter Club home page Giter Club logo

testblas's Introduction

testBLAS

C++ tester for BLAS

License GitHub Workflow Status

About

testBLAS

  • is based on the Catch2 unit testing framework for C++.
  • uses the C++ BLAS interface from either BLAS++ or <T>LAPACK.

Some additional information:

  1. The test files are in the src directory. To add a new test case, you just need to create a file test_<something>.cpp under the src directory and build testBLAS.

  2. The test file test_corner_cases.cpp has corner cases tests based on the BLAS specifications from the implementation of the BLAS standard in LAPACK. This is file is generated by the script in the folder scripts.

Supported in part by NSF ACI 2004850.

How to build testBLAS

testBLAS is built and installed with CMake.

Getting CMake

You can either download binaries for the latest stable or previous release of CMake, or build the current development distribution from source. CMake is also available in the APT repository on Ubuntu 16.04 or higher.

Dependencies

testBLAS depends on BLAS++. Alternatively, you can use <T>LAPACK and, in this case, you will be using testBLAS to test the C++ template BLAS in <T>LAPACK. Both packages will allow you to access different BLAS implementations.

Building testBLAS

If all dependencies are installed, testBLAS can be built using the standard CMake recipe

mkdir build
cmake -B build      # configuration step
cmake --build build # build step

You may need to inform the path for BLAS++ or <T>LAPACK. In the first case, the recipe would be

mkdir build
cmake -B build -D blaspp_DIR=<path-to-blaspp>   # configuration step
cmake --build build                             # build step

CMake options

Standard environment variables affect CMake. Some examples are

CXX                 C++ compiler
CXXFLAGS            C++ compiler flags
LDFLAGS             linker flags
  • This page lists the environment variables that have special meaning to CMake.

It is also possible to pass variables to CMake during the configuration step using the -D flag. The following example builds testBLAS in debug mode inside the directory build.

mkdir build
cmake -B build -D CMAKE_BUILD_TYPE=Debug .
cmake --build build
  • This page documents variables that are provided by CMake or have meaning to CMake when set by project code.

testBLAS options

Here are the testBLAS specific options and their default values

# Option                         # Default

TESTBLAS_BLAS                    blaspp
    
    C++ package used to access BLAS routines.
    Supported packages:
        blaspp, tlapack

Testing

There are 5 workflows that run automatically:

  1. Test the BLAS templates in <T>LAPACK.

  2. Test Netlib BLAS.

  3. Test MKL BLAS.

  4. Test BLIS.

  5. Test OpenBLAS.

See https://github.com/tlapack/testBLAS/actions.

License

BSD 3-Clause License

Copyright (c) 2021-2023, University of Colorado Denver. All rights reserved. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

testblas's People

Contributors

weslleyspereira avatar langou avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.