-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add RKS EXC-only integrator interface + UTs * Add UKS/GKS EXC-only interfaces * Make EXC-only path through GPU code work * Explicitly disable UKS/GKS EXC only * Update EXC Only with `master`: Squashed commit of the following: commit 62ac01fab0767f13a7424bcea8a940c92e3aa7e2 Author: David Williams-Young <[email protected]> Date: Fri May 31 13:36:46 2024 -0700 Fix EXC-only path for host integrators, UTs pass commit 57f305c39ca4c858d5050c5dfc32c3b1ffab2e82 Merge: 1c844b4 92bbbe2 Author: David Williams-Young <[email protected]> Date: Fri May 31 12:28:27 2024 -0700 Merge branch 'master' into merge_master commit 92bbbe2 Author: David Williams-Young <[email protected]> Date: Fri May 31 10:50:04 2024 -0700 actions/checkout@v3 -> actions/checkout@v4 (#131) Bump actions/checkout version to quiet GHA warnings commit b61ee7a Author: mikovtun <[email protected]> Date: Fri May 31 10:21:21 2024 -0700 Spellcheck Error Messages (#129) * Fixed spelling in error messages and homogenized capitalization * Update include/gauxc/load_balancer.hpp Co-authored-by: David Williams-Young <[email protected]> --------- Co-authored-by: David Williams-Young <[email protected]> commit 905c36a Author: Ajay Panyala <[email protected]> Date: Fri May 31 09:07:08 2024 -0700 cutlass requires cuda CC >= 8.0 (#130) commit b9c2161 Author: David Williams-Young <[email protected]> Date: Tue May 21 15:13:43 2024 -0700 Refactor ShellBatched Integrators (#127) * Refactor of RKS/UKS/GKS Host drivers to reduce code replication + various QoL * ShellBatched Refactor - Host compiles and tests, device untested * Fix new ShellBatched for Device, add additional std::future::get to proagate exceptions * Update copyright year on old files, shellbatched -> shell_batched * document why the extra std::future::get is there commit 6a8f4bf Author: David Williams-Young <[email protected]> Date: Wed May 8 09:32:51 2024 -0700 Add Runtime Environment Query Functions (#126) * Add runtime environment query functions * Update gauxc_config.hpp.in commit cf6b85c Author: Ajay Panyala <[email protected]> Date: Tue May 7 09:48:17 2024 -0700 install nccl module file commit 3e44fcc Author: David Williams-Young <[email protected]> Date: Mon May 6 16:01:48 2024 -0700 Make CUTLASS a build-only dependency * Add missing file * Remove old shellbatched file
- Loading branch information
1 parent
92bbbe2
commit be9ac8d
Showing
24 changed files
with
617 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
src/xc_integrator/replicated/device/incore_replicated_xc_device_integrator_exc.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/** | ||
* GauXC Copyright (c) 2020-2024, The Regents of the University of California, | ||
* through Lawrence Berkeley National Laboratory (subject to receipt of | ||
* any required approvals from the U.S. Dept. of Energy). All rights reserved. | ||
* | ||
* See LICENSE.txt for details | ||
*/ | ||
#include "incore_replicated_xc_device_integrator.hpp" | ||
#include "device/local_device_work_driver.hpp" | ||
#include "device/xc_device_aos_data.hpp" | ||
#include <fstream> | ||
#include <gauxc/exceptions.hpp> | ||
#include <gauxc/util/unused.hpp> | ||
|
||
namespace GauXC { | ||
namespace detail { | ||
|
||
template <typename ValueType> | ||
void IncoreReplicatedXCDeviceIntegrator<ValueType>:: | ||
eval_exc_( 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* EXC, const IntegratorSettingsXC& settings ) { | ||
|
||
|
||
if(Pz) GAUXC_GENERIC_EXCEPTION("UKS/GKS + EXC Only Device NYI"); | ||
const auto& basis = this->load_balancer_->basis(); | ||
|
||
// Check that P / VXC are sane | ||
const int64_t nbf = basis.nbf(); | ||
if( m != n ) | ||
GAUXC_GENERIC_EXCEPTION("P/VXC Must Be Square"); | ||
if( m != nbf ) | ||
GAUXC_GENERIC_EXCEPTION("P/VXC Must Have Same Dimension as Basis"); | ||
if( ldps < nbf ) | ||
GAUXC_GENERIC_EXCEPTION("Invalid LDP"); | ||
|
||
|
||
// Get Tasks | ||
auto& tasks = this->load_balancer_->get_tasks(); | ||
|
||
// Allocate Device memory | ||
auto* lwd = dynamic_cast<LocalDeviceWorkDriver*>(this->local_work_driver_.get() ); | ||
auto rt = detail::as_device_runtime(this->load_balancer_->runtime()); | ||
auto device_data_ptr = lwd->create_device_data(rt); | ||
|
||
GAUXC_MPI_CODE( MPI_Barrier(rt.comm());) | ||
|
||
// Temporary electron count to judge integrator accuracy | ||
value_type N_EL; | ||
|
||
// Compute local contributions to EXC/VXC and retrieve | ||
// data from device | ||
this->timer_.time_op("XCIntegrator.LocalWork_EXC", [&](){ | ||
exc_vxc_local_work_( basis, Ps, ldps, nullptr, 0, EXC, | ||
&N_EL, tasks.begin(), tasks.end(), *device_data_ptr); | ||
}); | ||
|
||
GAUXC_MPI_CODE( | ||
this->timer_.time_op("XCIntegrator.ImbalanceWait_EXC",[&](){ | ||
MPI_Barrier(this->load_balancer_->runtime().comm()); | ||
}); | ||
) | ||
|
||
// Reduce Results in host mem | ||
this->timer_.time_op("XCIntegrator.Allreduce_EXC", [&](){ | ||
this->reduction_driver_->allreduce_inplace( EXC, 1 , ReductionOp::Sum ); | ||
this->reduction_driver_->allreduce_inplace( &N_EL, 1 , ReductionOp::Sum ); | ||
}); | ||
|
||
} | ||
|
||
|
||
|
||
template <typename ValueType> | ||
void IncoreReplicatedXCDeviceIntegrator<ValueType>:: | ||
eval_exc_( int64_t m, int64_t n, const value_type* Ps, int64_t ldps, | ||
const value_type* Pz, int64_t ldpz, | ||
value_type* EXC, const IntegratorSettingsXC& settings ) { | ||
|
||
eval_exc_(m, n, Ps, ldps, Pz, ldpz, nullptr, 0, nullptr, 0, EXC, settings); | ||
|
||
} | ||
|
||
template <typename ValueType> | ||
void IncoreReplicatedXCDeviceIntegrator<ValueType>:: | ||
eval_exc_( int64_t m, int64_t n, const value_type* P, int64_t ldp, | ||
value_type* EXC, const IntegratorSettingsXC& settings ) { | ||
|
||
eval_exc_(m, n, P, ldp, nullptr, 0, nullptr, 0, nullptr, 0, EXC, settings); | ||
|
||
} | ||
|
||
|
||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.