From ee74673b2bfadcfa91ef5f6a54e4203e4cdc5137 Mon Sep 17 00:00:00 2001 From: Lorenc Bushi Date: Thu, 13 Jun 2024 06:54:04 -0700 Subject: [PATCH] Add more comments and reorder imports --- tests/common/common_python_vec.py | 2 +- tests/vector_swizzles/CMakeLists.txt | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/common/common_python_vec.py b/tests/common/common_python_vec.py index be2040575..77d51832e 100644 --- a/tests/common/common_python_vec.py +++ b/tests/common/common_python_vec.py @@ -21,9 +21,9 @@ # ************************************************************************ from collections import defaultdict -from string import Template from itertools import product from math import ceil, floor +from string import Template class Data: signs = [True, False] diff --git a/tests/vector_swizzles/CMakeLists.txt b/tests/vector_swizzles/CMakeLists.txt index 3e294df35..d97690063 100644 --- a/tests/vector_swizzles/CMakeLists.txt +++ b/tests/vector_swizzles/CMakeLists.txt @@ -1,6 +1,14 @@ set(TEST_CASES_LIST "") set(TYPE_LIST "") + +# The vector swizzle tests can become too large if we dont split them into chunks or batches +# and this can hurt compilation times or even cause it to fail on machines 16 GB of RAM or less. +# Therefore, we output the tests in batches in order to instead generate a larger number of files +# which are individually much smaller which in turn speeds up compilation when using multiple threads. +# It also reduces the memory footprint of the tests. +# Some experimentation has shown 32 to be a reasonable value for the number of chunks/batches +# where the compilation suceeds iunder constrained space resorces and we don't produce a huge number of files. set(NUM_BATCHES "32") get_std_type(TYPE_LIST) get_no_vec_alias_type(TYPE_LIST)