QUDA
v1.1.0
A library for QCD on GPUs
|
#include <stdio.h>
#include <stdlib.h>
#include <quda_internal.h>
#include <color_spinor_field.h>
#include <blas_quda.h>
#include <host_utils.h>
#include <command_line_params.h>
#include <dslash_reference.h>
#include <gtest/gtest.h>
Go to the source code of this file.
Classes | |
class | BlasTest |
Macros | |
#define | ERROR(a) fabs(blas::norm2(*a##D) - blas::norm2(*a##H)) / blas::norm2(*a##H) |
Typedefs | |
using | prec_pair_t = std::pair< QudaPrecision, QudaPrecision > |
Enumerations | |
enum class | Kernel { copyHS , copyLS , axpbyz , ax , caxpy , caxpby , cxpaypbz , axpyBzpcx , axpyZpbx , caxpbypzYmbw , cabxpyAx , caxpyXmaz , norm2 , reDotProduct , axpbyzNorm , axpyCGNorm , caxpyNorm , caxpyXmazNormX , cabxpyzAxNorm , cDotProduct , caxpyDotzy , cDotProductNormA , caxpbypzYmbwcDotProductUYNormY , HeavyQuarkResidualNorm , xpyHeavyQuarkResidualNorm , tripleCGReduction , tripleCGUpdate , axpyReDot , caxpyBxpz , caxpyBzpx , axpy_block , caxpy_block , axpyBzpcx_block , reDotProductNorm_block , reDotProduct_block , cDotProductNorm_block , cDotProduct_block , caxpyXmazMR } |
Functions | |
void | setPrec (ColorSpinorParam ¶m, QudaPrecision precision) |
void | display_test_info () |
bool | is_multi (Kernel kernel) |
bool | is_copy (Kernel kernel) |
bool | is_site_unroll (Kernel kernel) |
bool | skip_kernel (prec_pair_t pair, Kernel kernel) |
void | initFields (prec_pair_t prec_pair) |
void | freeFields () |
double | benchmark (Kernel kernel, const int niter) |
double | test (Kernel kernel) |
int | main (int argc, char **argv) |
prec_pair_t | prec_idx_map (int idx) |
TEST_P (BlasTest, verify) | |
TEST_P (BlasTest, benchmark) | |
std::string | getblasname (testing::TestParamInfo<::testing::tuple< int, int >> param) |
INSTANTIATE_TEST_SUITE_P (QUDA, BlasTest, Combine(Range(0,(Nprec *(Nprec+1))/2), Range(0, Nkernels)), getblasname) | |
Variables | |
ColorSpinorField * | xH |
ColorSpinorField * | yH |
ColorSpinorField * | zH |
ColorSpinorField * | wH |
ColorSpinorField * | vH |
ColorSpinorField * | xoH |
ColorSpinorField * | yoH |
ColorSpinorField * | zoH |
ColorSpinorField * | xD |
ColorSpinorField * | yD |
ColorSpinorField * | zD |
ColorSpinorField * | wD |
ColorSpinorField * | vD |
ColorSpinorField * | xmD |
ColorSpinorField * | ymD |
ColorSpinorField * | zmD |
ColorSpinorField * | xoD |
ColorSpinorField * | yoD |
ColorSpinorField * | zoD |
ColorSpinorField * | woD |
ColorSpinorField * | voD |
ColorSpinorField * | xmoD |
ColorSpinorField * | ymoD |
ColorSpinorField * | zmoD |
std::vector< cpuColorSpinorField * > | xmH |
std::vector< cpuColorSpinorField * > | ymH |
std::vector< cpuColorSpinorField * > | zmH |
int | Nspin |
int | Ncolor |
const std::map< QudaPrecision, std::string > | prec_map |
const int | Nprec = prec_map.size() |
const std::map< Kernel, std::string > | kernel_map |
const int | Nkernels = kernel_map.size() |
#define ERROR | ( | a | ) | fabs(blas::norm2(*a##D) - blas::norm2(*a##H)) / blas::norm2(*a##H) |
Definition at line 541 of file blas_test.cpp.
using prec_pair_t = std::pair<QudaPrecision, QudaPrecision> |
Definition at line 65 of file blas_test.cpp.
|
strong |
Definition at line 74 of file blas_test.cpp.
double benchmark | ( | Kernel | kernel, |
const int | niter | ||
) |
Definition at line 349 of file blas_test.cpp.
void display_test_info | ( | ) |
Definition at line 55 of file blas_test.cpp.
void freeFields | ( | ) |
Definition at line 315 of file blas_test.cpp.
std::string getblasname | ( | testing::TestParamInfo<::testing::tuple< int, int >> | param | ) |
Definition at line 1144 of file blas_test.cpp.
void initFields | ( | prec_pair_t | prec_pair | ) |
Definition at line 201 of file blas_test.cpp.
INSTANTIATE_TEST_SUITE_P | ( | QUDA | , |
BlasTest | , | ||
Combine(Range(0,(Nprec *(Nprec+1))/2), Range(0, Nkernels)) | , | ||
getblasname | |||
) |
bool is_copy | ( | Kernel | kernel | ) |
Definition at line 165 of file blas_test.cpp.
bool is_multi | ( | Kernel | kernel | ) |
Definition at line 160 of file blas_test.cpp.
bool is_site_unroll | ( | Kernel | kernel | ) |
Definition at line 168 of file blas_test.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 1001 of file blas_test.cpp.
prec_pair_t prec_idx_map | ( | int | idx | ) |
Definition at line 1060 of file blas_test.cpp.
void setPrec | ( | ColorSpinorParam & | param, |
QudaPrecision | precision | ||
) |
Definition at line 53 of file blas_test.cpp.
bool skip_kernel | ( | prec_pair_t | pair, |
Kernel | kernel | ||
) |
Definition at line 173 of file blas_test.cpp.
double test | ( | Kernel | kernel | ) |
Definition at line 543 of file blas_test.cpp.
Definition at line 1121 of file blas_test.cpp.
TEST_P | ( | BlasTest | , |
verify | |||
) |
Definition at line 1097 of file blas_test.cpp.
const std::map<Kernel, std::string> kernel_map |
Definition at line 117 of file blas_test.cpp.
int Ncolor |
Definition at line 51 of file blas_test.cpp.
const int Nkernels = kernel_map.size() |
Definition at line 157 of file blas_test.cpp.
const int Nprec = prec_map.size() |
Definition at line 72 of file blas_test.cpp.
int Nspin |
Definition at line 50 of file blas_test.cpp.
const std::map<QudaPrecision, std::string> prec_map |
Definition at line 67 of file blas_test.cpp.
ColorSpinorField * vD |
Definition at line 35 of file blas_test.cpp.
ColorSpinorField * vH |
Definition at line 32 of file blas_test.cpp.
ColorSpinorField * voD |
Definition at line 41 of file blas_test.cpp.
ColorSpinorField * wD |
Definition at line 35 of file blas_test.cpp.
ColorSpinorField * wH |
Definition at line 32 of file blas_test.cpp.
ColorSpinorField * woD |
Definition at line 41 of file blas_test.cpp.
ColorSpinorField* xD |
Definition at line 35 of file blas_test.cpp.
ColorSpinorField* xH |
This is the blas_test for checking correctness of the blas and reduction functions used by the lienar solvers. Any blas kernels that are added to QUDA should have a test added here.
For kernels that have mixed-precision support, we can test this functionality as well. The number of precision cominations we test are Nprec * (Nprec + 1)/2, which corresponds to all uni-precision combinations ("this precision") and all combinations with the "other precision" > "this precision".
Definition at line 32 of file blas_test.cpp.
ColorSpinorField* xmD |
Definition at line 38 of file blas_test.cpp.
std::vector<cpuColorSpinorField *> xmH |
Definition at line 47 of file blas_test.cpp.
ColorSpinorField* xmoD |
Definition at line 44 of file blas_test.cpp.
ColorSpinorField* xoD |
Definition at line 41 of file blas_test.cpp.
ColorSpinorField * xoH |
Definition at line 32 of file blas_test.cpp.
ColorSpinorField * yD |
Definition at line 35 of file blas_test.cpp.
ColorSpinorField * yH |
Definition at line 32 of file blas_test.cpp.
ColorSpinorField * ymD |
Definition at line 38 of file blas_test.cpp.
std::vector<cpuColorSpinorField *> ymH |
Definition at line 48 of file blas_test.cpp.
ColorSpinorField * ymoD |
Definition at line 44 of file blas_test.cpp.
ColorSpinorField * yoD |
Definition at line 41 of file blas_test.cpp.
ColorSpinorField * yoH |
Definition at line 32 of file blas_test.cpp.
ColorSpinorField * zD |
Definition at line 35 of file blas_test.cpp.
ColorSpinorField * zH |
Definition at line 32 of file blas_test.cpp.
ColorSpinorField * zmD |
Definition at line 38 of file blas_test.cpp.
std::vector<cpuColorSpinorField *> zmH |
Definition at line 49 of file blas_test.cpp.
ColorSpinorField * zmoD |
Definition at line 44 of file blas_test.cpp.
ColorSpinorField * zoD |
Definition at line 41 of file blas_test.cpp.
ColorSpinorField * zoH |
Definition at line 32 of file blas_test.cpp.