PidWindowedResidualDiagnostics API Reference【免费下载链接】mat-chem-sim-pred面向工业领域聚焦计算仿真、预测两大核心场景构建面向流程工业机理数据双轮驱动的领域计算层推动AI for Science在材料化学领域的深度应用。项目地址: https://gitcode.com/cann/mat-chem-sim-predC APIextern C int32_t aclnnPidWindowedResidualDiagnostics( void* actual, void* predicted, void* metrics, void* autocorr, int64_t batch, int64_t sample_count, int64_t window_size, int64_t stride, int64_t max_lag, void* workspace, uint64_t workspace_size, void* stream); extern C uint64_t aclnnPidWindowedResidualDiagnosticsGetWorkspaceSize( int64_t batch, int64_t sample_count, int64_t window_size, int64_t stride, int64_t max_lag); extern C int64_t aclnnPidWindowedResidualDiagnosticsGetWindowCount( int64_t sample_count, int64_t window_size, int64_t stride);InputsNameTypeShapeDescriptionactualfloat32[batch, sample_count]Measured process output.predictedfloat32[batch, sample_count]Model-predicted process output.OutputsNameTypeShapeDescriptionmetricsfloat32[batch, window_count, 8]Window-level residual diagnostics.autocorrfloat32[batch, window_count, max_lag]Residual autocorrelation for lag1..max_lag.The metric order is:0 mean_residual 1 std_residual 2 mae 3 rmse 4 max_abs_residual 5 fit_percent 6 durbin_watson 7 ljung_box_qParametersNameConstraintbatch 0sample_count 1window_size 1and sample_countstride 0max_lag 0and window_sizewindow_count1 (sample_count - window_size) / strideWorkspaceCallaclnnPidWindowedResidualDiagnosticsGetWorkspaceSize(...)first and allocate a device workspace of at least that size. The current prototype only stores tiling metadata in workspace.Return ValueACL_SUCCESS: launch accepted.ACL_ERROR_INVALID_PARAM: null pointer, invalid shape, invalid workspace, or invalid stream.The call launches asynchronously onstream; callaclrtSynchronizeStream(stream)before reading outputs.Exampleconst int64_t window_count aclnnPidWindowedResidualDiagnosticsGetWindowCount(sample_count, window_size, stride); const uint64_t workspace_size aclnnPidWindowedResidualDiagnosticsGetWorkspaceSize( batch, sample_count, window_size, stride, max_lag); aclnnPidWindowedResidualDiagnostics( d_actual, d_predicted, d_metrics, d_autocorr, batch, sample_count, window_size, stride, max_lag, workspace, workspace_size, stream);Build And Runcd prediction/ProcessControl/PIDModelFit/pid_windowed_residual_diagnostics cmake -S . -B build -DCMAKE_BUILD_TYPERelease -DSOC_VERSIONAscend910B3 cmake --build build -j 2 ./build/test_aclnn_pid_windowed_residual_diagnostics 0 ./build/benchmark_pid_windowed_residual_diagnostics 0 128 4096 512 256 32 5 64【免费下载链接】mat-chem-sim-pred面向工业领域聚焦计算仿真、预测两大核心场景构建面向流程工业机理数据双轮驱动的领域计算层推动AI for Science在材料化学领域的深度应用。项目地址: https://gitcode.com/cann/mat-chem-sim-pred创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考