mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-25 22:26:24 +00:00
fix the allocator type in lru of cuda conv algorithm cache. (#848)
This commit is contained in:
parent
41dc3130f5
commit
9fb7e98c0b
1 changed files with 2 additions and 2 deletions
|
|
@ -44,7 +44,6 @@ struct vector_hash {
|
|||
template <typename Key, typename T,
|
||||
typename Hash = std::hash<Key>,
|
||||
typename KeyEqual = std::equal_to<Key>,
|
||||
typename Allocator = std::allocator<std::pair<const Key, T>>,
|
||||
typename ListAllocator = std::allocator<Key>>
|
||||
class lru_unordered_map {
|
||||
public:
|
||||
|
|
@ -96,13 +95,14 @@ private:
|
|||
T value;
|
||||
iterator_type lru_iterator;
|
||||
};
|
||||
using MapAllocator = std::allocator<std::pair<const Key, value_type>>;
|
||||
|
||||
void move_to_front(iterator_type it) {
|
||||
lru_list_.splice(lru_list_.begin(), lru_list_, it);
|
||||
}
|
||||
|
||||
size_t max_size_;
|
||||
std::unordered_map<Key, value_type, Hash, KeyEqual, Allocator> items_;
|
||||
std::unordered_map<Key, value_type, Hash, KeyEqual, MapAllocator> items_;
|
||||
list_type lru_list_;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue