onnxruntime/onnxruntime/test/common/tensor_op_test_utils.cc
edgchen1 2cb8cb816f
Disable or update flaky tests, improve test random seed accessibility. (#3495)
- Add output of test random seed
- Allow setting of test random seed with environment variable
- Disable / relax tolerance for flaky tests
2020-04-17 15:57:32 -07:00

16 lines
503 B
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "test/common/tensor_op_test_utils.h"
namespace onnxruntime {
namespace test {
RandomValueGenerator::RandomValueGenerator()
: random_seed_{GetTestRandomSeed()},
generator_{static_cast<decltype(generator_)::result_type>(random_seed_)},
output_trace_{__FILE__, __LINE__, "ORT test random seed: " + std::to_string(random_seed_)} {
}
} // namespace test
} // namespace onnxruntime