Skip to content

Commit

Permalink
Merged in memorySpaceEigVecs (pull request #527)
Browse files Browse the repository at this point in the history
FEBasisOperations Class

Approved-by: Sambit Das
Approved-by: Phani Motamarri
  • Loading branch information
knikhil1995 authored and dsambit committed Oct 15, 2023
2 parents 1e9ef2c + 10d6a2b commit ba8b843
Show file tree
Hide file tree
Showing 67 changed files with 6,235 additions and 3,820 deletions.
14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SET(TARGET_SRC
./src/dft/dft.cc
./src/dft/vselfBinsManager.cc
./src/dft/energyCalculator.cc
./src/dft/densityCalculatorCPU.cc
./src/dft/densityCalculator.cc
./src/dft/densityFirstOrderResponseCalculatorCPU.cc
./src/excManager/excDensityBaseClass.cpp
./src/excManager/excDensityLDAClass.cpp
Expand Down Expand Up @@ -166,7 +166,7 @@ SET(DEVICE_SRC
./utils/MemoryTransferKernelsDevice.cc
./utils/DeviceKernelsGeneric.cc
./utils/DeviceDirectCCLWrapper.cc
./src/dft/densityCalculatorDevice.cc
./src/dft/densityCalculatorDeviceKernels.cc
./src/dft/densityFirstOrderResponseCalculatorDevice.cc
./src/dftOperator/operatorDevice.cc
./src/dftOperator/kohnShamDFTOperatorDevice.cc
Expand All @@ -185,6 +185,7 @@ SET(DEVICE_SRC
./src/solvers/linearSolverProblemDevice.cc
./src/poisson/poissonSolverProblemDevice.cc
./src/helmholtz/kerkerSolverProblemDevice.cc
./utils/FEBasisOperationsKernelsDevice.cc
)

ELSEIF ("${GPU_LANG}" STREQUAL "hip")
Expand All @@ -193,7 +194,7 @@ SET(DEVICE_SRC
./utils/MemoryTransferKernelsDevice.cc
./utils/DeviceKernelsGeneric.cc
./utils/DeviceDirectCCLWrapper.cc
./src/dft/densityCalculatorDevice.cc
./src/dft/densityCalculatorDeviceKernels.cc
./src/dft/densityFirstOrderResponseCalculatorDevice.cc
./src/dftOperator/operatorDevice.cc
./src/dftOperator/kohnShamDFTOperatorDevice.cc
Expand All @@ -212,6 +213,7 @@ SET(DEVICE_SRC
./src/solvers/linearSolverProblemDevice.cc
./src/poisson/poissonSolverProblemDevice.cc
./src/helmholtz/kerkerSolverProblemDevice.cc
./utils/FEBasisOperationsKernelsDevice.cc
)

ENDIF()
Expand All @@ -222,7 +224,11 @@ IF (WITH_GPU)
set_source_files_properties(${DEVICE_SRC} PROPERTIES LANGUAGE CUDA)
ELSEIF ("${GPU_LANG}" STREQUAL "hip")
set_source_files_properties(${DEVICE_SRC} PROPERTIES LANGUAGE HIP)
ADD_DEFINITIONS(-D__HIP_PLATFORM_AMD__)
IF ("${GPU_VENDOR}" STREQUAL "amd")
ADD_DEFINITIONS(-D__HIP_PLATFORM_AMD__)
ELSEIF ("${GPU_VENDOR}" STREQUAL "nvidia")
ADD_DEFINITIONS(-D__HIP_PLATFORM_NVIDIA__)
ENDIF()
ENDIF()
ENDIF()
IF (WITH_GPU)
Expand Down
56 changes: 56 additions & 0 deletions include/DeviceBlasWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,62 @@ namespace dftfe
long long int strideC,
int batchCount);

deviceBlasStatus_t
gemv(deviceBlasHandle_t handle,
deviceBlasOperation_t trans,
int m,
int n,
const double * alpha,
const double * A,
int lda,
const double * x,
int incx,
const double * beta,
double * y,
int incy);

deviceBlasStatus_t
gemv(deviceBlasHandle_t handle,
deviceBlasOperation_t trans,
int m,
int n,
const float * alpha,
const float * A,
int lda,
const float * x,
int incx,
const float * beta,
float * y,
int incy);

deviceBlasStatus_t
gemv(deviceBlasHandle_t handle,
deviceBlasOperation_t trans,
int m,
int n,
const std::complex<double> *alpha,
const std::complex<double> *A,
int lda,
const std::complex<double> *x,
int incx,
const std::complex<double> *beta,
std::complex<double> * y,
int incy);

deviceBlasStatus_t
gemv(deviceBlasHandle_t handle,
deviceBlasOperation_t trans,
int m,
int n,
const std::complex<float> *alpha,
const std::complex<float> *A,
int lda,
const std::complex<float> *x,
int incx,
const std::complex<float> *beta,
std::complex<float> * y,
int incy);


} // namespace deviceBlasWrapper
} // namespace utils
Expand Down
Loading

0 comments on commit ba8b843

Please sign in to comment.