MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / add

Method add

deepspeed/runtime/sparse_tensor.py:55–58  ·  view source on GitHub ↗
(self, b)

Source from the content-addressed store, hash-verified

53 return index_size + value_size, dense_size
54
55 def add(self, b):
56 assert self.dense_size == b.dense_size
57 self.indices = torch.cat([self.indices, b.indices])
58 self.values = torch.cat([self.values, b.values])
59
60 def __str__(self):
61 sparse_size, dense_size = self.sparse_size()

Callers 15

test_csr_addition_selfFunction · 0.95
setup.pyFile · 0.45
_all_test_filesMethod · 0.45
_all_source_filesMethod · 0.45
add_dottedMethod · 0.45
add_bareMethod · 0.45
_reverse_graphMethod · 0.45
_impacted_filesMethod · 0.45
_dynamic_edge_testsMethod · 0.45
selectMethod · 0.45
_dangling_importersMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_csr_addition_selfFunction · 0.76
_all_test_filesMethod · 0.36
_all_source_filesMethod · 0.36
add_dottedMethod · 0.36
add_bareMethod · 0.36
_reverse_graphMethod · 0.36
_impacted_filesMethod · 0.36
_dynamic_edge_testsMethod · 0.36
selectMethod · 0.36
_dangling_importersMethod · 0.36