GPU-accelerate dI/dV (no tilting)#54
Open
GianmarcoMidena wants to merge 17 commits into
Open
Conversation
…eds to be adapted, to see almost all important variables properly in the name
- Move tests to tests/unit/io - Rename files - Remove redundant method overrides
35 tasks
GianmarcoMidena
force-pushed
the
44-enable-gpu-acceleration
branch
10 times, most recently
from
July 14, 2026 08:21
910b6f8 to
39c797f
Compare
Add environment_dev_gpu_intel.yml with PYOPENCL_COMPILER_OUTPUT=1 to show PyOpenCL compiler messages during builds on Intel GPU systems.
Add environment_dev_icd_system.yml with PYOPENCL_COMPILER_OUTPUT=1 to show PyOpenCL compiler messages during builds on Intel GPU systems.
GianmarcoMidena
force-pushed
the
44-enable-gpu-acceleration
branch
7 times, most recently
from
July 16, 2026 05:28
ceb104b to
3b3d040
Compare
Core functionality: - Ensure single scalar output per tip position - Verify tip position effects on dI/dV output - Support diagonal and non-diagonal LCAO coefficients - Use backend-specific tolerances for numerical comparison Test coverage: - Single and multiple sample positions - s, pz, pxy, dz2, dxzyz, CO tip orbitals for sp sample orbital combinations - s, pz, pxy, CO tip orbitals for spd sample orbital combinations Symmetry verification: - Verify dI/dV even-symmetry at tip center for s tip orbital Backend consistency: - Ensure consistency between batch and individual processing modes - Verify consistency across multiple executions - Validate parity between C++ and OpenCL backends (parallel and sequential) - Validate parity between C++ and NumPy backends (reference: Krejčí et al. 2017) - Validate parity between C++ and PyTorch backends (reference: Krejčí et al. 2017) - Add integration tests with real tip positions
…rbitals Fix incorrect s sample orbital conductance computation in C++ for dxz tip orbitals interacting with sp sample orbitals.
Implement OpenCL kernels for dI/dV calculations with: - Parallel and sequential execution modes - spd samples: s, pz, px, py tip orbitals - sp samples: s, pz, px, py, dz2, dxz, dyz tip orbitals Ensure arrays are contiguous (C order) before kernel execution via np.ascontiguousarray().
Implement dI/dV calculations in NumPy backend with support for: - spd samples: s, pz, px, py tip orbitals - sp samples: s, pz, px, py, dz2, dxz, dyz tip orbitals Based on Krejčí et al. (2017) and existing C++ implementation.
Avoid allocating too big intermediate arrays during dI/dV computation so large examples such as Si_7x7 can complete without exhausting available memory.
GianmarcoMidena
force-pushed
the
44-enable-gpu-acceleration
branch
from
July 16, 2026 07:51
3b3d040 to
22b910a
Compare
Implement dI/dV calculations in PyTorch backend with support for: - spd samples: s, pz, px, py tip orbitals - sp samples: s, pz, px, py, dz2, dxz, dyz tip orbitals Improve efficiency of orbital conductance computation. Based on Krejčí et al. (2017) and existing C++ implementation.
Add a benchmark suite for measuring dI/dV calculation runtime across C++, OpenCL, NumPy, and PyTorch backends on both local and Slurm cluster environments.
Use argparse to parse the PP-STM config file path instead of reading sys.argv directly. Validate the provided path before loading the TOML configuration.
GianmarcoMidena
force-pushed
the
44-enable-gpu-acceleration
branch
from
July 16, 2026 10:55
22b910a to
c92f16f
Compare
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.
GPU Acceleration Support for dI/dV (no tilting) with Multiple Backend Options
This PR enables GPU acceleration of dI/dV calculations via OpenCL or PyTorch and provides alternative computational backends. The changes include comprehensive test coverage and improved development environment configuration.
Key Changes
Backend Support
DidvBackendenum for runtime backend selectiondIdV(),STM(), andMSTM()to support backend parameterDevelopment Environment
environment_dev_gpu_intel.ymlwith Intel GPU supportPYOPENCL_COMPILER_OUTPUTenvironment variable for debuggingTesting Infrastructure
unit/andintegration/directoriesExamples & Benchmarking
s_sp.toml,pxy_sp.toml,pz_sp.tomlBug Fixes & Improvements
cpp/MatOrb.cppTesting
Extras
Closes
#44, #55