class_docstr: High-level wrapper for GPU embedding cache
docstr: Inserts key-value pairs into the GPU cache using the Least-Recently
  Used (LRU) algorithm to remove old key-value pairs if it is full.
  
  Parameters
  ----------
  keys: Tensor
      The keys to insert to the GPU cache.
  values: Tensor
      The values to insert to the GPU cache.
docstr_tok: ["Inserts","key-value","pairs","into","the","GPU","cache","using","the","Least-Recently","Used","(","LRU",")","algorithm","to","remove","old","key-value","pairs","if","it","is","full",".","Parameters","--","--","--","--","--","keys",":","Tensor","The","keys","to","insert","to","the","GPU","cache",".","values",":","Tensor","The","values","to","insert","to","the","GPU","cache","."]
code: def replace(self, keys, values):
      """Inserts key-value pairs into the GPU cache using the Least-Recently
      Used (LRU) algorithm to remove old key-value pairs if it is full.
  
      Parameters
      ----------
      keys: Tensor
          The keys to insert to the GPU cache.
      values: Tensor
          The values to insert to the GPU cache.
      """
      keys = F.astype(keys, self.idtype)
      values = F.astype(values, F.float32)
      _CAPI_DGLGpuCacheReplace(
          self._cache, F.to_dgl_nd(keys), F.to_dgl_nd(values)
      )
  
file_path: dgl/python/dgl/cuda/gpu_cache.py
imports: from ..None import backend
  from .._ffi.function import _init_api
label_desc: Use image node_id 3 for calling the GPUCache obj's underlying member method code with example usage: obj.replace(keys, values) without return types