cleanup tests Device[Device.DEFAULT] is always Compiled (#3645)

This commit is contained in:
chenyu
2024-03-07 11:15:42 -05:00
committed by GitHub
parent bdd62c7fd8
commit 906cc3a69b
7 changed files with 5 additions and 20 deletions

View File

@@ -4,7 +4,7 @@ from examples.llama import Transformer, MODEL_PARAMS
from tinygrad.tensor import Tensor
from tinygrad import Device
from tinygrad.nn.state import get_state_dict
from tinygrad.device import Compiled, Allocator
from tinygrad.device import Allocator
from tinygrad.helpers import Profiling
class FakeProgram:
@@ -16,7 +16,6 @@ class FakeAllocator(Allocator):
def copyin(self, dest, src:memoryview): pass
class TestLLaMASpeed(unittest.TestCase):
@unittest.skipIf(not isinstance(Device[Device.DEFAULT], Compiled), "only test for compiled backends")
def test_llama_compile(self):
backup_program = Device[Device.DEFAULT].runtime
backup_allocator = Device[Device.DEFAULT].allocator