From fe97a85014e1039b7ad3bf2c22d4ce12a07782cf Mon Sep 17 00:00:00 2001 From: George Hotz <72895+geohot@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:18:09 +0100 Subject: [PATCH] the compiler is a driver (#3427) --- setup.py | 2 +- tinygrad/runtime/{compiler => driver}/hip_comgr.py | 0 tinygrad/runtime/ops_hip.py | 3 +-- 3 files changed, 2 insertions(+), 3 deletions(-) rename tinygrad/runtime/{compiler => driver}/hip_comgr.py (100%) diff --git a/setup.py b/setup.py index 380d7f96ec..172c39b930 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setup(name='tinygrad', long_description=long_description, long_description_content_type='text/markdown', packages = ['tinygrad', 'tinygrad.runtime.autogen', 'tinygrad.codegen', 'tinygrad.nn', 'tinygrad.renderer', - 'tinygrad.runtime', 'tinygrad.runtime.compiler', 'tinygrad.runtime.graph', 'tinygrad.shape', 'tinygrad.features'], + 'tinygrad.runtime', 'tinygrad.runtime.driver', 'tinygrad.runtime.graph', 'tinygrad.shape', 'tinygrad.features'], classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License" diff --git a/tinygrad/runtime/compiler/hip_comgr.py b/tinygrad/runtime/driver/hip_comgr.py similarity index 100% rename from tinygrad/runtime/compiler/hip_comgr.py rename to tinygrad/runtime/driver/hip_comgr.py diff --git a/tinygrad/runtime/ops_hip.py b/tinygrad/runtime/ops_hip.py index caddc1fd68..c05a8cb0b7 100644 --- a/tinygrad/runtime/ops_hip.py +++ b/tinygrad/runtime/ops_hip.py @@ -7,8 +7,7 @@ from tinygrad.helpers import from_mv, round_up, to_mv, colored, init_c_struct_t from tinygrad.device import Compiled, LRUAllocator, BufferOptions, JITRunner, Device, Buffer, MallocAllocator, update_stats, Compiler from tinygrad.renderer.cstyle import HIPRenderer from tinygrad.codegen.kernel import LinearizerOptions -from tinygrad.runtime.compiler.hip_comgr import compile_hip - +from tinygrad.runtime.driver.hip_comgr import compile_hip class HIPCompiler(Compiler): linearizer_opts = LinearizerOptions("HIP", has_tensor_cores=True)