Skip to content

Commit

Permalink
Update EXC Only with master: Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 62ac01fab0767f13a7424bcea8a940c92e3aa7e2
Author: David Williams-Young <dbwy@lbl.gov>
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 <dbwy@lbl.gov>
Date:   Fri May 31 12:28:27 2024 -0700

    Merge branch 'master' into merge_master

commit 92bbbe2
Author: David Williams-Young <wavefunction91@gmail.com>
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 <91164556+mikovtun@users.noreply.github.com>
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 <wavefunction91@gmail.com>

    ---------

    Co-authored-by: David Williams-Young <wavefunction91@gmail.com>

commit 905c36a
Author: Ajay Panyala <ajay.panyala@gmail.com>
Date:   Fri May 31 09:07:08 2024 -0700

    cutlass requires cuda CC >= 8.0 (#130)

commit b9c2161
Author: David Williams-Young <dbwy@lbl.gov>
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 <dbwy@lbl.gov>
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 <ajay.panyala@gmail.com>
Date:   Tue May 7 09:48:17 2024 -0700

    install nccl module file

commit 3e44fcc
Author: David Williams-Young <dbwy@lbl.gov>
Date:   Mon May 6 16:01:48 2024 -0700

    Make CUTLASS a build-only dependency
  • Loading branch information
wavefunction91 committed May 31, 2024
1 parent 1c844b4 commit 50977ab
Show file tree
Hide file tree
Showing 48 changed files with 1,263 additions and 977 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build_and_test_compiler_zoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
openmp_flag: ON

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Compiler
shell: bash
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
flags: [ {magma: OFF, cutlass: OFF}, {magma: ON, cutlass: OFF}, {magma: OFF, cutlass: ON} ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Build Type
shell: bash
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
image: dbwy/chemistry

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Compiler
shell: bash
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
image: dbwy/chemistry

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Compiler
shell: bash
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
image: dbwy/chemistry

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Compiler
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions cmake/gauxc-cutlass.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check that only CUDA CC 8.0+ is enabled
foreach( cuda_arch ${CMAKE_CUDA_ARCHITECTURES} )
if( NOT cuda_arch EQUAL 80 )
message(FATAL_ERROR "GauXC Requires CUDA CC 8.0 For CUTLASS")
if( NOT cuda_arch GREATER_EQUAL 80 )
message(FATAL_ERROR "GauXC Requires CUDA CC >= 8.0 For CUTLASS")
endif()
endforeach()

Expand Down
6 changes: 6 additions & 0 deletions include/gauxc/enums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,11 @@ enum class ExecutionSpace {
Device ///< Execute task on the device (e.g. GPU)
};

/// Supported Algorithms / Integrands
enum class SupportedAlg {
XC,
DEN,
SNLINK
};

} // namespace GauXC
9 changes: 9 additions & 0 deletions include/gauxc/gauxc_config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@
#cmakedefine GAUXC_HAS_HDF5
#cmakedefine GAUXC_USE_FAST_RSQRT

#ifdef GAUXC_HAS_HOST
#cmakedefine GAUXC_CPU_XC_MAX_AM @GAUXC_CPU_XC_MAX_AM@
#cmakedefine GAUXC_CPU_SNLINK_MAX_AM @GAUXC_CPU_SNLINK_MAX_AM@
#endif

#cmakedefine GAUXC_HAS_DEVICE
#ifdef GAUXC_HAS_DEVICE
#cmakedefine GAUXC_GPU_XC_MAX_AM @GAUXC_GPU_XC_MAX_AM@
#cmakedefine GAUXC_GPU_SNLINK_MAX_AM @GAUXC_GPU_SNLINK_MAX_AM@
#endif

#if defined(__CUDACC__) || defined(__HIPCC__)
#define HOST_DEVICE_ACCESSIBLE __host__ __device__
Expand Down
14 changes: 7 additions & 7 deletions include/gauxc/load_balancer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace detail {
/// State tracker for LoadBalancer instances
struct LoadBalancerState {
bool modified_weights_are_stored = false;
///< Whether the load balancer currently sotred partitioned weights
///< Whether the load balancer currently stores partitioned weights
};


Expand Down Expand Up @@ -136,15 +136,15 @@ class LoadBalancerFactory {
* - "REPLICATED": Read as "REPLICATED-PETITE"
* - "REPLICATED-PETITE": Replicate the load balancer function, only keep
* non negligible basis functions
* - "REPLICATE-FILLIN": Same as "REPLICATED-PETITE" except if two
* non-adjacent bfns are kept, the gaps are filled in.
* This gurantees contiguous memory access but leads
* to significantly more work. Not advised for general
* usage
* - "REPLICATED-FILLIN": Same as "REPLICATED-PETITE" except if two
* non-adjacent bfns are kept, the gaps are filled in.
* This gurantees contiguous memory access but leads
* to significantly more work. Not advised for general
* usage
*
* Currently accepted values for Device execution space:
* - "DEFAULT": Read as "REPLICATED"
* - "REPLICATAED": Same as Host::REPLICATED-PETITE
* - "REPLICATED": Same as Host::REPLICATED-PETITE
*/
LoadBalancerFactory( ExecutionSpace ex, std::string kernel_name );

Expand Down
42 changes: 42 additions & 0 deletions include/gauxc/util/environment.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* 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
*/
#pragma once
#include <gauxc/gauxc_config.hpp>
#include <gauxc/enums.hpp>

namespace GauXC {

inline int gauxc_max_am(ExecutionSpace ex, SupportedAlg alg) {
switch(ex) {
#ifdef GAUXC_HAS_HOST
case ExecutionSpace::Host:
switch(alg) {
case SupportedAlg::XC:
case SupportedAlg::DEN:
return GAUXC_CPU_XC_MAX_AM;
case SupportedAlg::SNLINK:
return GAUXC_CPU_SNLINK_MAX_AM;
default: return -1;
}
#endif
#ifdef GAUXC_HAS_DEVICE
case ExecutionSpace::Device:
switch(alg) {
case SupportedAlg::XC:
case SupportedAlg::DEN:
return GAUXC_GPU_XC_MAX_AM;
case SupportedAlg::SNLINK:
return GAUXC_GPU_SNLINK_MAX_AM;
default: return -1;
}
#endif
default: return -1;
}
}

}
20 changes: 16 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@ add_subdirectory( external )

add_library( gauxc::gauxc ALIAS gauxc )


if(GAUXC_HAS_HOST)
set(GAUXC_CPU_XC_MAX_AM 6)
set(GAUXC_CPU_SNLINK_MAX_AM 6)
endif()

if(GAUXC_HAS_DEVICE)
set(GAUXC_GPU_XC_MAX_AM 4)
set(GAUXC_GPU_SNLINK_MAX_AM 2)
endif()

# Generate config file
configure_file(
${PROJECT_SOURCE_DIR}/include/gauxc/gauxc_config.hpp.in
Expand Down Expand Up @@ -151,10 +162,10 @@ set_target_properties(gauxc
"GAUXC_HAS_MPI" ${GAUXC_HAS_MPI}
"GAUXC_HAS_OPENMP" ${GAUXC_HAS_OPENMP}
"GAUXC_HAS_HDF5" ${GAUXC_HAS_HDF5}
"GAUXC_CPU_XC_MAX_AM" 6
"GAUXC_CPU_SNLINK_MAX_AM" 6
"GAUXC_GPU_XC_MAX_AM" 4
"GAUXC_GPU_SNLINK_MAX_AM" 2
"GAUXC_CPU_XC_MAX_AM" ${GAUXC_CPU_XC_MAX_AM}
"GAUXC_CPU_SNLINK_MAX_AM" ${GAUXC_CPU_SNLINK_MAX_AM}
"GAUXC_GPU_XC_MAX_AM" ${GAUXC_GPU_XC_MAX_AM}
"GAUXC_GPU_SNLINK_MAX_AM" ${GAUXC_GPU_SNLINK_MAX_AM}
)
set_property(TARGET gauxc APPEND PROPERTY EXPORT_PROPERTIES "${export_properties}")

Expand Down Expand Up @@ -204,6 +215,7 @@ configure_package_config_file(
# Install CMake files
install( FILES
${PROJECT_SOURCE_DIR}/cmake/modules/FindMAGMA.cmake
${PROJECT_SOURCE_DIR}/cmake/modules/FindNCCL.cmake
${CMAKE_CURRENT_BINARY_DIR}/gauxc-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/gauxc-config-version.cmake
DESTINATION ${INSTALL_CONFIGDIR}
Expand Down
2 changes: 1 addition & 1 deletion src/molgrid_defaults.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ std::tuple<RadialSize,AngularSize>
}

default:
GAUXC_GENERIC_EXCEPTION("Not A Resognized Standard Grid");
GAUXC_GENERIC_EXCEPTION("Not A Recognized Standard Grid");
abort();
}

Expand Down
1 change: 1 addition & 0 deletions src/xc_integrator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#
add_subdirectory(integrator_util)
add_subdirectory(local_work_driver)
add_subdirectory(shell_batched)
add_subdirectory(replicated)
add_subdirectory(xc_data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ endforeach()
add_subdirectory(obara_saika)
if(GAUXC_ENABLE_CUTLASS)
include( gauxc-cutlass )
target_link_libraries( gauxc PRIVATE gauxc_cutlass )
target_link_libraries( gauxc PRIVATE $<BUILD_INTERFACE:gauxc_cutlass> )
target_sources( gauxc PRIVATE
scheme1_cutlass_base.cxx
scheme1_cutlass_data_base.cxx
Expand Down
28 changes: 14 additions & 14 deletions src/xc_integrator/local_work_driver/device/scheme1_base.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -303,34 +303,34 @@ void AoSScheme1Base::eval_zmat_mgga_vxc_rks( XCDeviceData* _data, bool do_lapl){

void AoSScheme1Base::eval_zmat_lda_vxc_uks( XCDeviceData* ){

GAUXC_GENERIC_EXCEPTION("UKS NOT YET IMPLEMENTED FOR DEVICE");
GAUXC_GENERIC_EXCEPTION("UKS Not Yet Implemented For Device");

}

void AoSScheme1Base::eval_zmat_gga_vxc_uks( XCDeviceData* ){

GAUXC_GENERIC_EXCEPTION("UKS NOT YET IMPLEMENTED FOR DEVICE");
GAUXC_GENERIC_EXCEPTION("UKS Not Yet Implemented For Device");

}

void AoSScheme1Base::eval_zmat_mgga_vxc_uks( XCDeviceData*, bool /*do_lapl*/){
GAUXC_GENERIC_EXCEPTION("UKS MGGA NOT YET IMPLEMENTED FOR DEVICE");
GAUXC_GENERIC_EXCEPTION("UKS MGGA Not Yet Implemented For Device");
}

void AoSScheme1Base::eval_zmat_lda_vxc_gks( XCDeviceData* ){

GAUXC_GENERIC_EXCEPTION("GKS NOT YET IMPLEMENTED FOR DEVICE");
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");
GAUXC_GENERIC_EXCEPTION("GKS Not Yet Implemented For Device");

}

void AoSScheme1Base::eval_zmat_mgga_vxc_gks( XCDeviceData*, bool /*do_lapl*/){
GAUXC_GENERIC_EXCEPTION("GKS MGGA NOT YET IMPLEMENTED FOR DEVICE");
GAUXC_GENERIC_EXCEPTION("GKS MGGA Not Yet Implemented For Device");
}

void AoSScheme1Base::eval_mmat_mgga_vxc_rks( XCDeviceData* _data, bool do_lapl){
Expand All @@ -356,10 +356,10 @@ void AoSScheme1Base::eval_mmat_mgga_vxc_rks( XCDeviceData* _data, bool do_lapl){
data->device_backend_->check_error("mmat_mgga" __FILE__ ": " + std::to_string(__LINE__));
}
void AoSScheme1Base::eval_mmat_mgga_vxc_uks( XCDeviceData*, bool /*do_lapl*/){
GAUXC_GENERIC_EXCEPTION("UKS MGGA NOT YET IMPLEMENTED FOR DEVICE");
GAUXC_GENERIC_EXCEPTION("UKS MGGA Not Yet Implemented For Device");
}
void AoSScheme1Base::eval_mmat_mgga_vxc_gks( XCDeviceData*, bool /*do_lapl*/){
GAUXC_GENERIC_EXCEPTION("GKS MGGA NOT YET IMPLEMENTED FOR DEVICE");
GAUXC_GENERIC_EXCEPTION("GKS MGGA Not Yet Implemented For Device");
}

void AoSScheme1Base::eval_collocation( XCDeviceData* _data ) {
Expand Down Expand Up @@ -622,35 +622,35 @@ void AoSScheme1Base::eval_uvvar_mgga_rks( XCDeviceData* _data, bool do_lapl ){

void AoSScheme1Base::eval_uvvar_lda_uks( XCDeviceData* ){

GAUXC_GENERIC_EXCEPTION("UKS NOT YET IMPLEMENTED FOR DEVICE");
GAUXC_GENERIC_EXCEPTION("UKS Not Yet Implemented For Device");

}

void AoSScheme1Base::eval_uvvar_gga_uks( XCDeviceData* ){

GAUXC_GENERIC_EXCEPTION("UKS NOT YET IMPLEMENTED FOR DEVICE");
GAUXC_GENERIC_EXCEPTION("UKS Not Yet Implemented For Device");

}

void AoSScheme1Base::eval_uvvar_mgga_uks( XCDeviceData*, bool /*do_lapl*/ ){
GAUXC_GENERIC_EXCEPTION("UKS MGGA NOT YET IMPLEMENTED FOR DEVICE");
GAUXC_GENERIC_EXCEPTION("UKS MGGA Not Yet Implemented For Device");
}


void AoSScheme1Base::eval_uvvar_lda_gks( XCDeviceData* ){

GAUXC_GENERIC_EXCEPTION("GKS NOT YET IMPLEMENTED FOR DEVICE");
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");
GAUXC_GENERIC_EXCEPTION("GKS Not Yet Implemented For Device");

}

void AoSScheme1Base::eval_uvvar_mgga_gks( XCDeviceData*, bool /*do_lapl*/ ){
GAUXC_GENERIC_EXCEPTION("GKS MGGA NOT YET IMPLEMENTED FOR DEVICE");
GAUXC_GENERIC_EXCEPTION("GKS MGGA Not Yet Implemented For Device");
}

void AoSScheme1Base::eval_kern_exc_vxc_lda( const functional_type& func,
Expand Down
2 changes: 1 addition & 1 deletion src/xc_integrator/local_work_driver/factory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ LocalWorkDriverFactory::ptr_return_t


default:
GAUXC_GENERIC_EXCEPTION("Execution Space Not Regognized");
GAUXC_GENERIC_EXCEPTION("Execution Space Not Recognized");

}

Expand Down
Loading

0 comments on commit 50977ab

Please sign in to comment.