MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / TEST

Function TEST

oneflow/core/embedding/cache_test.cpp:214–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214TEST(Cache, FullCache) {
215 if (!HasCudaDevice()) { return; }
216
217 CacheOptions options{};
218 options.policy = CacheOptions::Policy::kFull;
219 const uint32_t line_size = 128;
220 options.value_size = 512;
221 options.capacity = 65536;
222 options.key_size = 8;
223 options.value_memory_kind = CacheOptions::MemoryKind::kDevice;
224 std::unique_ptr<Cache> cache(NewCache(options));
225 cache->ReserveQueryLength(65536);
226 TestCache(cache.get(), line_size);
227}
228
229TEST(Cache, LruCache) {
230 if (!HasCudaDevice()) { return; }

Callers

nothing calls this directly

Calls 4

NewCacheFunction · 0.85
TestCacheFunction · 0.85
HasCudaDeviceFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected