From 041dc0cf855b56f95f18434dde377c1d44ef5522 Mon Sep 17 00:00:00 2001 From: nimlgen <138685161+nimlgen@users.noreply.github.com> Date: Thu, 19 Feb 2026 17:37:15 +0300 Subject: [PATCH] fix typos (#14886) --- tinygrad/runtime/support/memory.py | 8 ++++---- tinygrad/runtime/support/nv/nvdev.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tinygrad/runtime/support/memory.py b/tinygrad/runtime/support/memory.py index 4c75b16719..a63f90c8d2 100644 --- a/tinygrad/runtime/support/memory.py +++ b/tinygrad/runtime/support/memory.py @@ -81,7 +81,7 @@ class TLSFAllocator: # Round up the allocation size to the next bucket, so any entry there can fit the requested size. size = round_up(size, (1 << size.bit_length() - self.l2_cnt)) - # Search for the smallest block that can fit the requested size. Start with the it's bucket and go up until any block is found. + # Search for the smallest block that can fit the requested size. Start with its bucket and go up until any block is found. for l1 in range(self.lv1(size), len(self.storage)): if self.lv1_entries[l1] == 0: continue for l2 in range(self.lv2(size) if l1 == size.bit_length() else 0, (1 << self.l2_cnt)): @@ -105,7 +105,7 @@ class TLSFAllocator: def free(self, start:int): self._insert_block(start - self.base, self.blocks[start - self.base][0])._merge_block(start - self.base) -# Memory Managment +# Memory Management class AddrSpace(enum.Enum): PHYS = enum.auto(); SYS = enum.auto(); PEER = enum.auto() # noqa: E702 @@ -221,7 +221,7 @@ class MemoryManager: @classmethod def alloc_vaddr(cls, size:int, align=0x1000) -> int: - assert cls.va_allocator is not None, "must be set it" + assert cls.va_allocator is not None, "must be set" return cls.va_allocator.alloc(size, max((1 << (size.bit_length() - 1)), align)) def valloc(self, size:int, align=0x1000, uncached=False, contiguous=False) -> VirtMapping: @@ -248,7 +248,7 @@ class MemoryManager: return self.map_range(va, size, paddrs, aspace=AddrSpace.PHYS, uncached=uncached) def vfree(self, vm:VirtMapping): - assert self.va_allocator is not None, "must be set it" + assert self.va_allocator is not None, "must be set" self.unmap_range(vm.va_addr, vm.size) self.va_allocator.free(vm.va_addr) for paddr, _ in vm.paddrs: self.pa_allocator.free(paddr) diff --git a/tinygrad/runtime/support/nv/nvdev.py b/tinygrad/runtime/support/nv/nvdev.py index 9a2aceed88..e516edea60 100644 --- a/tinygrad/runtime/support/nv/nvdev.py +++ b/tinygrad/runtime/support/nv/nvdev.py @@ -77,7 +77,7 @@ class NVDev(PCIDevImplBase): self._early_ip_init() self._early_mmu_init() - # Turn the booting early, gsp client is loaded from the clean. + # No booting state, gsp client is reinited every run. self.is_booting = False for ip in [self.flcn, self.gsp]: ip.init_sw()