HIP Fixes - #54
Open
ajaypanyala wants to merge 2 commits into
Open
Conversation
…functional coverage
The HIP backend (unlike CUDA and SYCL) never implemented Fxc/vxc_fxc
(second XC derivative) device evaluation, and separately, builtin.hip's
explicit template instantiation list only covered 28 of the 102
functional types CUDA's builtin.cu instantiates. Both left vtable
symbols unresolved at link time for any executable that actually links
(as opposed to just archiving) against libexchcxx built for HIP -- e.g.
ordinary SVWN5/M06-2X calculations, or anything touching Fxc contraction.
- hip/builtin.hip: add generic (KernelType-templated) stub definitions
for the LDA/GGA/MGGA device_eval_{fxc,vxc_fxc}[_inc]_helper_* function
templates, throwing std::runtime_error at call time. Wire them into
the {LDA,GGA,MGGA}_GENERATE_DEVICE_HELPERS macros so every
instantiated functional type gets them. Also complete the type list
itself: append the 74 functional types (mostly GGA/meta-GGA -- PBE,
M06 family, TPSS, SCAN-adjacent, etc.) present in cuda/builtin.cu but
missing here entirely, so their ordinary EXC/VXC evaluation -- which
the shared kernel_traits<T> math already supports -- actually gets
compiled for HIP.
- hip/libxc_device.hip: add the missing LibxcKernelImpl
eval_fxc_device_/eval_vxc_fxc_device_ (and _inc_ variants) overrides
using the existing UNUSED_DEVICE_(INC_)INTERFACE_GENERATOR macros --
the same idiom already used here for eval_*_inc_device_ and in
builtin_kernel.cxx for disabled kernels.
- hip/xc_functional_device.hip: stub XCFunctional::eval_fxc_device/
eval_vxc_fxc_device (LDA/GGA/MGGA) the same way; these aggregate
over each constituent kernel's (now-stubbed) eval_*_fxc_device.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HIP: implement missing Fxc/vxc_fxc device stubs and complete builtin functional coverage
The HIP backend (unlike CUDA and SYCL) never implemented Fxc/vxc_fxc (second XC derivative) device evaluation, and separately, builtin.hip's explicit template instantiation list only covered 28 of the 102 functional types CUDA's builtin.cu instantiates. Both left vtable symbols unresolved at link time for any executable that actually links (as opposed to just archiving) against libexchcxx built for HIP -- e.g. ordinary SVWN5/M06-2X calculations, or anything touching Fxc contraction.