Skip to content

OP test accuracy requirements (English)

Tao Luo edited this page Dec 16, 2019 · 1 revision

OP Test Specification:The default accuracy values (atol, rtol, eps or max_relative_error) in op tests are not allowed to be modified.

Specification summary:

  • Section 1, Explanations Of This Specification
  • Section 2, This specification checks the default values ​​of the following parameters which cannot be modified in principle.
  • Section 3, CI Method
  • Section 4, Suggestions Of Check Failure

Supplementary note:

  1. You may find some aspects that are not taken into account in the existing specifications, which need to be continuously supplemented and improved during the implementation process. Please feel free to give your feedback.

1. Explanations Of This Specification

At present, there is a problem in OP single tests that thresholds of some parameters are enlarged to pass the tests, when checking the accuracy of forward and reverse gradient outputs. To ensure the quality of OPs, this specification is proposed and corresponding inspection methods are added in CI.

Requirement: After setting the default value of parameters in the outputs check functions, it is not allowed to modify the default values in each OP single test.

2. This specification checks the default values ​​of the following parameters which cannot be modified in principle.

  • Forward output check
    • Single test interface function check_outputcheck_output_with_place: parameter atol
  • Reverse gradient check
    • Single test interface function check_gradcheck_grad_with_place: parameter max_relative_error
    • Single test interface function grad_checkdouble_grad_check: parameters epsatolrtol

3. CI Method

  • In the addition/modification content of the OP single test files, as long as the above parameter keywords are scanned to modify the default values, CI will fail and report errors.

4. Suggestions for Check Failure

It is recommended to use the default value of the function. If there are special requirements, it needs to be reviewed by several specific people.

If you encounter other problems, please contact @GaoWei8

Clone this wiki locally