imate
C++/CUDA Reference
Loading...
Searching...
No Matches
cu_definitions.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli <sameli@berkeley.edu>
3 * SPDX-License-Identifier: BSD-3-Clause
4 * SPDX-FileType: SOURCE
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the license found in the LICENSE.txt file in the root
8 * directory of this source tree.
9 */
10
11
12#ifndef _CU_DEFINITIONS_CU_DEFINITIONS_H_
13#define _CU_DEFINITIONS_CU_DEFINITIONS_H_
14
15
16// ===========
17// Definitions
18// ===========
19
20// If USE_CUBLAS is set to 1, the CuBLAS library is used for dense vector and
21// matrix operations. By default, this is set to "1". If set to "0", the
22// in-house implementation of basic matrix and vector operations will be used.
23#ifndef USE_CUBLAS
24 #define USE_CUBLAS 1
25#endif
26
27// If USE_CUDA_FP8_E5M2 is set to 1, the templated class and functions in
28// float8 of type E5M2 in cuda are compiled. Default is 0.
29#ifndef USE_CUDA_FP8_E5M2
30 #define USE_CUDA_FP8_E5M2 0
31#endif
32
33// If USE_CUDA_FP8_E4M3 is set to 1, the templated class and functions in
34// float8 of type E4M3 in cuda are compiled. Default is 0.
35#ifndef USE_CUDA_FP8_E4M3
36 #define USE_CUDA_FP8_E4M3 0
37#endif
38
39// If USE_CUDA_FP16 is set to 1, the templated class and functions in float16
40// type in cuda are compiled. Default is 0.
41#ifndef USE_CUDA_FP16
42 #define USE_CUDA_FP16 0
43#endif
44
45// If USE_CUDA_BF16 is set to 1, the templated class and functions in bfloat16
46// type in cuda are compiled. Default is 0.
47#ifndef USE_CUDA_BF16
48 #define USE_CUDA_BF16 0
49#endif
50
51// If USE_CUDA_FP32 is set to 1, the templated class and functions in float32
52// type in cuda are compiled. Default is 1.
53#ifndef USE_CUDA_FP32
54 #define USE_CUDA_FP32 1
55#endif
56
57// If USE_CUDA_FP64 is set to 1, the templated class and functions in float64
58// type in cuda are compiled. Default is 1.
59#ifndef USE_CUDA_FP64
60 #define USE_CUDA_FP64 1
61#endif
62
63
64#endif // _CU_DEFINITIONS_CU_DEFINITIONS_H_