move Allocator to buffer.py (#4502)

* move Allocator to buffer.py

* move those to realize

* memory file

* cleanup
This commit is contained in:
George Hotz
2024-05-09 19:45:56 -07:00
committed by GitHub
parent 1e843d495e
commit 89e119bc58
23 changed files with 186 additions and 164 deletions

View File

@@ -4,8 +4,8 @@ import ctypes, functools, hashlib
import tinygrad.runtime.autogen.opencl as cl
from tinygrad.helpers import init_c_var, to_char_p_p, from_mv, OSX, DEBUG
from tinygrad.renderer.cstyle import OpenCLRenderer
from tinygrad.buffer import BufferOptions
from tinygrad.device import Compiled, LRUAllocator, Compiler, CompilerOptions
from tinygrad.buffer import BufferOptions, LRUAllocator
from tinygrad.device import Compiled, Compiler, CompilerOptions
# see test/external/external_osx_profiling.py to determine this ratio. it's in like GPU clocks or something
OSX_TIMING_RATIO = (125/3) if OSX else 1.0