MCPcopy Create free account
hub / github.com/pytorch/pytorch / add

Method add

test/distributed/test_store.py:470–473  ·  view source on GitHub ↗
(self, key, value)

Source from the content-addressed store, hash-verified

468 return value
469
470 def add(self, key, value):
471 new = int(self.store.get(key, 0)) + value
472 self.set(key, bytes(str(new).encode("utf-8")))
473 return new
474
475 def compare_set(self, key, expected, newValue):
476 if type(expected) is not bytes:

Callers 8

fnMethod · 0.45
barrierMethod · 0.45
_test_set_get_checkMethod · 0.45
_test_simple_waitMethod · 0.45
_test_numkeys_delkeysMethod · 0.45
matmul_cat_colMethod · 0.45
inductor_funcMethod · 0.45
eager_funcMethod · 0.45

Calls 3

setMethod · 0.95
encodeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected