From cfa5c1cac6da42e174dbea3b1db3c72528d5ffde Mon Sep 17 00:00:00 2001 From: nimlgen <138685161+nimlgen@users.noreply.github.com> Date: Tue, 20 May 2025 13:50:58 +0300 Subject: [PATCH] am: disable idle d3 (#10428) --- tinygrad/runtime/ops_amd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinygrad/runtime/ops_amd.py b/tinygrad/runtime/ops_amd.py index f252f16e74..e17c97553d 100644 --- a/tinygrad/runtime/ops_amd.py +++ b/tinygrad/runtime/ops_amd.py @@ -691,7 +691,7 @@ class PCIIface: if getenv("VFIO", 1): try: if first_dev: - if not FileIOInterface.exists("/sys/module/vfio"): os.system("sudo modprobe vfio-pci") + if not FileIOInterface.exists("/sys/module/vfio"): os.system("sudo modprobe vfio-pci disable_idle_d3=1") FileIOInterface("/sys/module/vfio/parameters/enable_unsafe_noiommu_mode", os.O_RDWR).write("1") PCIIface.vfio_fd = FileIOInterface("/dev/vfio/vfio", os.O_RDWR)