diff --git a/extra/optimization/helpers.py b/extra/optimization/helpers.py index 88f6f25b9d..8fd13000a4 100644 --- a/extra/optimization/helpers.py +++ b/extra/optimization/helpers.py @@ -28,6 +28,7 @@ from tinygrad.helpers import dedup def load_worlds(filter_reduce=True, filter_noimage=True, filter_novariable=True): fn = Path(__file__).parent.parent / "datasets/sops.gz" ast_strs = dedup(gzip.open(fn).read().decode('utf-8').strip().split("\n")) + assert len(ast_strs) > 5000, "dataset size too small" if filter_reduce: ast_strs = [x for x in ast_strs if "REDUCE_AXIS" in x] if filter_noimage: ast_strs = [x for x in ast_strs if "dtypes.image" not in x] if filter_novariable: ast_strs = [x for x in ast_strs if "Variable" not in x]