src/kernel.cu
AI 建议
Experiment 014
Completed Testing Agent8th-order Acoustic Simulation
Configuration
Backend
CUDA 13.1
Precision
FP32
Grid
951 × 501 × 510
Grid Spacing
10 m
Time Step
1 ms
Steps
1500
Execution
Agent
Testing Agent
GPU
NVIDIA L20 · 89%
Code
a83c12f
Started
14:02:14
End
14:02:27
Results
Total Runtime
12.84 s
Kernel Runtime
6.48 s
Kernel Step
4.32 ms
Memory
8.7 GB
Max Error
2.1e-3
Throughput
89.4 GB/s
Artifacts
Wavefield · t = 1.5 s
Completed Visualization Agentz-slice 255 · 8 阶声波快照
Metadata
Grid951×501×510
Time1.5 s
ColormapSeismic
Range−1.0 / +1.0
Grid Spacing10 m
Provenance
Generated ByVisualization Agent
ModelGemini
SkillWavefield Plot
Inputwavefield_001.npy
ExperimentExperiment 014
Codea83c12f
AI Analysis
波前呈椭圆近似理想;x 方向采样在远场略低于 Nyquist,建议网格加密或插值后再发布。
Benchmark L20
Completed Performance AgentNVIDIA L20 · 1500 Steps
| 配置 | ms/step | GB/s | 加速比 |
|---|---|---|---|
| 基线(全局读 ×24) | 5.82 | 39.1 | 1.00× |
| 共享内存 tile | 4.31 | 52.8 | 1.35× |
| 向量化 float4 | 3.64 | 62.5 | 1.60× |
| __launch_bounds__(128) | 3.12 | 72.9 | 1.87× |
| 常量内存 FD_W | 3.05 | 74.6 | 1.91× |
| CUDA Graph 捕获 | 2.94 | 77.4 | 1.98× |
Code Analysis · src/kernel.cu
Completed Code Analysis Agent由 Code Analysis Agent 以 GPT-5.6 分析 · 产出 analysis/findings.json
Overview
WARN2 Warnings · 1 Hotspot · src/kernel.cu · 33 行 · 8 阶声波 stencil · FP32
Structure
INFO单内核 stencil 设计,
__constant__ 权重 + __restrict__ 指针提示无别名。INFOleapfrog 时间步进在
L31 与 solver.cpp 的 swap 保持一致。Hotspots
HOT
kernel.cu:26 热点循环 · 8 阶模板每网格点 24 次全局读 · 建议共享内存 tile 削减访存。Risks
WARNPotential uncoalesced memory access ·
kernel.cu:26 · MediumWARNRegister pressure from 8th-order expansion ·
kernel.cu:25 · MediumCorrectness
OKhalo guard 与 8 阶模板索引范围一致;跳界处理正确。
Dependencies
DEP
kernel.cu ← solver.cpp · wavefields.h · __constant__ FD_WDEPLaunched from
solver.cpp:21 · run_experiment 内核启动
main
src/kernel.cu
Ln 26, Col 1UTF-8LFC++ / CUDA空格: 2