PidStepResponseFeatures Benchmark Note【免费下载链接】mat-chem-sim-pred面向工业领域聚焦计算仿真、预测两大核心场景构建面向流程工业机理数据双轮驱动的领域计算层推动AI for Science在材料化学领域的深度应用。项目地址: https://gitcode.com/cann/mat-chem-sim-pred目标PidStepResponseFeatures是第二个新算子方向尝试用于对候选阶跃响应轨迹做批量后处理。它不做闭环递推只假设上游已有pv_candidates[B, C, N], sp[B, N]并输出features[B, C, 12]本机复现命令python -m pytest prediction/ProcessControl/PIDModelFit/pid_step_response_features/tests/test_pid_step_response_features.py -q python prediction/ProcessControl/PIDModelFit/pid_step_response_features/tests/benchmark_pid_step_response_features.py初步判断口径本机 benchmark 只用于筛方向loop_msPython loop reference模拟逐候选逐时间扫描。numpy_msNumPy vectorized reference表示该方向是否能被批量化。若numpy_ms仍明显偏高说明该方向需要谨慎上 Ascend C若批量化收益稳定再考虑 kernel 原型。本机结果4 passedBCNloop msnumpy msspeedup3216512258.6326.34940.73x643210242166.66341.85551.77x1286410248828.969211.42041.76x25664204834199.989657.37352.03x结论该方向值得继续做 Ascend C 原型。它没有闭环递推依赖计算结构主要是按(batch,candidate)扫描轨迹并融合峰值、误差积分、rise time 和 settling time适合作为上游 rollout 或仿真输出后的 device-side 特征提取。风险点当前 NumPy 版本会产生若干[B,C,N]临时数组Ascend C 版本应在单 kernel 内边扫边归约。rise_time和settling_time包含首次/末次条件判断kernel 中需要注意分支和精度口径。Ascend C 原型验证环境NPU 环境node202SOCAscend910B3CANN/usr/local/Ascend/ascend-toolkitdevice3CPU 对比线程数64构建命令source /usr/local/Ascend/ascend-toolkit/set_env.sh cd prediction/ProcessControl/PIDModelFit/pid_step_response_features cmake -S . -B build -DCMAKE_BUILD_TYPERelease -DSOC_VERSIONAscend910B3 cmake --build build -j 2构建结果libpid_step_response_features_kernel_lib.solibpid_step_response_features_host.sotest_aclnn_pid_step_response_featuresbenchmark_pid_step_response_featuresSmokePidStepResponseFeatures smoke initial0 final10 peak11 overshoot0.1 rise_time2 peak_time4 settling_time5 iae15 ise91 PASSEDBenchmark 命令./build/benchmark_pid_step_response_features 3 64 32 1024 5 64 ./build/benchmark_pid_step_response_features 3 128 64 1024 3 64结果B64 C32 N1024 cpu_64T_ms4.41643 npu_kernel_ms0.0547166 npu_resident_e2e_ms0.101893 kernel_speedup80.7146 resident_e2e_speedup43.3438 feature_max_abs0 feature_max_rel0 B128 C64 N1024 cpu_64T_ms6.87986 npu_kernel_ms0.0792977 npu_resident_e2e_ms0.164775 kernel_speedup86.7599 resident_e2e_speedup41.7531 feature_max_abs0 feature_max_rel0说明当前resident_e2e口径假设pv_candidates/sp已在 Device仅统计 kernel 和featuresD2H。冷启动口径尚未统计若输入来自 Host完整候选轨迹 H2D 会影响端到端收益。当前 Ascend C 原型没有物化 NumPy reference 中的中间数组直接在 kernel 内单次扫描完成 12 个特征。【免费下载链接】mat-chem-sim-pred面向工业领域聚焦计算仿真、预测两大核心场景构建面向流程工业机理数据双轮驱动的领域计算层推动AI for Science在材料化学领域的深度应用。项目地址: https://gitcode.com/cann/mat-chem-sim-pred创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考