mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-28 03:20:58 +00:00
Compatibility patch for nlohmann/json < 3.9.0. (#12394)
This is required on CentOS 7 if using distro-provided json-devel 3.6.1.
Regression introduced in:
- https://github.com/microsoft/onnxruntime/pull/11775
Related upstream commit:
-
74520d8bb0
Fixed https://github.com/microsoft/onnxruntime/issues/12393
This commit is contained in:
parent
7f374f4012
commit
3a9f30df46
1 changed files with 6 additions and 1 deletions
|
|
@ -75,7 +75,12 @@ static TestTolerances LoadTestTolerances(bool enable_cuda, bool enable_openvino)
|
|||
}
|
||||
const auto overrides_json = nlohmann::json::parse(
|
||||
overrides_ifstream,
|
||||
/*cb=*/nullptr, /*allow_exceptions=*/true, /*ignore_comments=*/true);
|
||||
/*cb=*/nullptr, /*allow_exceptions=*/true
|
||||
// Comment support is added in 3.9.0 with breaking change to default behavior.
|
||||
#if NLOHMANN_JSON_VERSION_MAJOR * 1000 + NLOHMANN_JSON_VERSION_MINOR >= 3009
|
||||
, /*ignore_comments=*/true
|
||||
#endif
|
||||
);
|
||||
overrides_json["atol_overrides"].get_to(absolute_overrides);
|
||||
overrides_json["rtol_overrides"].get_to(relative_overrides);
|
||||
return TestTolerances(
|
||||
|
|
|
|||
Loading…
Reference in a new issue