| 36 | |
| 37 | template <typename Args, typename ValueType> |
| 38 | std::pair<bool, ValueType> MIOpenCache<Args, ValueType>::get(const Args& args) { |
| 39 | std::string key = args.to_miopen_algo_cache_key().to_string_binary(); |
| 40 | std::lock_guard<std::mutex> guard{m_mtx}; |
| 41 | auto search = m_cache.find(key); |
| 42 | bool find = search != m_cache.end(); |
| 43 | ValueType val = ValueType(); |
| 44 | if (find) { |
| 45 | val = search->second; |
| 46 | } |
| 47 | return std::make_pair(find, val); |
| 48 | } |
| 49 | |
| 50 | #define INST(_opr, _miopen_algo) \ |
| 51 | template class megdnn::rocm::convolution::MIOpenCache< \ |
no test coverage detected