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

Method cum_seqlen

pixal3d/modules/sparse/basic.py:551–559  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

549
550 @property
551 def cum_seqlen(self) -> torch.LongTensor:
552 cum_seqlen = self.get_spatial_cache('cum_seqlen')
553 if cum_seqlen is None:
554 cum_seqlen = torch.cat([
555 torch.tensor([0], dtype=torch.long, device=self.device),
556 self.seqlen.cumsum(dim=0)
557 ], dim=0)
558 self.register_spatial_cache('cum_seqlen', cum_seqlen)
559 return cum_seqlen
560
561 @property
562 def batch_boardcast_map(self) -> torch.LongTensor:

Callers

nothing calls this directly

Calls 2

get_spatial_cacheMethod · 0.95

Tested by

no test coverage detected