arXiv論文メモ
新着一覧
physics.optics / physics.comp-ph · 査読状況未確認

単一GPUで大規模な光学設計を解く時間領域計算

TorchFDTD: GPU-accelerated finite-difference time-domain simulation with discrete adjoints and host-streamed execution for photonic inverse design

Hyoseok Park

この論文をやさしく読む

ひとことで言うと

光学素子の設計に必要な電磁波計算と勾配計算を、単一GPUでも大規模に行う仕組みを作った。

何に役立つ?

メモリに収まりにくい光学素子の逆設計で、計算速度とメモリ使用量の選択肢になる。

この研究の面白いところ

融合CUDAカーネルごとに転置カーネルを用意して随伴微分を実現し、必要に応じて状態をホストメモリへ流す。

どこまで分かった?

速度の倍率は要旨に記載されたGPU、CPU、試験場面での比較。ストリーミングはメモリを減らす一方、GPU内での計算より時間がかかる。

v1のアブストラクトに基づくAI解説。日本語訳とは別に、用途の解釈を含みます。

アブストラクトの日本語訳

勾配を使う光学素子の設計では、数百万のパラメータについて電磁波全体の応答の導関数が必要になる。しかし、単一GPUのワークステーションでは、時間領域の随伴法はGPUメモリの容量と、更新処理を融合したカーネルが自動微分と合わないことに制約される。本研究は、両方に対処するオープンソースの有限差分時間領域法(FDTD)パッケージTorchFDTDを示す。Yee格子、吸収境界、分散の更新をCUDAグラフに記録した融合CUDAカーネルとして実行する。各カーネルに更新式から導いた転置カーネルを組み合わせ、材料と形状の導関数を離散随伴法で求める。PyTorchは、対応する観測量から作った微分可能な目的関数へ、その計算を連結する。随伴計算に必要な順方向の状態はチェックポイントから再実行して復元し、損失のない周期問題では時間反転でも復元する。 問題がGPU内に収まらない場合、ストリーミングモードは領域を因果関係に沿った小区画ごとに進め、全体の状態とチェックポイントをホストメモリに置く。GPUへの割り当てを減らしながら、同じ離散化を保つ。解析解、Meep、FDTDX、厳密結合波の解法、自動微分、有限差分との比較で検証した。A100では8つの試験場面の順方向計算を、基になったPyTorch FDTDパッケージより9.0~17.1倍速く完了した。倍精度の計算は、ワークステーションCPU上のMeepより49~59倍速かった。RTX 3060で256の3乗および320の3乗の随伴計算をホストからストリーミングすると、GPU内に収める場合のそれぞれ3.1倍、2.7倍の時間を要するが、GPUメモリの最大割り当てを56%、65%減らした。5400万セルの柱状アレイレンズを角スペクトルの目的関数につなぐ例では、随伴法の導関数と中心差分との差は0.78%だった。これにより、数千万セルの素子の時間領域随伴計算を単一GPUワークステーションで行える。

v1の要旨から自動生成。本文の精読・人による確認は未実施。

初稿
2026-09-24(UTC)
最新改訂
2026-09-24 · v1
査読・掲載
査読状況未確認
arXivで読むPDF

更新履歴

取得できた版を表示。版の更新は査読済みを意味しません。過去版の本文差分は未解析です。

原文の要旨

Gradient-based photonic design needs full-wave derivatives with respect to millions of parameters, but on a single GPU workstation the time-domain adjoint is limited by device memory and by the incompatibility of fused update kernels with automatic differentiation. Here, we present TorchFDTD, an open-source finite-difference time-domain (FDTD) package that addresses both limits. Its Yee, absorber and dispersion updates execute as fused CUDA kernels captured in a CUDA graph, and every kernel is paired with a transpose kernel derived from its update, so material and geometry derivatives are obtained by a discrete adjoint that PyTorch chains with differentiable objectives built from the supported observations. The adjoint recovers forward states by checkpoint replay or, for lossless periodic problems, by time reversal. For problems that exceed the device, a streamed mode advances the domain one causal slab at a time and keeps the global state and the checkpoints in host memory, which lowers the device allocation while preserving the resident discretization. We validate the package against analytic solutions, against Meep, FDTDX and a rigorous coupled-wave solver, and against automatic differentiation and finite differences. On an A100 the fused path completes full forward solves of eight test scenes 9.0 to 17.1 times faster than the PyTorch FDTD package it extends, and its double-precision solves are 49 to 59 times faster than those of Meep on a workstation CPU. On an RTX 3060, host streaming of $256^3$ and $320^3$ adjoints costs 3.1 and 2.7 times the resident time and lowers the peak device allocation by 56% and 65%. A 54-million-cell pillar-array lens coupled to an angular-spectrum objective yields an adjoint derivative within 0.78% of a central difference. The time-domain adjoint of a device with tens of millions of cells thus becomes available on a single workstation GPU.

著者のコメント

26 pages, 13 figures. Code: https://github.com/hyoseokp/TorchFDTD

arXiv ID: 2609.30039 / 要約の誤りについて