Move TRT VectorTensorShapeHasher trt_lru_cache.h to convert/utils.h
This commit is contained in:
parent
2cf2298880
commit
549999490d
@ -51,6 +51,14 @@ Status TrtPrecisionModeToName(TrtPrecisionMode mode, string* name);
|
||||
|
||||
Status TrtPrecisionModeFromName(const string& name, TrtPrecisionMode* mode);
|
||||
|
||||
// Define a hash function for vector<TensorShape> because it is used as the key
|
||||
// for the engine cache.
|
||||
struct VectorTensorShapeHasher {
|
||||
std::size_t operator()(const std::vector<TensorShape>& key) const {
|
||||
return std::hash<std::string>()(TensorShapeUtils::ShapeListString(key));
|
||||
}
|
||||
};
|
||||
|
||||
#if GOOGLE_CUDA && GOOGLE_TENSORRT
|
||||
|
||||
#define IS_TRT_VERSION_GE(major, minor, patch, build) \
|
||||
|
@ -114,13 +114,6 @@ class LRUCache {
|
||||
}
|
||||
};
|
||||
|
||||
// Define a hash function for vector<TensorShape> because it is used as the key
|
||||
// for the engine cache.
|
||||
struct VectorTensorShapeHasher {
|
||||
std::size_t operator()(const std::vector<TensorShape>& key) const {
|
||||
return std::hash<std::string>()(TensorShapeUtils::ShapeListString(key));
|
||||
}
|
||||
};
|
||||
|
||||
#if GOOGLE_CUDA
|
||||
#if GOOGLE_TENSORRT
|
||||
|
Loading…
x
Reference in New Issue
Block a user