The matrix-free gather-batched-GEMM-scatter pattern eliminates global stiffness assembly for three-dimensional SIMP topology optimization, but the conventional three-stage implementation forces avoidable DRAM traffic between stages. We present a single fused CUDA kernel, implemented through CuPy's runtime compilation interface, that performs gather, per-element stiffness multiplication, and scatter accumulation in one pass. On a single RTX 4090 (24 GB), the fused path reaches a problem-size-dependent 4.6-7.3x end-to-end SIMP wall-time speedup across 216k-4.9M cantilever elements and 4.4x on the 499,125-element torsion benchmark. Against the same-precision FP32 three-stage baseline, the fused path still yields 2.3-4.6x on cantilever and 2.8x on torsion. Isolated CUDA-event cantilever-operator measurements reach 8.9-13.8x per matvec call, while separate instrumented board-power traces at 216k and 1M show 3.2-4.9x lower energy than matched FP64 runs. A separate bridge stress test shows the same FP32-versus-FP64 three-stage trend under one distributed-load case; direct fused-kernel bridge benchmarks are not reported. We also evaluate a BF16 WMMA variant: a separate PyTorch BF16 GEMM proxy on matching tensor shapes yields 14.3x, but direct condition-number estimates of 6.1e5-2.3e6 across 64k-512k uniform-density test states imply BF16 conditioning products of 2.4e3-9.1e3, far above the 256 threshold, observed alongside BF16 iterative-refinement stagnation at the two tested inner tolerances.
翻译:无矩阵的聚集-批量GEMM-散射模式消除了三维SIMP拓扑优化中的全局刚度组装,但传统三阶段实现导致阶段间不必要的DRAM流量。我们通过CuPy运行时编译接口实现了一个单一融合CUDA核,该核在一次遍历中同时执行聚集、单元刚度乘法以及散射累积。在单块RTX 4090(24 GB)上,融合路径在216k至4.9M悬臂梁元素上实现了4.6-7.3倍的问题规模相关端到端SIMP加速,在499,125元素扭转基准上实现了4.4倍加速。相较于相同精度的FP32三阶段基线,融合路径在悬臂梁上仍获得2.3-4.6倍加速,在扭转基准上获得2.8倍加速。独立的CUDA事件悬臂梁算子测量显示每次matvec调用加速达8.9-13.8倍,而216k和1M规模下独立仪器化板级功耗追踪显示其能耗比匹配FP64运行低3.2-4.9倍。另一项桥梁应力测试在单一分布载荷工况下显示出与FP32 vs FP64三阶段相同的趋势;未报告直接融合核桥梁基准测试结果。我们还评估了BF16 WMMA变体:在匹配张量形状上独立的PyTorch BF16 GEMM代理实现14.3倍加速,但64k-512k均匀密度测试状态下的直接条件数估计值(6.1e5-2.3e6)表明BF16条件乘积为2.4e3-9.1e3,远超256阈值,且在两次测试内部容差下观察到BF16迭代精化停滞现象。