mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-20 19:12:24 +00:00
Some math ops have very bad numerical stability and essential randomness (e.g., exp/log with reduction on large elements). To maintain the same test coverage with lower CI failing rate, we can gradually replace flaky tests' RTG with the ones implemented in this PR --- try Discrete first. If still unstable, use Circular. Overall recommended strategy to handle flaky test - Find if it uses `Uniform` in `onnxruntime/test/common/tensor_op_test_utils.h`. If yes, replace `Uniform` with `Discrete` implemented in this PR. For `candidate_values`, we can try `[-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2]`, `[-2, -1, 0, 1, 2]`, `[-1, 0, 1]`, and `[0, 1]` and choose the most difficult one among those passing 100 runs. - If `Discrete` fails to meet the stability requirement, switch to `Circular` and repeat the `candidate_values` selection process. Let's keep an eye on the two bugs mentioned in https://github.com/microsoft/onnxruntime/pull/15515. If the related unit tests fail again, we can replace the underlying `RandomValueGenerator::Uniform` with `FixedPatternValueGenerator::Descrete` or `FixedPatternValueGenerator::Circular` implemented in this PR. |
||
|---|---|---|
| .. | ||
| logging | ||
| cuda_op_test_utils.h | ||
| denormal_test.cc | ||
| dnnl_op_test_utils.cc | ||
| dnnl_op_test_utils.h | ||
| narrow_test.cc | ||
| path_test.cc | ||
| quantization_test_utils.h | ||
| random_generator_test.cc | ||
| span_utils_test.cc | ||
| string_utils_test.cc | ||
| tensor_op_test_utils.cc | ||
| tensor_op_test_utils.h | ||
| utf8_util_test.cc | ||