Downloads · 30 days
119
100% of all-time downloads
chrisvoncsefalvay/holysht
holysht is a machine learning model from chrisvoncsefalvay. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
HOLYSHT is a production-ready GPU acceleration layer for spherical harmonic transforms (SHT) in the torch-harmonics ecosystem. It provides high-performance CUDA kernels for NVIDIA GPUs (Hopper/Blackwell with TMA suppo…
Downloads · 30 days
119
100% of all-time downloads
All-time downloads
119
Public
Repo size
75.5 MB
Likes
1
Public
Click a slice to open those files.
.so55.5 MB · 99%
From the Hugging Face model README
HOLYSHT is a production-ready GPU acceleration layer for spherical harmonic transforms (SHT) in the torch-harmonics ecosystem. It provides high-performance CUDA kernels for NVIDIA GPUs (Hopper/Blackwell with TMA support) and Apple Metal/MPS kernels for arm64 Macs. Rather than reimplementing torch-harmonics, HOLYSHT focuses on accelerating the slowest execution paths—Legendre stage computation, vector SHT composition, and inverse-FFT preparation—via backend-specific kernels. It reuses torch-harmonics for quadrature weight generation and remains an intentional companion library rather than a full replacement.
Core transforms:
RealSHT, InverseRealSHT (scalar forward/inverse)RealVectorSHT, InverseRealVectorSHT (vector forward/inverse)Kernels and backends:
Infrastructure:
nsys, ncu, and cuobjdump resource reportingtorch-harmonics covering backward and non-contiguous inputsNVIDIA GPU (GB10 / H100-class, PyTorch 2.10.0+cu130, CUDA 13.0, batch size 4):
| Workload | 256×512 | 512×1024 |
|---|---|---|
| Scalar forward | 3.2x | 2.9x |
| Scalar inverse | ~1.8x | ~2.0x |
| Vector forward | 10.2x | 11.4x |
| Vector inverse | ~8.7x | 8.7x |
| Scalar forward + backward | 2.3x | ~2.0x |
| Vector forward + backward | 4.3x | ~3.8x |
| BF16 scalar forward | 4.7x | 3.0x |
| BF16 vector forward | 10.2x | 11.3x |
Apple Metal/MPS (M4 Mini, PyTorch 2.11.0, batch size 4):
Y_n^m synthesis: 1.1xEnvironment variables for tuning:
HOLYSHT_FORCE_BACKEND={fma,tma,tc_tf32,tc_bf16} — lock backend selectionHOLYSHT_FORCE_VECTOR_STRATEGY={native_vector,stacked_real} — override vector forward strategyHOLYSHT_AUTOTUNE={0|1} — enable/disable backend autotuning cacheHOLYSHT_USE_TMA={0|1} — force TMA on/off for A/B testingHOLYSHT_TMA_BATCH_TILE={1|2} — forward batch tile sizeHOLYSHT_MPS_SCALAR_NATIVE_MAX_NLAT — Metal scalar kernel cutoff (default 64)HOLYSHT_MPS_VECTOR_INVERSE_NATIVE_MAX_NLAT — Metal vector-inverse cutoff (default 512)HOLYSHT_ENABLE_NVTX=1 — enable NVTX profiling rangesProfiling scripts:
scripts/profile_nsys.sh — Nsight Systems profilingscripts/profile_ncu.sh — Nsight Compute profiling (falls back to resource reporting on restricted GPU counter access)scripts/report_resources.py — cuobjdump register/shared-memory analysistorch-harmonics for quadrature weight generation12.0+PTX on GB10; Metal targets arm64 Macsmmax shapes are padded to tile-aligned temporary spectral slabs before Legendre stage for TMA/BF16/large scalar paths when beneficialtorch-harmonics who want faster SHT execution