Skip to content

Commit

Permalink
Added placeholder GPU functions for GKS
Browse files Browse the repository at this point in the history
  • Loading branch information
elambros committed Nov 18, 2023
1 parent e1ab601 commit 563f844
Show file tree
Hide file tree
Showing 9 changed files with 201 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ FWD_TO_PIMPL(eval_uvvar_gga_rks) // U/VVar GGA (density + grad, gamma
FWD_TO_PIMPL(eval_uvvar_lda_uks) // U/VVar LDA (density)
FWD_TO_PIMPL(eval_uvvar_gga_uks) // U/VVar GGA (density + grad, gamma)

FWD_TO_PIMPL(eval_uvvar_lda_gks) // U/VVar LDA (density)
FWD_TO_PIMPL(eval_uvvar_gga_gks) // U/VVar GGA (density + grad, gamma)

FWD_TO_PIMPL(eval_zmat_lda_vxc_rks) // Eval Z Matrix LDA VXC
FWD_TO_PIMPL(eval_zmat_gga_vxc_rks) // Eval Z Matrix GGA VXC

FWD_TO_PIMPL(eval_zmat_lda_vxc_uks) // Eval Z Matrix LDA VXC
FWD_TO_PIMPL(eval_zmat_gga_vxc_uks) // Eval Z Matrix GGA VXC

FWD_TO_PIMPL(eval_zmat_lda_vxc_gks) // Eval Z Matrix LDA VXC
FWD_TO_PIMPL(eval_zmat_gga_vxc_gks) // Eval Z Matrix GGA VXC

FWD_TO_PIMPL(eval_exx_fmat) // Eval EXX F Matrix
//FWD_TO_PIMPL(eval_exx_gmat) // Eval EXX G Matrix

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ class LocalDeviceWorkDriver : public LocalWorkDriver {
void eval_uvvar_lda_uks( XCDeviceData* );
void eval_uvvar_gga_uks( XCDeviceData* );

void eval_uvvar_lda_gks( XCDeviceData* );
void eval_uvvar_gga_gks( XCDeviceData* );

void eval_kern_exc_vxc_lda( const functional_type&, XCDeviceData* );
void eval_kern_exc_vxc_gga( const functional_type&, XCDeviceData* );

Expand All @@ -78,6 +81,9 @@ class LocalDeviceWorkDriver : public LocalWorkDriver {
void eval_zmat_lda_vxc_uks( XCDeviceData* );
void eval_zmat_gga_vxc_uks( XCDeviceData* );

void eval_zmat_lda_vxc_gks( XCDeviceData* );
void eval_zmat_gga_vxc_gks( XCDeviceData* );

void eval_exx_fmat( XCDeviceData* );
void eval_exx_gmat( XCDeviceData*, const BasisSetMap& );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,16 @@ struct LocalDeviceWorkDriverPIMPL {
virtual void eval_uvvar_gga_rks( XCDeviceData* ) = 0;
virtual void eval_uvvar_lda_uks( XCDeviceData* ) = 0;
virtual void eval_uvvar_gga_uks( XCDeviceData* ) = 0;
virtual void eval_uvvar_lda_gks( XCDeviceData* ) = 0;
virtual void eval_uvvar_gga_gks( XCDeviceData* ) = 0;
virtual void eval_kern_exc_vxc_lda( const functional_type&, XCDeviceData* ) = 0;
virtual void eval_kern_exc_vxc_gga( const functional_type&, XCDeviceData* ) = 0;
virtual void eval_zmat_lda_vxc_rks( XCDeviceData* ) = 0;
virtual void eval_zmat_gga_vxc_rks( XCDeviceData* ) = 0;
virtual void eval_zmat_lda_vxc_uks( XCDeviceData* ) = 0;
virtual void eval_zmat_gga_vxc_uks( XCDeviceData* ) = 0;
virtual void eval_zmat_lda_vxc_gks( XCDeviceData* ) = 0;
virtual void eval_zmat_gga_vxc_gks( XCDeviceData* ) = 0;
virtual void inc_exc( XCDeviceData* ) = 0;
virtual void inc_nel( XCDeviceData* ) = 0;
virtual void inc_vxc( XCDeviceData* ) = 0;
Expand Down
24 changes: 24 additions & 0 deletions src/xc_integrator/local_work_driver/device/scheme1_base.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,18 @@ void AoSScheme1Base::eval_zmat_gga_vxc_uks( XCDeviceData* ){

}

void AoSScheme1Base::eval_zmat_lda_vxc_gks( XCDeviceData* ){

GAUXC_GENERIC_EXCEPTION("GKS NOT YET IMPLEMENTED FOR DEVICE");

}

void AoSScheme1Base::eval_zmat_gga_vxc_gks( XCDeviceData* ){

GAUXC_GENERIC_EXCEPTION("GKS NOT YET IMPLEMENTED FOR DEVICE");

}

void AoSScheme1Base::eval_collocation( XCDeviceData* _data ) {

auto* data = dynamic_cast<Data*>(_data);
Expand Down Expand Up @@ -489,6 +501,18 @@ void AoSScheme1Base::eval_uvvar_gga_uks( XCDeviceData* ){
}


void AoSScheme1Base::eval_uvvar_lda_gks( XCDeviceData* ){

GAUXC_GENERIC_EXCEPTION("GKS NOT YET IMPLEMENTED FOR DEVICE");

}

void AoSScheme1Base::eval_uvvar_gga_gks( XCDeviceData* ){

GAUXC_GENERIC_EXCEPTION("GKS NOT YET IMPLEMENTED FOR DEVICE");

}

void AoSScheme1Base::eval_kern_exc_vxc_lda( const functional_type& func,
XCDeviceData* _data ) {

Expand Down
5 changes: 5 additions & 0 deletions src/xc_integrator/local_work_driver/device/scheme1_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ struct AoSScheme1Base : public detail::LocalDeviceWorkDriverPIMPL {
void eval_zmat_lda_vxc_uks( XCDeviceData* ) override final;
void eval_zmat_gga_vxc_uks( XCDeviceData* ) override final;

void eval_uvvar_lda_gks( XCDeviceData* ) override final;
void eval_uvvar_gga_gks( XCDeviceData* ) override final;
void eval_zmat_lda_vxc_gks( XCDeviceData* ) override final;
void eval_zmat_gga_vxc_gks( XCDeviceData* ) override final;

void eval_kern_exc_vxc_lda( const functional_type&, XCDeviceData* ) override final;
void eval_kern_exc_vxc_gga( const functional_type&, XCDeviceData* ) override final;
void inc_exc( XCDeviceData* ) override final;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,29 @@ class IncoreReplicatedXCDeviceIntegrator :

void eval_exc_vxc_( int64_t m, int64_t n, const value_type* P,
int64_t ldp, value_type* VXC, int64_t ldvxc,
value_type* EXC ) override;
value_type* EXC, const IntegratorSettingsEXC& settings) override;

void eval_exc_vxc_( int64_t m, int64_t n, const value_type* Ps,
int64_t ldps,
const value_type* Pz,
int64_t ldpz,
value_type* VXCs, int64_t ldvxcs,
value_type* VXCz, int64_t ldvxcz,
value_type* EXC ) override;
value_type* EXC, const IntegratorSettingsEXC& settings ) override;

void eval_exc_vxc_( int64_t m, int64_t n, const value_type* Ps,
int64_t ldps,
const value_type* Pz,
int64_t ldpz,
const value_type* Py,
int64_t ldpy,
const value_type* Px,
int64_t ldpx,
value_type* VXCs, int64_t ldvxcs,
value_type* VXCz, int64_t ldvxcz,
value_type* VXCy, int64_t ldvxcy,
value_type* VXCx, int64_t ldvxcx,
value_type* EXC, const IntegratorSettingsEXC& settings ) override;


void eval_exc_grad_( int64_t m, int64_t n, const value_type* P,
Expand Down Expand Up @@ -78,6 +92,24 @@ class IncoreReplicatedXCDeviceIntegrator :
host_task_iterator task_begin, host_task_iterator task_end,
XCDeviceData& device_data );

void exc_vxc_local_work_( const basis_type& basis, const value_type* Ps, int64_t ldps,
const value_type* Pz, int64_t ldpz,
const value_type* Py, int64_t ldpy,
const value_type* Px, int64_t ldpx,
host_task_iterator task_begin, host_task_iterator task_end,
XCDeviceData& device_data );

void exc_vxc_local_work_( const basis_type& basis, const value_type* Ps, int64_t ldps,
const value_type* Pz, int64_t ldpz,
const value_type* Py, int64_t ldpy,
const value_type* Px, int64_t ldpx,
value_type* VXC, int64_t ldvxc,
value_type* VXCz, int64_t ldvxcz,
value_type* VXCy, int64_t ldvxcy,
value_type* VXCx, int64_t ldvxcx, value_type* EXC, value_type *N_EL,
host_task_iterator task_begin, host_task_iterator task_end,
XCDeviceData& device_data );

void eval_exc_grad_local_work_( const basis_type& basis, const value_type* P, int64_t ldp,
host_task_iterator task_begin, host_task_iterator task_end,
XCDeviceData& device_data );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ template <typename ValueType>
void IncoreReplicatedXCDeviceIntegrator<ValueType>::
eval_exc_vxc_( int64_t m, int64_t n, const value_type* P,
int64_t ldp, value_type* VXC, int64_t ldvxc,
value_type* EXC ) {
value_type* EXC, const IntegratorSettingsEXC& settings ) {


const auto& basis = this->load_balancer_->basis();
Expand Down Expand Up @@ -115,11 +115,31 @@ void IncoreReplicatedXCDeviceIntegrator<ValueType>::
int64_t ldpz,
value_type* VXCs, int64_t ldvxcs,
value_type* VXCz, int64_t ldvxcz,
value_type* EXC ) {
GauXC::util::unused(m,n,Ps,ldps,Pz,ldpz,VXCs,ldvxcs,VXCz,ldvxcz,EXC);
value_type* EXC, const IntegratorSettingsEXC& settings ) {
GauXC::util::unused(m,n,Ps,ldps,Pz,ldpz,VXCs,ldvxcs,VXCz,ldvxcz,EXC,settings);
GAUXC_GENERIC_EXCEPTION("UKS NOT YET IMPLEMENTED FOR DEVICE");
}

template <typename ValueType>
void IncoreReplicatedXCDeviceIntegrator<ValueType>::
eval_exc_vxc_( int64_t m, int64_t n, const value_type* Ps,
int64_t ldps,
const value_type* Pz,
int64_t ldpz,
const value_type* Py,
int64_t ldpy,
const value_type* Px,
int64_t ldpx,
value_type* VXCs, int64_t ldvxcs,
value_type* VXCz, int64_t ldvxcz,
value_type* VXCy, int64_t ldvxcy,
value_type* VXCx, int64_t ldvxcx,
value_type* EXC, const IntegratorSettingsEXC& settings ) {
GauXC::util::unused(m,n,Ps,ldps,Pz,ldpz,Py,ldpy,Px,ldpx,VXCs,ldvxcs,VXCz,ldvxcz,VXCy,ldvxcy,VXCx,ldvxcx,EXC,settings);
GAUXC_GENERIC_EXCEPTION("GKS NOT YET IMPLEMENTED FOR DEVICE");
}


template <typename ValueType>
void IncoreReplicatedXCDeviceIntegrator<ValueType>::
exc_vxc_local_work_( const basis_type& basis, const value_type* P, int64_t ldp,
Expand Down Expand Up @@ -284,6 +304,36 @@ void IncoreReplicatedXCDeviceIntegrator<ValueType>::
GAUXC_GENERIC_EXCEPTION("UKS NOT YET IMPLEMENTED FOR DEVICE");
}

template <typename ValueType>
void IncoreReplicatedXCDeviceIntegrator<ValueType>::
exc_vxc_local_work_( const basis_type& basis, const value_type* Ps, int64_t ldps,
const value_type* Pz, int64_t ldpz,
const value_type* Py, int64_t ldpy,
const value_type* Px, int64_t ldpx,
host_task_iterator task_begin, host_task_iterator task_end,
XCDeviceData& device_data ) {
GauXC::util::unused(basis,Ps,ldps,Pz,ldpz,Py,ldpy,Px,ldpx,task_begin,task_end,device_data);
GAUXC_GENERIC_EXCEPTION("GKS NOT YET IMPLEMENTED FOR DEVICE");
}

template <typename ValueType>
void IncoreReplicatedXCDeviceIntegrator<ValueType>::
exc_vxc_local_work_( const basis_type& basis, const value_type* Ps, int64_t ldps,
const value_type* Pz, int64_t ldpz,
const value_type* Py, int64_t ldpy,
const value_type* Px, int64_t ldpx,
value_type* VXCs, int64_t ldvxcs,
value_type* VXCz, int64_t ldvxcz,
value_type* VXCy, int64_t ldvxcy,
value_type* VXCx, int64_t ldvxcx, value_type* EXC, value_type *N_EL,
host_task_iterator task_begin, host_task_iterator task_end,
XCDeviceData& device_data ) {

GauXC::util::unused(basis,Ps,ldps,Pz,ldpz,Py,ldpy,Px,ldpx,VXCs,ldvxcs,VXCz,ldvxcz,VXCy,ldvxcy,VXCx,ldvxcx,EXC,N_EL,task_begin,task_end,device_data);
GAUXC_GENERIC_EXCEPTION("GKS NOT YET IMPLEMENTED FOR DEVICE");
}


}
}

Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,29 @@ class ShellBatchedReplicatedXCDeviceIntegrator :

void eval_exc_vxc_( int64_t m, int64_t n, const value_type* P,
int64_t ldp, value_type* VXC, int64_t ldvxc,
value_type* EXC ) override;
value_type* EXC, const IntegratorSettingsEXC& settings ) override;

void eval_exc_vxc_( int64_t m, int64_t n, const value_type* Ps,
int64_t ldps,
const value_type* Pz,
int64_t ldpz,
value_type* VXCs, int64_t ldvxcs,
value_type* VXCz, int64_t ldvxcz,
value_type* EXC ) override;
value_type* EXC, const IntegratorSettingsEXC& settings ) override;

void eval_exc_vxc_( int64_t m, int64_t n, const value_type* Ps,
int64_t ldps,
const value_type* Pz,
int64_t ldpz,
const value_type* Py,
int64_t ldpy,
const value_type* Px,
int64_t ldpx,
value_type* VXCs, int64_t ldvxcs,
value_type* VXCz, int64_t ldvxcz,
value_type* VXCy, int64_t ldvxcy,
value_type* VXCx, int64_t ldvxcx,
value_type* EXC, const IntegratorSettingsEXC& settings ) override;

void eval_exc_grad_( int64_t m, int64_t n, const value_type* P,
int64_t ldp, value_type* EXC_GRAD ) override;
Expand All @@ -74,6 +88,17 @@ class ShellBatchedReplicatedXCDeviceIntegrator :
host_task_iterator task_begin, host_task_iterator task_end,
XCDeviceData& device_data );

void exc_vxc_local_work_( const basis_type& basis, const value_type* Ps, int64_t ldps,
const value_type* Pz, int64_t ldpz,
const value_type* Py, int64_t ldpy,
const value_type* Px, int64_t ldpx,
value_type* VXC, int64_t ldvxc,
value_type* VXCz, int64_t ldvxcz,
value_type* VXCy, int64_t ldvxcy,
value_type* VXCx, int64_t ldvxcx, value_type* EXC, value_type *N_EL,
host_task_iterator task_begin, host_task_iterator task_end,
XCDeviceData& device_data );

void eval_exc_grad_local_work_( int64_t m, int64_t n, const value_type* P,
int64_t ldp, value_type* EXC_GRAD,
host_task_iterator task_begin, host_task_iterator task_end,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ template <typename ValueType>
void ShellBatchedReplicatedXCDeviceIntegrator<ValueType>::
eval_exc_vxc_( int64_t m, int64_t n, const value_type* P,
int64_t ldp, value_type* VXC, int64_t ldvxc,
value_type* EXC ) {
value_type* EXC, const IntegratorSettingsEXC& settings ) {


const auto& basis = this->load_balancer_->basis();
Expand Down Expand Up @@ -93,12 +93,33 @@ void ShellBatchedReplicatedXCDeviceIntegrator<ValueType>::
int64_t ldpz,
value_type* VXCs, int64_t ldvxcs,
value_type* VXCz, int64_t ldvxcz,
value_type* EXC ) {
value_type* EXC, const IntegratorSettingsEXC& settings ) {

GauXC::util::unused(m,n,Ps,ldps,Pz,ldpz,VXCs,ldvxcs,VXCz,ldvxcz,EXC);
GauXC::util::unused(m,n,Ps,ldps,Pz,ldpz,VXCs,ldvxcs,VXCz,ldvxcz,EXC,settings);
GAUXC_GENERIC_EXCEPTION("UKS NOT YET IMPLEMENTED FOR DEVICE");
}


template <typename ValueType>
void ShellBatchedReplicatedXCDeviceIntegrator<ValueType>::
eval_exc_vxc_( int64_t m, int64_t n, const value_type* Ps,
int64_t ldps,
const value_type* Pz,
int64_t ldpz,
const value_type* Py,
int64_t ldpy,
const value_type* Px,
int64_t ldpx,
value_type* VXCs, int64_t ldvxcs,
value_type* VXCz, int64_t ldvxcz,
value_type* VXCy, int64_t ldvxcy,
value_type* VXCx, int64_t ldvxcx,
value_type* EXC, const IntegratorSettingsEXC& settings ) {
GauXC::util::unused(m,n,Ps,ldps,Pz,ldpz,Py,ldpy,Px,ldpx,VXCs,ldvxcs,VXCz,ldvxcz,VXCy,ldvxcy,VXCx,ldvxcx,EXC,settings);
GAUXC_GENERIC_EXCEPTION("GKS NOT YET IMPLEMENTED FOR DEVICE");
}


template <typename ValueType>
void ShellBatchedReplicatedXCDeviceIntegrator<ValueType>::
exc_vxc_local_work_( const basis_type& basis, const value_type* P, int64_t ldp,
Expand Down Expand Up @@ -206,6 +227,24 @@ void ShellBatchedReplicatedXCDeviceIntegrator<ValueType>::
GAUXC_GENERIC_EXCEPTION("UKS NOT YET IMPLEMENTED FOR DEVICE");
}

template <typename ValueType>
void ShellBatchedReplicatedXCDeviceIntegrator<ValueType>::
exc_vxc_local_work_( const basis_type& basis, const value_type* Ps, int64_t ldps,
const value_type* Pz, int64_t ldpz,
const value_type* Py, int64_t ldpy,
const value_type* Px, int64_t ldpx,
value_type* VXCs, int64_t ldvxcs,
value_type* VXCz, int64_t ldvxcz,
value_type* VXCy, int64_t ldvxcy,
value_type* VXCx, int64_t ldvxcx, value_type* EXC, value_type *N_EL,
host_task_iterator task_begin, host_task_iterator task_end,
XCDeviceData& device_data ) {

GauXC::util::unused(basis,Ps,ldps,Pz,ldpz,Py,ldpy,Px,ldpx,VXCs,ldvxcs,VXCz,ldvxcz,VXCy,ldvxcy,VXCx,ldvxcx,EXC,N_EL,task_begin,task_end,device_data);
GAUXC_GENERIC_EXCEPTION("GKS NOT YET IMPLEMENTED FOR DEVICE");
}


template <typename ValueType>
typename ShellBatchedReplicatedXCDeviceIntegrator<ValueType>::incore_device_task
ShellBatchedReplicatedXCDeviceIntegrator<ValueType>::
Expand Down

0 comments on commit 563f844

Please sign in to comment.