DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
DeviceTypeConfig.hip.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (c) 2017-2025 The Regents of the University of Michigan and DFT-FE
4// authors.
5//
6// This file is part of the DFT-FE code.
7//
8// The DFT-FE code is free software; you can use it, redistribute
9// it, and/or modify it under the terms of the GNU Lesser General
10// Public License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12// The full text of the license can be found in the file LICENSE at
13// the top level of the DFT-FE distribution.
14//
15// ---------------------------------------------------------------------
16//
17#ifndef dftfeDeviceTypeConfig_hiph
18#define dftfeDeviceTypeConfig_hiph
19#define HIPBLAS_V2
20#include <hip/hip_runtime.h>
21#include <hip/hip_complex.h>
22#include <hipblas.h>
23namespace dftfe
24{
25 namespace utils
26 {
27 typedef hipError_t deviceError_t;
28 typedef hipStream_t deviceStream_t;
29 typedef hipEvent_t deviceEvent_t;
30 typedef hipDoubleComplex deviceDoubleComplex;
31 typedef hipFloatComplex deviceFloatComplex;
32
33 // static consts
34 static const deviceError_t deviceSuccess = hipSuccess;
35
36 // vendor blas related typedef and static consts
37 typedef hipblasHandle_t deviceBlasHandle_t;
38 typedef hipblasOperation_t deviceBlasOperation_t;
39 typedef hipblasStatus_t deviceBlasStatus_t;
40 typedef hipblasComputeType_t deviceBlasComputeType_t;
41 typedef hipDataType deviceDataType_t;
42
43 static const hipblasOperation_t DEVICEBLAS_OP_N = HIPBLAS_OP_N;
44 static const hipblasOperation_t DEVICEBLAS_OP_T = HIPBLAS_OP_T;
45 static const hipblasOperation_t DEVICEBLAS_OP_C = HIPBLAS_OP_C;
46 static const hipblasComputeType_t DEVICEBLAS_COMPUTE_32F =
47 HIPBLAS_COMPUTE_32F;
48 static const hipblasComputeType_t DEVICEBLAS_COMPUTE_32F_FAST_TF32 =
49 HIPBLAS_COMPUTE_32F_FAST_TF32;
50 static const hipblasComputeType_t DEVICEBLAS_COMPUTE_32F_FAST_16BF =
51 HIPBLAS_COMPUTE_32F_FAST_16BF;
52 static const hipblasComputeType_t DEVICEBLAS_COMPUTE_32F_FAST_16F =
53 HIPBLAS_COMPUTE_32F_FAST_16F;
54 static const hipblasGemmAlgo_t DEVICEBLAS_GEMM_DEFAULT =
55 HIPBLAS_GEMM_DEFAULT;
56 static const hipDataType DEVICE_R_64F = HIP_R_64F;
57 static const hipDataType DEVICE_R_32F = HIP_R_32F;
58 static const hipDataType DEVICE_R_16F = HIP_R_16F;
59 static const hipDataType DEVICE_R_16BF = HIP_R_16BF;
60 static const hipDataType DEVICE_C_64F = HIP_C_64F;
61 static const hipDataType DEVICE_C_32F = HIP_C_32F;
62 static const hipDataType DEVICE_C_16F = HIP_C_16F;
63 static const hipDataType DEVICE_C_16BF = HIP_C_16BF;
64 } // namespace utils
65} // namespace dftfe
66
67#endif // dftfeDeviceTypeConfig_hiph
static const cudaDataType DEVICE_R_32F
Definition DeviceTypeConfig.cu.h:55
static const cudaDataType DEVICE_R_16F
Definition DeviceTypeConfig.cu.h:56
cudaDataType deviceDataType_t
Definition DeviceTypeConfig.cu.h:40
static const cublasComputeType_t DEVICEBLAS_COMPUTE_32F
Definition DeviceTypeConfig.cu.h:45
cudaError_t deviceError_t
Definition DeviceTypeConfig.cu.h:26
static const cublasComputeType_t DEVICEBLAS_COMPUTE_32F_FAST_16BF
Definition DeviceTypeConfig.cu.h:49
cudaStream_t deviceStream_t
Definition DeviceTypeConfig.cu.h:27
cublasStatus_t deviceBlasStatus_t
Definition DeviceTypeConfig.cu.h:38
static const deviceError_t deviceSuccess
Definition DeviceTypeConfig.cu.h:33
cublasComputeType_t deviceBlasComputeType_t
Definition DeviceTypeConfig.cu.h:39
static const cublasGemmAlgo_t DEVICEBLAS_GEMM_DEFAULT
Definition DeviceTypeConfig.cu.h:53
static const cudaDataType DEVICE_R_64F
Definition DeviceTypeConfig.cu.h:54
cuDoubleComplex deviceDoubleComplex
Definition DeviceTypeConfig.cu.h:29
static const cublasOperation_t DEVICEBLAS_OP_N
Definition DeviceTypeConfig.cu.h:42
static const cudaDataType DEVICE_C_32F
Definition DeviceTypeConfig.cu.h:59
static const cudaDataType DEVICE_C_64F
Definition DeviceTypeConfig.cu.h:58
static const cudaDataType DEVICE_C_16BF
Definition DeviceTypeConfig.cu.h:61
cublasHandle_t deviceBlasHandle_t
Definition DeviceTypeConfig.cu.h:36
static const cudaDataType DEVICE_R_16BF
Definition DeviceTypeConfig.cu.h:57
static const cublasOperation_t DEVICEBLAS_OP_T
Definition DeviceTypeConfig.cu.h:43
cuFloatComplex deviceFloatComplex
Definition DeviceTypeConfig.cu.h:30
cudaEvent_t deviceEvent_t
Definition DeviceTypeConfig.cu.h:28
static const cublasOperation_t DEVICEBLAS_OP_C
Definition DeviceTypeConfig.cu.h:44
static const cublasComputeType_t DEVICEBLAS_COMPUTE_32F_FAST_TF32
Definition DeviceTypeConfig.cu.h:47
static const cublasComputeType_t DEVICEBLAS_COMPUTE_32F_FAST_16F
Definition DeviceTypeConfig.cu.h:51
cublasOperation_t deviceBlasOperation_t
Definition DeviceTypeConfig.cu.h:37
static const cudaDataType DEVICE_C_16F
Definition DeviceTypeConfig.cu.h:60
Definition pseudoPotentialToDftfeConverter.cc:34