![]() |
QMCPACK
|
implements delayed update on Intel GPU using SYCL More...
Public Member Functions | |
DelayedUpdateSYCL () | |
default constructor More... | |
~DelayedUpdateSYCL () | |
void | resize (int norb, int delay) |
resize the internal storage More... | |
template<typename TREAL > | |
void | invert_transpose (const Matrix< T > &logdetT, Matrix< T > &Ainv, std::complex< TREAL > &log_value) |
compute the inverse of the transpose of matrix A and its determinant value in log More... | |
void | initializeInv (const Matrix< T > &Ainv) |
initialize internal objects when Ainv is refreshed More... | |
int | getDelayCount () const |
template<typename VVT > | |
void | getInvRow (const Matrix< T > &Ainv, int rowchanged, VVT &invRow) |
compute the row of up-to-date Ainv More... | |
template<typename VVT , typename RATIOT > | |
void | acceptRow (Matrix< T > &Ainv, int rowchanged, const VVT &psiV, const RATIOT ratio_new) |
accept a move with the update delayed More... | |
void | updateInvMat (Matrix< T > &Ainv, bool transfer_to_host=true) |
update the full Ainv and reset delay_count More... | |
Private Member Functions | |
void | clearDelayCount () |
reset delay count to 0 More... | |
Private Attributes | |
Matrix< T > | U |
Matrix< T > | Binv |
Matrix< T > | V |
Matrix< T, SYCLAllocator< T > > | temp_gpu |
Matrix< T, SYCLAllocator< T > > | U_gpu |
GPU copy of U, V, Binv, Ainv. More... | |
Matrix< T, SYCLAllocator< T > > | V_gpu |
Matrix< T, SYCLAllocator< T > > | Binv_gpu |
Matrix< T, SYCLAllocator< T > > | Ainv_gpu |
Vector< T > | p |
Vector< int, SYCLHostAllocator< int > > | delay_list |
int | delay_count |
current number of delays, increase one for each acceptance, reset to 0 after updating Ainv More... | |
syclSolverInverter< T_FP > | sycl_inverter_ |
PrefetchedRange | prefetched_range |
Matrix< T > | Ainv_buffer |
sycl::queue | m_queue_ |
implements delayed update on Intel GPU using SYCL
T | base precision for most computation |
T_FP | high precision for matrix inversion, T_FP >= T |
Definition at line 35 of file DelayedUpdateSYCL.h.
|
inline |
default constructor
Definition at line 73 of file DelayedUpdateSYCL.h.
References qmcplusplus::createSYCLInOrderQueueOnDefaultDevice(), and DelayedUpdateSYCL< T, T_FP >::m_queue_.
|
inline |
Definition at line 75 of file DelayedUpdateSYCL.h.
References qmcplusplus::syclSolver::freeBuffer().
|
inline |
accept a move with the update delayed
Ainv | inverse matrix |
rowchanged | the row id corresponding to the proposed electron |
psiV | new orbital values |
Before delay_count reaches the maximum delay, only Binv is updated with a recursive algorithm
Definition at line 161 of file DelayedUpdateSYCL.h.
References DelayedUpdateSYCL< T, T_FP >::Ainv_buffer, DelayedUpdateSYCL< T, T_FP >::Binv, Matrix< T, Alloc >::cols(), BLAS::cone, qmcplusplus::syclBLAS::copy_n(), BLAS::czero, Matrix< T, Alloc >::data(), Vector< T, Alloc >::data(), DelayedUpdateSYCL< T, T_FP >::delay_count, DelayedUpdateSYCL< T, T_FP >::delay_list, BLAS::gemv(), BLAS::ger(), PrefetchedRange::getOffset(), DelayedUpdateSYCL< T, T_FP >::p, DelayedUpdateSYCL< T, T_FP >::prefetched_range, Matrix< T, Alloc >::rows(), DelayedUpdateSYCL< T, T_FP >::U, DelayedUpdateSYCL< T, T_FP >::updateInvMat(), and DelayedUpdateSYCL< T, T_FP >::V.
|
inlineprivate |
reset delay count to 0
Definition at line 65 of file DelayedUpdateSYCL.h.
References PrefetchedRange::clear(), DelayedUpdateSYCL< T, T_FP >::delay_count, and DelayedUpdateSYCL< T, T_FP >::prefetched_range.
Referenced by DelayedUpdateSYCL< T, T_FP >::initializeInv(), DelayedUpdateSYCL< T, T_FP >::invert_transpose(), and DelayedUpdateSYCL< T, T_FP >::updateInvMat().
|
inline |
Definition at line 121 of file DelayedUpdateSYCL.h.
References DelayedUpdateSYCL< T, T_FP >::delay_count.
|
inline |
compute the row of up-to-date Ainv
Ainv | inverse matrix |
rowchanged | the row id corresponding to the proposed electron |
Definition at line 128 of file DelayedUpdateSYCL.h.
References DelayedUpdateSYCL< T, T_FP >::Ainv_buffer, DelayedUpdateSYCL< T, T_FP >::Ainv_gpu, DelayedUpdateSYCL< T, T_FP >::Binv, PrefetchedRange::checkRange(), Matrix< T, Alloc >::cols(), BLAS::cone, qmcplusplus::syclBLAS::copy_n(), BLAS::czero, Matrix< T, Alloc >::data(), Vector< T, Alloc >::data(), DelayedUpdateSYCL< T, T_FP >::delay_count, BLAS::gemv(), PrefetchedRange::getOffset(), DelayedUpdateSYCL< T, T_FP >::m_queue_, omptarget::min(), DelayedUpdateSYCL< T, T_FP >::p, DelayedUpdateSYCL< T, T_FP >::prefetched_range, Matrix< T, Alloc >::rows(), PrefetchedRange::setRange(), Matrix< T, Alloc >::size(), DelayedUpdateSYCL< T, T_FP >::U, and DelayedUpdateSYCL< T, T_FP >::V.
|
inline |
initialize internal objects when Ainv is refreshed
Ainv | inverse matrix |
Definition at line 114 of file DelayedUpdateSYCL.h.
References DelayedUpdateSYCL< T, T_FP >::Ainv_gpu, DelayedUpdateSYCL< T, T_FP >::clearDelayCount(), Matrix< T, Alloc >::data(), DelayedUpdateSYCL< T, T_FP >::m_queue_, and Matrix< T, Alloc >::size().
|
inline |
compute the inverse of the transpose of matrix A and its determinant value in log
TREAL | real type |
Definition at line 104 of file DelayedUpdateSYCL.h.
References DelayedUpdateSYCL< T, T_FP >::Ainv_gpu, DelayedUpdateSYCL< T, T_FP >::clearDelayCount(), DelayedUpdateSYCL< T, T_FP >::m_queue_, and DelayedUpdateSYCL< T, T_FP >::sycl_inverter_.
|
inline |
resize the internal storage
norb | number of electrons/orbitals |
delay,maximum | delay 0<delay<=norb |
Definition at line 81 of file DelayedUpdateSYCL.h.
References DelayedUpdateSYCL< T, T_FP >::Ainv_buffer, DelayedUpdateSYCL< T, T_FP >::Ainv_gpu, DelayedUpdateSYCL< T, T_FP >::Binv, DelayedUpdateSYCL< T, T_FP >::Binv_gpu, DelayedUpdateSYCL< T, T_FP >::delay_list, omptarget::min(), DelayedUpdateSYCL< T, T_FP >::p, Matrix< T, Alloc >::resize(), Vector< T, Alloc >::resize(), DelayedUpdateSYCL< T, T_FP >::temp_gpu, DelayedUpdateSYCL< T, T_FP >::U, DelayedUpdateSYCL< T, T_FP >::U_gpu, DelayedUpdateSYCL< T, T_FP >::V, and DelayedUpdateSYCL< T, T_FP >::V_gpu.
|
inline |
update the full Ainv and reset delay_count
Ainv | inverse matrix |
Definition at line 194 of file DelayedUpdateSYCL.h.
References DelayedUpdateSYCL< T, T_FP >::Ainv_gpu, qmcplusplus::applyW_stageV_sycl(), DelayedUpdateSYCL< T, T_FP >::Binv, DelayedUpdateSYCL< T, T_FP >::Binv_gpu, DelayedUpdateSYCL< T, T_FP >::clearDelayCount(), Matrix< T, Alloc >::cols(), BLAS::cone, BLAS::czero, Matrix< T, Alloc >::data(), DelayedUpdateSYCL< T, T_FP >::delay_count, DelayedUpdateSYCL< T, T_FP >::delay_list, qmcplusplus::syclBLAS::gemm(), DelayedUpdateSYCL< T, T_FP >::m_queue_, Matrix< T, Alloc >::rows(), Matrix< T, Alloc >::size(), DelayedUpdateSYCL< T, T_FP >::temp_gpu, DelayedUpdateSYCL< T, T_FP >::U, DelayedUpdateSYCL< T, T_FP >::U_gpu, and DelayedUpdateSYCL< T, T_FP >::V_gpu.
Referenced by DelayedUpdateSYCL< T, T_FP >::acceptRow().
|
private |
Definition at line 60 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::getInvRow(), and DelayedUpdateSYCL< T, T_FP >::resize().
|
private |
|
private |
Definition at line 39 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::getInvRow(), DelayedUpdateSYCL< T, T_FP >::resize(), and DelayedUpdateSYCL< T, T_FP >::updateInvMat().
|
private |
Definition at line 46 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::resize(), and DelayedUpdateSYCL< T, T_FP >::updateInvMat().
|
private |
current number of delays, increase one for each acceptance, reset to 0 after updating Ainv
Definition at line 53 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::clearDelayCount(), DelayedUpdateSYCL< T, T_FP >::getDelayCount(), DelayedUpdateSYCL< T, T_FP >::getInvRow(), and DelayedUpdateSYCL< T, T_FP >::updateInvMat().
|
private |
Definition at line 51 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::resize(), and DelayedUpdateSYCL< T, T_FP >::updateInvMat().
|
private |
Definition at line 62 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::DelayedUpdateSYCL(), DelayedUpdateSYCL< T, T_FP >::getInvRow(), DelayedUpdateSYCL< T, T_FP >::initializeInv(), DelayedUpdateSYCL< T, T_FP >::invert_transpose(), and DelayedUpdateSYCL< T, T_FP >::updateInvMat().
|
private |
Definition at line 49 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::getInvRow(), and DelayedUpdateSYCL< T, T_FP >::resize().
|
private |
Definition at line 58 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::clearDelayCount(), and DelayedUpdateSYCL< T, T_FP >::getInvRow().
|
private |
Definition at line 55 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::invert_transpose().
|
private |
Definition at line 42 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::resize(), and DelayedUpdateSYCL< T, T_FP >::updateInvMat().
|
private |
Definition at line 38 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::getInvRow(), DelayedUpdateSYCL< T, T_FP >::resize(), and DelayedUpdateSYCL< T, T_FP >::updateInvMat().
|
private |
GPU copy of U, V, Binv, Ainv.
Definition at line 44 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::resize(), and DelayedUpdateSYCL< T, T_FP >::updateInvMat().
|
private |
Definition at line 40 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::getInvRow(), and DelayedUpdateSYCL< T, T_FP >::resize().
|
private |
Definition at line 45 of file DelayedUpdateSYCL.h.
Referenced by DelayedUpdateSYCL< T, T_FP >::resize(), and DelayedUpdateSYCL< T, T_FP >::updateInvMat().