Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion third_party/gauxc/cmake/gauxc-dep-versions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set( GAUXC_LINALG_MODULES_REVISION 9d2c273a671d6811e9fd432f6a4fa3d915b144b8 )
set( GAUXC_CEREAL_REPOSITORY https://github.com/USCiLab/cereal.git )
set( GAUXC_CEREAL_REVISION v1.3.0 )

set ( GAUXC_NLOHMANN_JSON_REPOSITORY https://github.com/nlohmann/json.git )
set ( GAUXC_NLOHMANN_JSON_REVISION v3.12.0 )

set( GAUXC_CUB_REPOSITORY https://github.com/NVIDIA/cub.git )
set( GAUXC_CUB_REVISION 1.10.0 )

Expand All @@ -20,4 +23,4 @@ set( GAUXC_INTEGRATORXX_REPOSITORY https://github.com/wavefunction91/IntegratorX
set( GAUXC_INTEGRATORXX_REVISION 1369be58d7a3235dac36d75dd964fef058830622 )

set( GAUXC_HIGHFIVE_REPOSITORY https://github.com/BlueBrain/HighFive.git )
set( GAUXC_HIGHFIVE_REVISION 805f0e13d09b47c4b01d40682621904aa3b31bb8 )
set( GAUXC_HIGHFIVE_REVISION 805f0e13d09b47c4b01d40682621904aa3b31bb8 )
25 changes: 23 additions & 2 deletions third_party/gauxc/cmake/gauxc-onedft.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
find_package(nlohmann_json REQUIRED)
# store and restore CMAKE_CUDA_ARCHITECTURES if Torch clobbers it
find_package(nlohmann_json)
if( NOT nlohmann_json_FOUND )

message( STATUS "Could Not Find nlohmann_json... Building" )
message( STATUS "NLOHMANN_JSON REPO = ${GAUXC_NLOHMANN_JSON_REPOSITORY}" )

FetchContent_Declare(
nlohmann_json
GIT_REPOSITORY ${GAUXC_NLOHMANN_JSON_REPOSITORY}
GIT_TAG ${GAUXC_NLOHMANN_JSON_REVISION}
)

FetchContent_GetProperties( nlohmann_json )
if( NOT nlohmann_json_POPULATED )
FetchContent_Populate( nlohmann_json )
endif()

add_library( nlohmann_json::nlohmann_json INTERFACE IMPORTED )
set_target_properties( nlohmann_json::nlohmann_json PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${nlohmann_json_SOURCE_DIR}/include
)
endif()

# store and restore CMAKE_CUDA_ARCHITECTURES if Torch clobbers it
set(_PREV_CUDA_ARCHS "${CMAKE_CUDA_ARCHITECTURES}")
find_package(Torch REQUIRED)
if(CMAKE_CUDA_ARCHITECTURES STREQUAL "OFF")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
#include <gauxc/gauxc_config.hpp>
#include "onedft_util.hpp"
#ifdef GAUXC_HAS_CUDA
#include <cuda_runtime.h>
#endif
#include <iostream>
#include <gauxc/exceptions.hpp>
#include <mpi.h>
#include <gauxc/util/mpi.hpp>
namespace GauXC {

void print_memory_stats(size_t device_id) {
#ifdef GAUXC_HAS_CUDA
size_t free_mem, total_mem;
cudaMemGetInfo(&free_mem, &total_mem);
// std::cout << "Device ID: " << device_id << std::endl;
// std::cout << "Total Memory: " << total_mem / (1024 * 1024) << " MB" << std::endl;
// std::cout << "Free Memory: " << free_mem / (1024 * 1024) << " MB" << std::endl;
#endif
}
bool valueExists(const std::string& value) {
for (const auto& pair : feat_map) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include <gauxc/gauxc_config.hpp>
#include <torch/script.h>
#include <torch/torch.h>
#ifdef GAUXC_HAS_CUDA
#include <torch/csrc/cuda/CUDAPluggableAllocator.h>
#endif
#include <nlohmann/json.hpp>
#include <gauxc/xc_integrator/local_work_driver.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ void ReferenceReplicatedXCHostIntegrator<ValueType>::
}
// Get Tasks
auto& tasks = this->load_balancer_->get_tasks();
#ifdef GAUXC_HAS_DEVICE
auto rt = detail::as_device_runtime(this->load_balancer_->runtime());
#else
auto rt = this->load_balancer_->runtime();
#endif
int32_t world_rank = rt.comm_rank();
// Temporary electron count to judge integrator accuracy
value_type N_EL;
Expand Down
Loading