paper-with-me

Papers

TorchMorph: CUDA-accelerated Morphological Transforms

2026-08-25 · Kai Zhao hf

Morphological transforms are long-standing tools for shape and mask processing, but the de facto reference implementation in the Python ecosystem, i.e. scipy.ndimage, is CPU-only, single-array, and therefore unusable inside a GPU training loop without an expensive device-to-host round trip. GPU vision libraries built on PyTorch cover a narrow subset of these operators, typically restricted to two spatial dimensions and flat structuring elements. We present TorchMorph, a lightweight PyTorch extension that closes this gap. TorchMorph exposes 22 public operators covering binary morphology, greyscale morphology, exact and approximate distance transforms, and entropy-regularised optimal transport, all implemented as fused CUDA kernels that operate directly on (B, C, Spatial...) CUDA tensors with up to eight spatial dimensions. The API deliberately mirrors scipy.ndimage argument-for-argument, including border modes, structuring-element origins and pre-allocated outputs, so that existing pipelines port with a change of import. We describe the layered architecture and the kernel designs behind each operator family. Against single-threaded CPU references, batched execution reaches up to 1.1e3 times the throughput of scipy.ndimage on greyscale morphology and up to 350x on exact Euclidean distance transforms, while the Sinkhorn solver runs up to 42x faster than POT. Binary and chamfer operators reproduce their SciPy counterparts exactly, and every float-valued operator agrees with the CPU reference to within 1.8e-6 absolute error. TorchMorph is released under the MIT licence at https://intcomp.github.io/tm.

📄 PDF Abstract BibTeX arXiv:2608.24738

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

t-SNE-CUDA: GPU-Accelerated t-SNE and its Applications to Modern Data

2018-07-31 · David M. Chan, Roshan Rao, Forrest Huang, John F. Canny

Modern datasets and models are notoriously difficult to explore and analyze due to their inherent high dimensionality and massive numbers of samples. Existing visualization methods which employ dimensionality reduction t…

Dimensionality ReductionGPU

CA-AC-MPC: CUDA-Accelerated Actor-Critic Model Predictive Control

2026-05-27 · Antoonio Buo, Vittorio Cammarota, Michele Avagnale, Pierluigi Arpenti 외 arxiv

In the literature, actor-critic model predictive control (AC-MPC) integrates MPC with reinforcement learning to enable high-performance control of complex dynamical systems. However, its differentiable MPC layer requires…

Reinforcement Learning

Fast ground penetrating radar dual-parameter full waveform inversion method accelerated by hybrid compilation of CUDA kernel function and PyTorch

2025-06-25 · Lei Liu, Chao Song, Liangsheng He, Silin Wang 외

This study proposes a high-performance dual-parameter full waveform inversion framework (FWI) for ground-penetrating radar (GPR), accelerated through the hybrid compilation of CUDA kernel functions and PyTorch. The metho…

Computational EfficiencyGPRGPU

GPU Parallelization Strategies for Forward and Backward Propagation in Shallow Neural Networks: A CUDA-Based Comparative Study

2026-06-29 · Rania Zitouni, Nadine Bousdjira, Sarah Hasnaoui, Amel Sadoun 외 arxiv

We present a comparative study of CUDA optimization strategies applied to forward and backward propagation in a shallow neural network. Three stacked optimizations are evaluated: (1) tiled shared memory with bank-conflic…

Model2Kernel: Model-Aware Symbolic Execution For Safe CUDA Kernels

2026-03-06 · Mengting He, Shihao Xia, Haomin Jia, Wenfei Wu 외 arxiv

The widespread adoption of large language models (LLMs) has made GPU-accelerated inference a critical part of modern computing infrastructure. Production inference systems rely on CUDA kernels to implement core transform…