| 37 | MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_PROBLEM_CACHE) |
| 38 | |
| 39 | void problem_cache::load() |
| 40 | { |
| 41 | auto pc_path = string_value_of(MIGRAPHX_PROBLEM_CACHE{}); |
| 42 | if(pc_path.empty()) |
| 43 | return; |
| 44 | if(not fs::exists(pc_path)) |
| 45 | { |
| 46 | std::cout << "Problem cache not found. Creating new file.\n"; |
| 47 | save(); |
| 48 | return; |
| 49 | } |
| 50 | from_value(from_json_string(read_string(pc_path)), cache); |
| 51 | } |
| 52 | void problem_cache::save() const |
| 53 | { |
| 54 | auto pc_path = string_value_of(MIGRAPHX_PROBLEM_CACHE{}); |
no test coverage detected