From 4fb97b8de0e210cc37786ffdafc5dc0e990df593 Mon Sep 17 00:00:00 2001 From: cloud11665 Date: Tue, 15 Nov 2022 01:45:06 +0100 Subject: [PATCH] don't fail when termcolor is not installed (#436) --- test/test_speed_v_torch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_speed_v_torch.py b/test/test_speed_v_torch.py index b11140930b..35345796a4 100644 --- a/test/test_speed_v_torch.py +++ b/test/test_speed_v_torch.py @@ -11,9 +11,11 @@ from tinygrad.tensor import Tensor from tinygrad.nn import Conv2d try: from termcolor import colored +except ImportError: + colored = lambda x, _: x +try: from tinygrad.llops.ops_gpu import CL except ImportError: - colored = None CL = None IN_CHANS = [int(x) for x in os.getenv("IN_CHANS", "4,16,64").split(",")]