MCPcopy
hub / github.com/tinygrad/tinygrad / write

Method write

tinygrad/runtime/ops_amd.py:508–510  ·  view source on GitHub ↗
(self, b:HCQBuffer, val:sint, b64:bool=False)

Source from the content-addressed store, hash-verified

506 return self
507
508 def write(self, b:HCQBuffer, val:sint, b64:bool=False):
509 self.q(self.sdma.SDMA_OP_WRITE, *data64_le(b.va_addr), 1 if b64 else 0, lo32(val), *([hi32(val)] if b64 else []))
510 return self
511
512 def bind(self, dev:AMDDevice):
513 if not getenv("AMD_SDMA_BIND", 0) or not dev.is_am(): return

Callers 1

_copyoutMethod · 0.45

Calls 4

qMethod · 0.95
data64_leFunction · 0.90
lo32Function · 0.90
hi32Function · 0.90

Tested by

no test coverage detected