DFT-FE 1.3.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
DeviceTypeConfig.sycl.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (c) 2017-2022 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_syclh
18#define dftfeDeviceTypeConfig_syclh
19
20#include <oneapi/mkl/types.hpp>
21#include <oneapi/mkl/blas/types.hpp>
22#include <complex>
23#include <set>
24#include <map>
25namespace dftfe
26{
27 namespace utils
28 {
29 typedef std::error_code deviceError_t;
31 typedef sycl::event deviceEvent_t;
32 typedef std::complex<double> deviceDoubleComplex;
33 typedef std::complex<float> deviceFloatComplex;
34
35 // static consts
36 static std::error_code deviceSuccess = make_error_code(sycl::errc::success);
37 // static deviceError_t deviceSuccess(success_code);
38
39 // vendor blas related typedef and static consts
40 typedef sycl::queue deviceBlasHandle_t;
41 typedef oneapi::mkl::transpose deviceBlasOperation_t;
42 typedef oneapi::mkl::blas::compute_mode deviceBlasComputeType_t;
43 typedef sycl::info::event_command_status deviceBlasStatus_t;
44
45 static const sycl::info::event_command_status deviceBlasSuccess =
46 sycl::info::event_command_status::complete;
47
48 static const oneapi::mkl::transpose DEVICEBLAS_OP_N =
49 oneapi::mkl::transpose::nontrans;
50 static const oneapi::mkl::transpose DEVICEBLAS_OP_T =
51 oneapi::mkl::transpose::trans;
52 static const oneapi::mkl::transpose DEVICEBLAS_OP_C =
53 oneapi::mkl::transpose::conjtrans;
54 static const oneapi::mkl::blas::compute_mode DEVICEBLAS_COMPUTE_32F =
55 oneapi::mkl::blas::compute_mode::standard;
56 static const oneapi::mkl::blas::compute_mode
58 oneapi::mkl::blas::compute_mode::float_to_tf32;
59 static const oneapi::mkl::blas::compute_mode
61 oneapi::mkl::blas::compute_mode::float_to_bf16;
62 static const oneapi::mkl::blas::compute_mode
64 oneapi::mkl::blas::compute_mode::float_to_bf16x2;
66 inline std::vector<sycl::device> allSyclGPUDevices =
67 sycl::device::get_devices(sycl::info::device_type::gpu);
70 inline sycl::context syclContext{syclDevice};
71 inline std::map<dftfe::uInt, sycl::queue> queueRegistry{
73 sycl::queue(syclContext,
75 sycl::property::queue::in_order{})}};
76 inline std::set<dftfe::uInt> usedStreamIds{defaultStream};
77 } // namespace utils
78} // namespace dftfe
79
80#endif // dftfeDeviceTypeConfig_syclh
Definition Cell.h:36
std::map< dftfe::uInt, sycl::queue > queueRegistry
Definition DeviceTypeConfig.sycl.h:71
cuFloatComplex deviceFloatComplex
Definition DeviceTypeConfig.cu.h:30
static const cublasComputeType_t DEVICEBLAS_COMPUTE_32F
Definition DeviceTypeConfig.cu.h:45
std::set< dftfe::uInt > usedStreamIds
Definition DeviceTypeConfig.sycl.h:76
static const cublasComputeType_t DEVICEBLAS_COMPUTE_32F_FAST_16BF
Definition DeviceTypeConfig.cu.h:49
cudaError_t deviceError_t
Definition DeviceTypeConfig.cu.h:26
cudaEvent_t deviceEvent_t
Definition DeviceTypeConfig.cu.h:28
static const deviceError_t deviceSuccess
Definition DeviceTypeConfig.cu.h:33
cuDoubleComplex deviceDoubleComplex
Definition DeviceTypeConfig.cu.h:29
cudaStream_t deviceStream_t
Definition DeviceTypeConfig.cu.h:27
cublasHandle_t deviceBlasHandle_t
Definition DeviceTypeConfig.cu.h:36
static const cublasOperation_t DEVICEBLAS_OP_N
Definition DeviceTypeConfig.cu.h:42
static const sycl::info::event_command_status deviceBlasSuccess
Definition DeviceTypeConfig.sycl.h:45
sycl::context syclContext
Definition DeviceTypeConfig.sycl.h:70
cublasStatus_t deviceBlasStatus_t
Definition DeviceTypeConfig.cu.h:38
std::vector< sycl::device > allSyclGPUDevices
Definition DeviceTypeConfig.sycl.h:66
static const cublasOperation_t DEVICEBLAS_OP_T
Definition DeviceTypeConfig.cu.h:43
cublasComputeType_t deviceBlasComputeType_t
Definition DeviceTypeConfig.cu.h:39
static const cublasOperation_t DEVICEBLAS_OP_C
Definition DeviceTypeConfig.cu.h:44
sycl::device syclDevice
Definition DeviceTypeConfig.sycl.h:69
dftfe::uInt syclDeviceId
Definition DeviceTypeConfig.sycl.h:68
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 cudaStream_t defaultStream
Definition DeviceTypeConfig.cu.h:62
Definition pseudoPotentialToDftfeConverter.cc:34
std::uint32_t uInt
Definition TypeConfig.h:10