MCPcopy Create free account
hub / github.com/evilsocket/cake / test_streaming_cache_clear

Function test_streaming_cache_clear

cake-core/src/models/vibevoice/vae_decoder.rs:614–624  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

612
613 #[test]
614 fn test_streaming_cache_clear() {
615 let mut cache = StreamingConvCache::new(3);
616 let t = Tensor::zeros(1, DType::F32, &Device::Cpu).unwrap();
617 cache.set(0, t.clone());
618 cache.set(1, t.clone());
619 cache.set(2, t);
620 cache.clear();
621 assert!(cache.get(0).is_none());
622 assert!(cache.get(1).is_none());
623 assert!(cache.get(2).is_none());
624 }
625
626 #[test]
627 fn test_streaming_cache_reset_counter() {

Callers

nothing calls this directly

Calls 3

setMethod · 0.80
cloneMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected