Support device-specific SKALA OneDFT model lookup#206
Draft
DCM-Uni-Paderborn wants to merge 1 commit into
Draft
Conversation
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.
This draft PR makes the OneDFT model lookup handle SKALA as an installed model rather than requiring users to pass an explicit local checkpoint path.
For
MODEL SKALA, GauXC now searches the configured source and install model directories. On CUDA it first prefersskala-1.1-cuda.funwhen available, and otherwise falls back toskala-1.1.fun. Named models are also checked in the install model directory.Motivation:
The current SKALA-1.1 TorchScript checkpoint can be loaded on CUDA, but its graph contains fixed CPU index tensors in the ragged-grid packing path. When the OneDFT feature tensors are on CUDA this causes a device mismatch. A CUDA-consistent SKALA checkpoint fixes the issue locally, and this patch provides the GauXC-side model selection needed to use such a checkpoint cleanly.
Tested with CP2K + GauXC on an NVIDIA GB10 system using CUDA 13.0 and PyTorch 2.12.0+cu130:
-2.176913831885182 Ha-1.163121899608446 Ha-1.170732895358496 Ha-1.170732899047063 HaThe CUDA SKALA smoke used a GPU-consistent checkpoint derived from the local SKALA-1.1 checkpoint by replacing fixed TorchScript CPU index tensors with CUDA index tensors. This PR does not add that checkpoint. For upstream, the cleaner long-term solution is to export the SKALA checkpoint with device-aware tensor creation in the model code itself.