[VPTO] Remediate CodeArts codecheck findings - #1414
Conversation
|
PTOAS/lib/PTO/Transforms/VPTOLLVMEmitter.cpp |
|
|
huge_method[PYTHON] the nbnc line of the method {div_i32_soft()} is 76, it is over 50 14 PTOAS/lib/SoftOps/div_int.py |
4687426 to
7e2ec3e
Compare
Consolidate the codecheck remediation series into a single change: - split the oversized VPTOLLVMEmitter into focused translation units - share and deduplicate helper fragments across emitters (cube memory config, ubuf/vector/copy lowering, sync config, scalar fragments) - simplify and split oversized matchAndRewrite bodies - remove dead patterns and unused duplicate helpers - fix dangling StringRef temporaries and drop overloaded-virtual suppressions while keeping lowering registrations intact - resolve the remaining duplicate-code findings: reuse the existing packShiftedFields helper for copy config packing, reuse the shared vector-2 float fragment helper for atomic element fragments, replace the duplicated width switch with a compact formatter, and factor the common gather call tail into a shared helper All findings in the exported codecheck list are cleared; the legacy VPTOCANN900LLVMEmitter* files are left untouched.
…lpers Address the PR review on the emitter split: - restore lowering for pto.copy_ubuf_to_ubuf / copy_cbuf_to_ubuf / copy_ubuf_to_cbuf (config packing, .v310 callee builders and conversion patterns) so modules reaching the beta1 emitter no longer hard-fail on the illegal-op list; add a vpto-llvm RUN line covering the cbuf/ubuf copies in cube_store_dma_copy.pto - delete the duplicate detail-scope PlannedDecl/LoweringState/ VPTOTypeConverter/getI64Constant/getI32Constant/parse*Immediate and mad-fragment helpers from the CANN900 internal header: the shared VPTOLLVMEmitter definitions are now the single source (the shared parseVcvtPartImmediate keeps the P0/P1 aliases the CANN900 path previously accepted) - include the remaining duplicate-code cleanups that were missing from the committed tree: reuse packShiftedFields for the legacy copy packing, share the vector-2 float fragment helper, and factor the common gather call tail
Shrink LowerLocalCopyOpPattern::matchAndRewrite below the 50-line limit flagged by the oversized-function codecheck: extract pointer validation / address-space retargeting into prepareLocalCopyPointers and callee+config selection into getLocalCopyCalleeAndConfig.
478b46c to
491f586
Compare
- Refresh the ptoas-vmi pyproject patch for the current requires-python floor. - Set legacy CMake policies before fetching cann-cmake and default the third-party directory into the writable CMake binary tree when unset.
7da5b23 to
4d40958
Compare
|
/run a5 |
|
已接收
页面会自动刷新,可以直接看当前阶段、排队情况和最近结果。 |
The mixed low-precision MAD cube lit case needs a real CANN toolchain for VPTO fatobj emission; hosted CI runners without ASCEND_HOME_PATH fail the run at pto.mad_raw legalization. Advertise a new 'ascend-toolchain' lit feature only when a CANN9 install is discoverable under ASCEND_HOME_PATH and mark the case REQUIRES it so it is reported UNSUPPORTED off-toolchain. Also drop the duplicated license tail in test/lit/lit.cfg.py.
A5 板测失败
失败用例
|
Summary
Validation
The changes are based on the latest official/main.