CtrlK
BlogDocsLog inGet started
Tessl Logo

write-tests

Guide for writing tests in the project

24

Quality

14%

Does it follow best practices?

Impact

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./.agents/skills/write-tests/SKILL.md
SKILL.md
Quality
Evals
Security

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:
ml python
pytest tests/cpu_checking/error_analysis/<test_directory>

Enssure the clang tool is installed and available:

source ~/.bashrc
conda activate tutorial_env
Repository
llnl/FPChecker
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.