news 2026/7/15 9:11:25

CANN/HCOMM HCCL测试框架

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
CANN/HCOMM HCCL测试框架

HCCL LLT

【免费下载链接】hcommHCOMM(Huawei Communication)是HCCL的通信基础库,提供通信域以及通信资源的管理能力。项目地址: https://gitcode.com/cann/hcomm

Overview

HCCL LLT (Low Level Test) is the test framework for HCCL, designed to systematically verify the functional completeness and performance stability of HCCL components at all levels. LLT covers multiple parts of HCCL including the algorithm layer, framework layer, platform layer, and external interface layer. Through comprehensive test cases, it ensures the reliability and efficiency of HCCL in various business scenarios.

Directory Structure

test/ ├── legacy # Historical version compatibility test framework │ ├── common # Common utilities │ ├── depends # Test dependencies on other component headers │ ├── st # ST integration test cases │ │ ├── algorithm # Communication algorithm test cases │ │ ├── fwk # Communication framework test cases │ │ ├── service # Service layer test cases │ │ └── test_case # Test cases │ └── ut # UT integration test cases │ ├── aicpu # AICPU-specific test cases │ ├── all_source_code # Source code file paths │ ├── common # Common utilities │ ├── framework # Communication framework test cases │ ├── service # Service layer test cases │ └── unified_platform # Unified platform layer test cases ├── st/algorithm # ST integration test cases (algorithm analyzer) │ ├── testcase # Test cases │ └── utils # Common utilities └── ut # UT unit test cases ├── aicpu_kfc # MC2-related tests ├── common # Common utilities ├── depends # Test dependencies on other component headers ├── device # Device tests ├── framework # Communication framework test cases ├── impl # Communication algorithm implementation test cases ├── inter # Interface adaptation layer test cases ├── misc # Miscellaneous test cases ├── platform # Communication platform implementation test cases └── stub # Test stub functions

Build and Run

Execute the following commands from the repository root directory:

# Build and run all unit test cases bash build.sh --ut # Build and run all integration test cases bash build.sh --st # Build and run individual test suite cases bash build.sh --open_hccl_test bash build.sh --executor_hccl_test bash build.sh --executor_reduce_hccl_test bash build.sh --executor_pipeline_hccl_test # Manually execute test cases ./build/test/st/algorithm/testcase/testcase/open_hccl_test ./build/test/st/algorithm/testcase/testcase/executor_hccl_test ./build/test/st/algorithm/testcase/testcase/executor_reduce_hccl_test ./build/test/st/algorithm/testcase/testcase/executor_pipeline_hccl_test

Executable Output Location

All executables are output to thebuild/testdirectory by default. The path can be adjusted by modifyingCMakeLists.txt:

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${HCCL_OPEN_CODE_ROOT}/build/test) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${HCCL_OPEN_CODE_ROOT}/build/test)

How to Write Test Cases

HCCL LLT test cases are implemented using the Google Test framework. For detailed writing guidelines, refer to the Google Test User Guide.

  1. Select the appropriate directory based on the test target, e.g.,test/algorithmortest/framework
  2. Create a new test class based on Google Test
  3. Update the corresponding directory'sCMakeLists.txtto add the test entry

Example test code:

#include "gtest/gtest.h" TEST(MyTestClass, MyTestCase) { // Implement assertion logic EXPECT_EQ(actual_value, expected_value); }

How to Run Specific Test Cases

To run specific test cases individually, refer to the Google Test User Guide and add the--gtest_filterparameter when executing the test.

Usinghccl_utest_framework_op_base_apias an example:

# Run only test cases of the HcclCommInitRootInfoTest test class ./build/test/hccl_utest_framework_op_base_api --gtest_filter=HcclCommInitRootInfoTest.*

【免费下载链接】hcommHCOMM(Huawei Communication)是HCCL的通信基础库,提供通信域以及通信资源的管理能力。项目地址: https://gitcode.com/cann/hcomm

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/7/15 9:10:46

影刀RPA 常见数据格式校验:身份证、手机号、邮箱、URL的验证套路

影刀RPA 常见数据格式校验:身份证、手机号、邮箱、URL的验证套路 数据采集完了不等于数据就是对的。用户填的表单数据、网页上采集的信息、API返回的字段——这些数据里混着大量格式错误的内容。如果不校验就写入数据库或发给下游系统,后果可能是整批数…

作者头像 李华
网站建设 2026/7/15 9:09:19

wastebin未来路线图:即将推出的功能与社区发展计划

wastebin未来路线图:即将推出的功能与社区发展计划 【免费下载链接】wastebin wastebin is a pastebin 📝 项目地址: https://gitcode.com/gh_mirrors/wa/wastebin wastebin 是一个基于Rust开发的轻量级代码片段分享工具,专注于提供简…

作者头像 李华
网站建设 2026/7/15 9:06:28

Kontigo招聘安全主管,薪资12万 - 22万美元,还提供签证赞助!

1. Y Combinator导航信息这里展示了Y Combinator的相关导航,有关于它的介绍、在Y Combinator会发生什么、申请入口、YC面试指南、常见问题解答、人员信息、YC博客等内容。同时还有公司相关信息,像初创公司目录、创始人目录、启动YC等,以及图书…

作者头像 李华
网站建设 2026/7/15 9:01:45

深入解析FPD-Link III SerDes:线速率计算、错误检测与多摄像头同步实战

1. 项目概述与核心价值 在汽车摄像头、工业视觉和安防监控这些领域,工程师们经常面临一个共同的挑战:如何把高清摄像头传感器产生的海量并行数据,稳定、可靠地传输到几米甚至十几米外的中央处理单元。传统的并行传输方案需要几十根线缆&#…

作者头像 李华
网站建设 2026/7/15 9:01:34

PSTAlertController实战:构建现代化iOS弹窗系统的10个最佳实践

PSTAlertController实战:构建现代化iOS弹窗系统的10个最佳实践 【免费下载链接】PSTAlertController API similar to UIAlertController, backwards compatible to iOS 7. Will use the new shiny API when you run iOS 8. 项目地址: https://gitcode.com/gh_mirr…

作者头像 李华