Skip to main content

write-tests

Guide for writing tests in the project

跳到安装

来源信息

仓库
llnl/FPChecker
最近来源活动
2026年4月3日 15:27
检测到的 SKILL.md 语言
英语
星标
44
分支
13

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
write-tests
description
Guide for writing tests in the project
To write new tests in the project follow theese: 1. For tests related to error tracking, add a directory in tests/cpu_checking/error_analysis/ with the name of the test. 2. Inside that directory, create a file named `main.cpp` and write your test cases using pytest. 3. As an example of tests, see: test_fp32_dot_product, test_fp32_average, test_fp32_nested_loop. 4. For now, only write tests in FP32 precision. 5. There must be a pytest file with the name of the directory and extesion .py, for example: test_fp32_dot_product.py. 6. To test if the tool works correctly, we write a program in FP32 precision and instrument the code. Then we run the same function in FP64 precision and compare the results. The test should fail if the results are different, and pass if they are similar. 7. To build the Mkefile, see the examples. 8. To run the tests, use the following command: ```bash ml python pytest tests/cpu_checking/error_analysis/<test_directory> ``` ## Enssure the clang tool is installed and available: ```bash source ~/.bashrc conda activate tutorial_env ```
在 GitHub 查看