diff --git a/examples/cmap-example/kvcache2.cpp b/examples/cmap-example/kvcache2.cpp deleted file mode 100644 index 5b1b541c9..000000000 --- a/examples/cmap-example/kvcache2.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* -A utility to represent the kv-cache occupancy graphically -Takes as parameters -- total cache size (-c) -- number of simultaneous accesses/slots (-np) -- a parameter related to the display context (max window width - data display requirements) -It then uses a trick borrowed from tqdm to display occupancy -TODO: Show contiguous space and block availability -*/ -#include -#include -#include -#include // for rand() - -// my custom function to display graphics of the kvcache status -static void show_kvcache(std::vector> used_blocks, int cache_size) { - - int max_length = 128; - int num_blocks = used_blocks.size(); - int slot_cache_size = cache_size / num_blocks; - bool cls_flag = true; - std::string slot_symbol1 = ""; - std::string slot_symbol2 = ""; - std::string slot_symbol3 = ""; - auto& p = used_blocks[0]; - llama_client_slot slot = p.second; - - return; // remove when not in debug mode - - if ((used_blocks.size() == 0) || (used_blocks[0].first == 0)) { - return; - } - - // Print visualization - // Always start at the top left of the window (H means 'move cursor to this position'; 2J = cls) - // Only clear the screen the first time round - if (cls_flag) { - printf("\033[2J"); - cls_flag = false; - } - printf("\033[1;0H\033[K**************************\n\033[KKVcache occupancy by slot:\n\033[K**************************\n"); - for(int i=0; i