Skip to content

Performance Benchmark

생성일: 2026-06-11. 로컬 CPU/GPU timing run에서 생성.

이 리포트는 개발자가 자주 실행하는 code path의 가벼운 성능 기준선을 공개한다: material lookup, PixelStack geometry 생성, TMM sweep, 저차 torcwa RCWA sweep.

요약

  • 전체 material 41-wavelength lookup median: 19.7626 ms.
  • PixelStack construction median: 2x2 102.5448 ms, 4x4 105.3031 ms.
  • TMM 31-wavelength sweep median: 0.019 s; fitted cost 0.5786 ms/wavelength.
  • torcwa CPU 5-wavelength low-order sweep median: 2.8404 s; fitted cost 604.8363 ms/wavelength.
  • 이 환경에서는 CUDA를 사용할 수 없어 GPU row는 not available로 기록했다.

Scope

이 값은 로컬 timing 숫자이며 모든 환경의 성능 보장이 아니다. RCWA case는 low-order smoke benchmark이고, traced memory는 PyTorch/CUDA allocator 내부 같은 일부 native allocation을 제외할 수 있다.

Environment

FieldValue
PlatformWindows-11-10.0.26200-SP0
Python3.12.12
MachineAMD64
ProcessorIntel64 Family 6 Model 151 Stepping 5, GenuineIntel
CPU count12
Torch2.11.0+cpu
CUDA availableno
CUDA devices0
CUDA device namen/a
torcwa availableyes
torcwa version0.1.4.2

Core CPU Operations

Core operation runtime

CategoryBenchmarkSizeRepeatsMedian msMin msMax msPeak MB
materialSilicon epsilon spectrum lookupsilicon x 41 wl50.51140.37460.63810.0022
materialAll-material spectrum lookup43 materials x 41 wl519.762618.764225.92810.0036
constructionPixelStack construction2x2 Bayer5102.544888.6468119.93510.188
constructionPixelStack construction4x4 TetraCell5105.303199.3698119.52640.1883
layer_slicesget_layer_slices32x32, 8 lens slices54.20252.72815.00910.4285
layer_slicesget_layer_slices64x64, 8 lens slices54.6463.33896.57381.6473
layer_slicesget_layer_slices128x128, 8 lens slices56.39955.376114.79346.5223
layer_slicesget_layer_slices192x192, 8 lens slices514.933813.858716.356414.6473
permittivity_gridget_permittivity_grid32x32x6448.25137.39689.7461.7842
permittivity_gridget_permittivity_grid64x64x6449.92169.711910.87557.0342
permittivity_gridget_permittivity_grid96x96x64415.807213.761916.970915.7842
permittivity_gridget_permittivity_grid128x128x64427.159323.09629.896228.0342

Geometry Scaling

Geometry scaling

Memory profile

Solver Sweep Cost

Solver wavelength scaling

SolverDeviceWavelengthsStatusRepeatsMedian sms / wlwl / smax energy residualtraced MBGPU MB
tmmcpu1ok30.00111.0969911.660300.0107n/a
tmmcpu11ok30.00770.69981428.97971.11e-160.0118n/a
tmmcpu31ok30.0190.61371629.36641.11e-160.0131n/a
tmmcpu61ok30.03210.52681898.28911.11e-160.0152n/a
tmmcpu101ok30.06070.60081664.42821.11e-160.0196n/a
torcwacpu1ok30.6147614.70731.626801.538n/a
torcwacpu3ok31.7693589.75221.695602.8789n/a
torcwacpu5ok32.8404568.08261.760302.8898n/a
torcwacpu9ok35.4565606.28211.649402.9098n/a
torcwacudan/anot_available0n/an/an/an/an/an/a

Interpretation

  • TMM은 stack screening과 wavelength가 많은 BARL sweep의 빠른 경로다.
  • 저차 torcwa CPU runtime은 wavelength count에 거의 선형으로 증가하므로, 큰 리포트는 wavelength 수를 먼저 예산화하고 그 다음 Fourier order를 조정한다.
  • 테스트한 해상도에서 geometry generation은 반복 리포트 생성에 충분히 가볍지만, 3D permittivity grid가 traced memory를 지배한다.
  • GPU row는 조건부다. CUDA가 없는 장비도 완전한 CPU 리포트를 생성한다.

Regeneration

powershell
uv run python scripts\generate_performance_benchmark_report.py

생성된 metric은 docs/public/reports/performance-benchmark/performance_benchmark_metrics.json에 저장된다.