MCPcopy Create free account

hub / github.com/LMCache/LMCache / functions

Functions13,371 in github.com/LMCache/LMCache

↓ 6 callersFunction_lookup_bitmap
Run a lookup-and-lock for ``keys`` and return its result bitmap.
tests/v1/distributed/test_fault_inject_l2_adapter.py:103
↓ 6 callersFunction_make_adapter
Build a FaultInjectL2Adapter wrapping a fresh MockL2Adapter. Returns the ``(wrapper, inner)`` pair.
tests/v1/distributed/test_fault_inject_l2_adapter.py:79
↓ 6 callersFunction_make_app
(configs)
tests/v1/multiprocess/http_apis/test_conf_api.py:40
↓ 6 callersFunction_make_block_shape_desc
Create a page-buffer shape descriptor for block-transfer tests.
tests/v1/test_musa_native.py:28
↓ 6 callersMethod_make_byte_buffer
Construct a flat uint8 TensorMemoryObj of capacity ``n_bytes`` directly (no allocator), suitable for set_used_size mechanics tests whe
tests/v1/test_memory_management.py:977
↓ 6 callersFunction_make_components
()
tests/v1/mp_coordinator/test_resync_manager.py:19
↓ 6 callersMethod_make_config
(self, **overrides)
tests/cli/commands/bench/engine_bench/test_config.py:50
↓ 6 callersMethod_make_controller_config
Create a config with controller enabled and all required fields set. Override specific fields to None to test individual validation checks.
tests/v1/test_config.py:829
↓ 6 callersMethod_make_events
Build minimal event dicts from (chunk_hashes, seq_len) pairs.
tests/tools/test_cache_simulator.py:246
↓ 6 callersFunction_make_key
(i: int)
tests/cli/commands/trace/test_driver.py:73
↓ 6 callersFunction_make_key
Create a single CacheEngineKey for testing.
tests/v1/test_nixl_batched_contains.py:32
↓ 6 callersFunction_make_kv_caches
Build per-layer NHD KV tensors for non-CUDA data transfer tests.
tests/v1/multiprocess/test_engine_driven_transfer.py:78
↓ 6 callersFunction_make_layout
()
tests/cli/commands/trace/test_driver.py:81
↓ 6 callersFunction_make_metadata
Create test metadata with a configurable local_worker_id.
tests/disagg/test_nixl_storage_backend.py:150
↓ 6 callersFunction_make_metadata
Minimal metadata accepted by ``CreateGPUConnector``.
tests/v1/test_musa_support.py:40
↓ 6 callersFunction_make_metadata
Create metadata for a synthetic vLLM MUSA KV cache.
tests/v1/test_musa_connector.py:50
↓ 6 callersFunction_make_mock_engine
Create a mock engine with the attributes needed by _process_tokens_internal. Args: process_tokens_results: list of (start, end, key)
tests/v1/test_cache_engine.py:1678
↓ 6 callersFunction_make_mock_result
(request_id: str = "req_0")
tests/cli/commands/bench/engine_bench/workloads/test_base_workload.py:43
↓ 6 callersFunction_make_obj_config
Create a minimal OBJ-backend config for endpoint-list tests.
tests/disagg/test_nixl_storage_backend.py:132
↓ 6 callersFunction_make_presence
Build a group-major presence bitmap. Args: num_chunks: chunks per group. present_per_group: present_per_group[g] is the list of c
tests/v1/distributed/test_bitmap_ops.py:24
↓ 6 callersFunction_make_ranked
Build a group-major / chunk-major / rank-minor presence bitmap. present_per_group[g] is the list of ``(chunk, rank)`` present for group g.
tests/v1/distributed/test_bitmap_ops.py:166
↓ 6 callersFunction_match_key
(m: CBMatchResult)
tests/v1/multiprocess/test_optimized_lookup_v3.py:302
↓ 6 callersFunction_object_key
Build an ObjectKey from a chunk id (test fixture).
tests/v1/distributed/test_fault_inject_l2_adapter.py:39
↓ 6 callersFunction_object_key_to_bucket_path
Return the HFBucket object path for an MP object key.
lmcache/v1/distributed/l2_adapters/hfbucket_l2_adapter.py:97
↓ 6 callersFunction_object_key_to_filename
Derive a deterministic file name from an ObjectKey. Replaces ``/`` in model names with ``--`` to avoid creating subdirectories (e.g. ``meta-l
lmcache/v1/distributed/l2_adapters/nixl_store_dynamic_l2_adapter.py:67
↓ 6 callersFunction_patch_device
Pretend the current accelerator is ``device_type`` in the factory.
tests/v1/test_musa_support.py:80
↓ 6 callersMethod_poll_cycle
Run one discovery cycle: poll the coordinator and reconcile adapters. Returns: A summary of the cycle's resulting state and adapt
lmcache/v1/multiprocess/modules/p2p_controller.py:356
↓ 6 callersMethod_push_completion
( self, fid: int, ok: bool, error: str, result_bools: list[bool] | None )
tests/v1/distributed/test_native_connector_l2_adapter.py:146
↓ 6 callersFunction_read_counters_by_attrs
Snapshot counter values keyed by (metric_name, sorted-attrs-tuple).
tests/v1/mp_observability/subscribers/metrics/test_lookup.py:55
↓ 6 callersFunction_record_sequence
Record whatever ``script(sm)`` does into *trace_path*. ``script`` receives a live StorageManager and should call traced methods on it. This
tests/cli/commands/trace/test_driver.py:111
↓ 6 callersMethod_register_future_async
(self, op: str, future_id: int)
lmcache/v1/storage_backend/resp_client.py:131
↓ 6 callersMethod_register_future_sync
( self, op: str, future_id: int )
lmcache/v1/storage_backend/resp_client.py:136
↓ 6 callersMethod_resolve_for_transfer
Return (entry, strategy) for a transfer, refreshing last_seen. Pair-atomicity guarantees the entry exists whenever the strategy does.
lmcache/v1/multiprocess/modules/engine_driven_transfer.py:234
↓ 6 callersMethod_root_span
Return the finished cb.request root span for *sid*, or None.
tests/v1/mp_observability/subscribers/tracing/test_cb_server.py:604
↓ 6 callersMethod_run
( self, num_chunks, num_ranks, group_windows, present_cells, expected_hit=None )
tests/v1/distributed/test_bitmap_ops.py:452
↓ 6 callersFunction_run_async
Submit a coroutine to a running event loop and wait for result.
tests/v1/storage_backend/test_maru_backend.py:193
↓ 6 callersMethod_run_roundtrip
Helper: full store -> clear -> prefetch -> verify -> cleanup. Crashes here indicate OOB in serialize or deserialize.
tests/v1/distributed/serde/test_serde_e2e.py:462
↓ 6 callersFunction_start_server
Start a local HTTP server and return ``(server, port)``.
tests/cli/test_ping.py:44
↓ 6 callersFunction_store_all
Store one memory object per key and drain the completion event.
tests/v1/distributed/test_fault_inject_l2_adapter.py:95
↓ 6 callersMethod_try_to_read_metadata
(self, key: CacheEngineKey)
lmcache/v1/storage_backend/gds_backend.py:497
↓ 6 callersFunction_unlink_file_descs
Best-effort unlink of every desc whose ``path`` is set. Called only on FILE-write failure paths to remove the (empty or partially-writte
lmcache/v1/storage_backend/nixl_storage_backend.py:399
↓ 6 callersFunction_zero_kvcaches
Zero out all tensors in the kvcaches structure.
tests/v1/test_xpu_sglang_connector.py:64
↓ 6 callersMethodaclose
(self)
examples/disagg_prefill_mp/disagg_proxy_server.py:132
↓ 6 callersMethodadd_batch_with_hashes_and_check
Add multiple sets of hash positions and return count of new items. Args: positions_list: List of lists, where each inner list con
lmcache/v1/utils/bloom_filter.py:57
↓ 6 callersFunctionadd_storage_manager_args
Add storage manager configuration arguments to an existing parser. This function allows other modules to integrate storage manager arguments
lmcache/v1/distributed/config.py:334
↓ 6 callersFunctionargValue
argValue returns the value following the first occurrence of flag in args, or "" if flag is not present or has no value. Args are flat ["--flag", "val
operator/test/e2e/smoke_helpers_test.go:221
↓ 6 callersFunctionargsFlagValue
argsFlagValue returns the value bound to flag in args (two-token or single-token form), or "" if the flag is absent.
operator/internal/webhook/pod_injector_test.go:551
↓ 6 callersFunctionassert_equivalent
Optimal's three buckets cover the V3 list with no overlap and same classes.
tests/v1/multiprocess/test_optimized_lookup_v3.py:306
↓ 6 callersMethodbatched_allocate
Batched allocate `batch_size` memory objects of shape and dtype evict if necessary. Storage manager should always call local_
lmcache/v1/storage_backend/local_cpu_backend.py:717
↓ 6 callersFunctionbitmap_to_bools
(bitmap: Bitmap, size: int)
tests/v1/distributed/test_dax_l2_adapter.py:178
↓ 6 callersFunctionbucket_path_for_key
(key: ObjectKey)
tests/v1/distributed/test_hfbucket_l2_adapter.py:158
↓ 6 callersFunctionbuild_argv
Build argv for ``app.main()`` from the aggregated MP config. Extracted as a pure function so it can be unit-tested without actually launching
lmcache/lmcache_frontend/lmcache_mp_plugin/lmcache_mp_frontend_plugin.py:103
↓ 6 callersFunctionbuild_default_dispatcher
Return a :class:`CallDispatcher` populated with v1 handlers. Covers every qualname the storage-level recorder emits: * ``StorageManager.rese
lmcache/cli/commands/trace/_dispatch.py:214
↓ 6 callersFunctionbuild_trim_mask
Subset of ``found`` to keep (load + read-lock + report); the rest is released. PREFIX trims at the first gap (leading contiguous run). The no
lmcache/v1/distributed/storage_controllers/prefetch_controller.py:66
↓ 6 callersFunctioncdiv
Ceiling division.
lmcache/utils.py:98
↓ 6 callersMethodclear
Execute a clear cache operation with error handling.
lmcache/v1/cache_controller/executor.py:61
↓ 6 callersMethodclose
(self)
lmcache/v1/memory_management.py:2539
↓ 6 callersMethodclose
(self)
lmcache/v1/memory_management.py:2993
↓ 6 callersMethodclose
Close the transfer channel, releasing any pending tasks and the remote handle. Note: This function does not send any not
lmcache/v1/distributed/transfer_channel/impl/nixl_impl.py:192
↓ 6 callersMethodclose
(self)
lmcache/v1/storage_backend/local_cpu_backend.py:941
↓ 6 callersMethodclose
(self)
lmcache/v1/storage_backend/connector/hf3fs_connector.py:393
↓ 6 callersFunctioncompute_kv_bytes_per_chunk
Compute the number of KV-cache bytes that one chunk occupies. The value is derived from the ``shapes`` and ``dtypes`` fields of a single
lmcache/tools/cache_simulator/simulator.py:70
↓ 6 callersMethodcontains
(self, key: str)
tests/v1/distributed/test_s3_l2_adapter.py:75
↓ 6 callersMethodcontains
Return whether encoder cache exists for the given multimodal hash.
lmcache/v1/ec_engine.py:125
↓ 6 callersMethodcontains
(self, key: CacheEngineKey, pin: bool = False)
lmcache/v1/storage_backend/plugins/rust_raw_block_backend.py:343
↓ 6 callersFunctionconvert_tokens_to_list
Convert tokens to a list. token_start and token_end delineate tokens to convert
lmcache/utils.py:302
↓ 6 callersFunctioncreate_app
Create and configure FastAPI application
lmcache/lmcache_frontend/app.py:910
↓ 6 callersFunctioncreate_cache_context
Create the appropriate cache context for *kv_caches*. The signature mirrors :class:`GPUCacheContext` so callers can forward their kwargs verb
lmcache/v1/platform/cache_context.py:158
↓ 6 callersFunctioncreate_cache_key
Create a cache key for testing.
tests/v1/multiprocess/test_mq.py:41
↓ 6 callersFunctioncreate_memory_obj
(size: int = 256, fill_value: float = 1.0)
tests/v1/distributed/test_resp_l2_adapter_integration.py:76
↓ 6 callersFunctioncreate_test_config
Create a test configuration for HF3fsConnector. Args: base_path: Base path for storage mount_point: 3FS mount point
tests/v1/storage_backend/test_hf3fs_connector.py:45
↓ 6 callersFunctioncreate_test_key
Create a test CacheEngineKey.
tests/v1/storage_backend/test_local_disk_backend.py:72
↓ 6 callersMethodcudaHostRegister
(self, ptr: int, size: int, flags: int)
tests/v1/distributed/test_devdax_l1_allocator.py:93
↓ 6 callersFunctiondecompress_slot_mapping
Decompress slot ranges back to a list of slot indices. Inverse operation of compress_slot_mapping. For example: [[1, 5], [9, 12]] -> [1, 2, 3
lmcache/utils.py:163
↓ 6 callersMethoddelete
Delete keys from raw-block L2 and notify listeners for removals.
lmcache/v1/distributed/l2_adapters/raw_block_l2_adapter.py:533
↓ 6 callersMethoddelete_l2_adapter
Blocking function to drain the L2 adapter gracefully at runtime. Thread-safe. Stops routing new stores/prefetches to the adapter, wai
lmcache/v1/distributed/storage_manager.py:847
↓ 6 callersMethoddelete_quota
Remove the quota entry for ``cache_salt``. Returns ``True`` if an entry was removed, ``False`` if the salt had no registration. After
lmcache/v1/distributed/quota_manager.py:53
↓ 6 callersFunctionderef
deref returns the value pointed to by s, or "" if s is nil.
operator/internal/webhook/pod_injector.go:391
↓ 6 callersMethodderegister_worker
Deregister a worker and clean up empty instances.
lmcache/v1/cache_controller/utils.py:428
↓ 6 callersMethoddeserialize
(self, src, dst)
tests/v1/distributed/serde/test_multi.py:389
↓ 6 callersMethodelapsed_time
Return elapsed time in milliseconds between this event and *end_event*. Args: end_event: The ending event to measure against.
lmcache/v1/platform/cpu/stub_cpu_device.py:78
↓ 6 callersMethodexecute_workers
Execute a list of serialized messages on the given sockets. :param sockets: The list of sockets to send the messages to. :par
lmcache/v1/cache_controller/executor.py:442
↓ 6 callersFunctionformat_kvcache_shape_spec
Format layer groups back into a ``--kvcache-shape-spec`` string. This is the inverse of :func:`parse_kvcache_shape_spec`; the result is round
lmcache/v1/kv_layer_groups.py:771
↓ 6 callersMethodfrom_cli_args
Build state from parsed CLI arguments. Only sets values that the user explicitly provided (i.e., not the argparse default). This let
lmcache/cli/commands/bench/engine_bench/interactive/state.py:176
↓ 6 callersFunctionget_customized_decoder
(type: Any)
lmcache/v1/multiprocess/custom_types.py:461
↓ 6 callersFunctionget_customized_encoder
(type: Any)
lmcache/v1/multiprocess/custom_types.py:445
↓ 6 callersFunctionget_elements_per_layer
Return the number of elements per layer (both K and V for non-MLA).
lmcache/v1/gpu_connector/utils.py:307
↓ 6 callersFunctionget_engine_group_indices
Return the engine group index for each registered KV tensor. Args: groups: The LMCache KV groups, in protocol order. num_register
lmcache/v1/multiprocess/group_view.py:196
↓ 6 callersMethodget_final_stats
Compute and return final stats with percentiles. Should be called once after the benchmark completes.
lmcache/cli/commands/bench/engine_bench/stats.py:157
↓ 6 callersMethodget_finished
( self, finished_req_ids: set[str] )
lmcache/integration/vllm/vllm_v1_adapter.py:1329
↓ 6 callersMethodget_heap_size
Get the total size of the address space. Returns: The total size in bytes.
lmcache/v1/memory_management.py:1540
↓ 6 callersMethodget_l1_memory_desc
Return an L1MemoryDesc describing the underlying memory buffer. Returns: L1MemoryDesc: Pointer, size, and alignment of t
lmcache/v1/distributed/memory_manager/l1_memory_manager.py:202
↓ 6 callersMethodget_local_mem_indices
( self, objects: Union[list[bytes], list[MemoryObj]] )
lmcache/v1/transfer_channel/nixl_channel.py:367
↓ 6 callersMethodget_num_tracked_keys
Get the number of keys currently being tracked. Note: This method is NOT part of the EvictionPolicy interface.
lmcache/v1/distributed/eviction_policy/lru.py:206
↓ 6 callersMethodget_store_event_fd
(self)
examples/lmc_external_l2_adapter/src/lmc_external_l2_adapter/adapter.py:149
↓ 6 callersMethodget_subchunk_sw_size_tokens
Return the sub-chunk sliding window size of a given kernel group. The size is measured in the number of tokens. This is for the model
lmcache/v1/kv_layer_groups.py:487
↓ 6 callersFunctionget_tokens_per_layer
Return the number of tokens per layer (num_blocks * block_size).
lmcache/v1/gpu_connector/utils.py:300
↓ 6 callersMethodget_workload_items
Return phase-3 (workload-specific) items whose conditions are met.
lmcache/cli/commands/bench/engine_bench/interactive/state.py:130
↓ 6 callersFunctionget_zmq_socket_with_timeout
Create a ZeroMQ socket with timeout settings.
lmcache/v1/rpc_utils.py:48
↓ 6 callersMethodhas_key
Return ``True`` if ``key`` has a recorded size.
lmcache/v1/mp_coordinator/l2/usage_manager.py:27
← previousnext →1,001–1,100 of 13,371, ranked by callers