MCPcopy
hub / github.com/tinygrad/tinygrad / reset

Method reset

extra/usbgpu/debug.py:60–70  ·  view source on GitHub ↗
(self, bootloader=False)

Source from the content-addressed store, hash-verified

58 print("Provisioning complete.")
59
60 def reset(self, bootloader=False):
61 if not self.provisioned:
62 raise RuntimeError("Device not provisioned for usbgpu debugging. Use --provision to provision it.")
63
64 self.ftdi.set_cbus_gpio(self.CBUS_RESET | (self.CBUS_BOOTLOADER if bootloader else 0))
65 time.sleep(0.5)
66 self.ftdi.set_cbus_gpio(self.CBUS_BOOTLOADER if bootloader else 0)
67 if bootloader:
68 time.sleep(1)
69 self.ftdi.set_cbus_gpio(0)
70 print("Device reset complete.")
71
72 def read(self) -> bytes:
73 return self.ftdi.read_data(256).decode('utf-8', errors='replace')

Callers 15

multitensor.pyFile · 0.45
eval_custom_matmulFunction · 0.45
test_matmulFunction · 0.45
test_matmulFunction · 0.45
amd_matmul.pyFile · 0.45
handleFunction · 0.45
_check_kernel_countMethod · 0.45
test_mnist_indexMethod · 0.45
example.pyFile · 0.45

Calls 1

sleepMethod · 0.45

Tested by 5

test_matmulFunction · 0.36
test_matmulFunction · 0.36
_check_kernel_countMethod · 0.36
test_mnist_indexMethod · 0.36
test_modelFunction · 0.36