MCPcopy Index your code
hub / github.com/tinygrad/tinygrad / write

Method write

test/mockgpu/usb.py:9–9  ·  view source on GitHub ↗
(self, address, data, ignore_cache=False)

Source from the content-addressed store, hash-verified

7 self.mem = mem
8 def read(self, address, size): return bytes(self.mem[address:address+size])
9 def write(self, address, data, ignore_cache=False): self.mem[address:address+len(data)] = data
10 def pcie_mem_req(self, address, value=None, size=1):
11 if value is None: return int.from_bytes(self.mem[address:address+size], "little")
12 else: self.mem[address:address+size] = value.to_bytes(size, "little")

Callers 15

test_tqdm_writeMethod · 0.45
run_genMethod · 0.45
test_permute_on_diskMethod · 0.45
test_diskMethod · 0.45
handleMethod · 0.45
test_bitcastMethod · 0.45
test_bitcast_viewMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_tqdm_writeMethod · 0.36
run_genMethod · 0.36
test_permute_on_diskMethod · 0.36
test_diskMethod · 0.36
handleMethod · 0.36
test_bitcastMethod · 0.36
test_bitcast_viewMethod · 0.36