| 1000 | } |
| 1001 | |
| 1002 | inline int32_t getMaxPersistentCacheSize() |
| 1003 | { |
| 1004 | int32_t deviceIndex{}; |
| 1005 | CHECK(cudaGetDevice(&deviceIndex)); |
| 1006 | |
| 1007 | int32_t maxPersistentL2CacheSize; |
| 1008 | #if CUDART_VERSION >= 11030 |
| 1009 | CHECK(cudaDeviceGetAttribute(&maxPersistentL2CacheSize, cudaDevAttrMaxPersistingL2CacheSize, deviceIndex)); |
| 1010 | #else |
| 1011 | maxPersistentL2CacheSize = 0; |
| 1012 | #endif |
| 1013 | |
| 1014 | return maxPersistentL2CacheSize; |
| 1015 | } |
| 1016 | |
| 1017 | inline bool isDataTypeSupported(nvinfer1::DataType dataType) |
| 1018 | { |