已开启
AIV Jetty source does not build against the CANN C API headers #46
KaranocaVe创建于  18 天前
KaranocaVe
KaranocaVe
18 天前 创建

AIV Jetty source does not build against the CANN C API headers

Symptom

At source commit 79de7e489db8db78f8fe3b616682099a888a204d, the AIV Jetty implementation includes c_api/utils/sys_var.h, while the installed CANN package provides c_api/sys_var/sys_var.h. After that include is corrected locally, the same file calls ReadGmBypassDCache and WriteGmBypassDCache; the C API declares ReadGmByPassDCache and WriteGmByPassDCache.

The public examples/simt_jetty build therefore stops before producing an executable. The failure is in the AIV Jetty header pulled by the public Jetty header, so it affects any translation unit that includes the Jetty API for the supported dav-3510 target.

Reproduction

From the asc-comm source tree, with CANN 9.2.0-beta.2 configured:

cmake -S examples/simt_jetty -B <build> -DCMAKE_ASC_ARCHITECTURES=dav-3510 -DHCOMM_CCE_RES_USAGE=ON
cmake --build <build> --parallel 2

The baseline build exits 2 at the first source use and reports:

fatal error: 'c_api/utils/sys_var.h' file not found

Changing only that include in a generated build copy exposes 12 further errors for the ReadGmBypassDCache/WriteGmBypassDCache spellings. Applying the 13-line correction in fix.patch makes the same build complete successfully (exit 0).

Expected and actual

  • Expected: examples/simt_jetty compiles for dav-3510 with the declared CANN C API headers.
  • Actual: the baseline build stops at the missing header; correcting that path alone exposes unresolved helper names. The complete correction builds successfully.

Root cause and boundary

The AIV Jetty implementation was committed with an SDK header path and helper names that do not match the C API shipped with the declared CANN toolchain. The correction is limited to the include path and the two helper spellings; no queue, WQE, or runtime behavior was changed.

Runtime scope

No device data-plane result is claimed; this case is established by the deterministic compiler failure and fixed-build comparison.

Validation

Fixed source

  • Repository: cann/asc-comm
  • Source commit: 79de7e489db8db78f8fe3b616682099a888a204d
  • Toolchain: CANN 9.2.0-beta.2, target dav-3510

Baseline build

Command:

source <cann>/set_env.sh
cmake -S examples/simt_jetty -B <build> -DCMAKE_ASC_ARCHITECTURES=dav-3510 -DHCOMM_CCE_RES_USAGE=ON
cmake --build <build> --parallel 2

Exit code: 2.

Key output:

fatal error: 'c_api/utils/sys_var.h' file not found

The installed include tree contains c_api/sys_var/sys_var.h and no c_api/utils/sys_var.h.

Isolated fix comparison

The generated staged AIV Jetty header was changed only for the 13 lines represented by fix.patch: one include path and the Bypass to ByPass spelling in the read/write helpers. Re-running the same build command completed with exit code 0 and produced the simt_jetty executable. The compiler emitted only existing internal-header pragma warnings.

Patch integrity

Against source commit 79de7e489db8db78f8fe3b616682099a888a204d, git apply --check --whitespace=error-all passed. The reverse apply check and git diff --check also passed; the patch changes only hcomm_aiv_urma_jetty.h.

Runtime boundary

The sample targets dav-3510 and requires at least two devices, so runtime execution was not attempted. The conclusion is limited to the reproducible source build failure and the successful isolated fixed-build comparison.

关联 PR: https://gitcode.com/cann/asc-comm/merge_requests/232

likedislike
KaranocaVeKaranocaVe
18 天前 关联了pull request:AIV Jetty build failure with CANN C API headers
KaranocaVeKaranocaVe
18 天前 修改了issue 的描述
KaranocaVeKaranocaVe
18 天前 修改了issue 的描述
KaranocaVe
KaranocaVe
16 天前 评论:

/assign

likedislike
CANN-robotCANN-robot成员
16 天前 将 KaranocaVe 设为负责人