MCPcopy
hub / github.com/TencentARC/Pixal3D / get_spatial_cache

Method get_spatial_cache

pixal3d/modules/sparse/basic.py:784–792  ·  view source on GitHub ↗

Get a spatial cache.

(self, key=None)

Source from the content-addressed store, hash-verified

782 self._spatial_cache[scale_key][key] = value
783
784 def get_spatial_cache(self, key=None):
785 """
786 Get a spatial cache.
787 """
788 scale_key = str(self._scale)
789 cur_scale_cache = self._spatial_cache.get(scale_key, {})
790 if key is None:
791 return cur_scale_cache
792 return cur_scale_cache.get(key, None)
793
794 def __repr__(self) -> str:
795 return f"SparseTensor(shape={self.shape}, dtype={self.dtype}, device={self.device})"

Callers 15

layoutMethod · 0.95
spatial_shapeMethod · 0.95
seqlenMethod · 0.95
cum_seqlenMethod · 0.95
batch_boardcast_mapMethod · 0.95
forwardMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected