| 172 | } |
| 173 | |
| 174 | TEST(PersistentTableKeyValueStore, PersistentTableKeyValueStore) { |
| 175 | if (!HasCudaDevice()) { return; } |
| 176 | Singleton<ep::DeviceManagerRegistry>::New(); |
| 177 | PersistentTableKeyValueStoreOptions options{}; |
| 178 | uint32_t value_length = 128; |
| 179 | |
| 180 | std::string path = CreateTempDirectory(); |
| 181 | options.table_options.path = path; |
| 182 | options.table_options.value_size = value_length * sizeof(float); |
| 183 | options.table_options.key_size = GetSizeOfDataType(DataType::kUInt64); |
| 184 | options.table_options.physical_block_size = 512; |
| 185 | |
| 186 | std::unique_ptr<KeyValueStore> store = NewPersistentTableKeyValueStore(options); |
| 187 | store->ReserveQueryLength(128); |
| 188 | TestKeyValueStore(store.get(), 1024, 1024, value_length); |
| 189 | store.reset(); |
| 190 | PosixFile::RecursiveDelete(path); |
| 191 | Singleton<ep::DeviceManagerRegistry>::Delete(); |
| 192 | } |
| 193 | |
| 194 | TEST(CachedKeyValueStore, LRU) { |
| 195 | if (!HasCudaDevice()) { return; } |
nothing calls this directly
no test coverage detected