Revision 10687b5457dc89c6f8992816f1540cba72c3e893 authored by Andrew Adams on 09 February 2024, 19:20:56 UTC, committed by Andrew Adams on 09 February 2024, 19:20:56 UTC
When you rfactor an update definition, the new update definition must
use all the pure vars of the Func, even though the one you're rfactoring
may not have used them all.

We also want to preserve any scheduling already done to the pure vars,
so we want to preserve the dims list and splits list from the original
definition.

The code accounted for this by checking the dims list for any missing
pure vars and adding them at the end (just before Var::outermost()), but
this didn't account for the fact that they may no longer exist in the
dims list due to splits that didn't reuse the outer name. In these
circumstances we could end up with too many pure loops. E.g. if x has
been split into xo and xi, then the code was adding a loop for x even
though there were already loops for xo and xi, which of course produces
garbage output.

This PR instead just checks which pure vars are actually used in the
update definition up front, and then uses that to tell which ones should
be added.

Fixes #7890
1 parent a3baa5d
History
File Mode Size
.github
apps
cmake
dependencies
doc
packaging
python_bindings
src
test
tools
tutorial
util
.clang-format -rw-r--r-- 1.4 KB
.clang-format-ignore -rw-r--r-- 383 bytes
.clang-tidy -rw-r--r-- 7.6 KB
.gitattributes -rw-r--r-- 342 bytes
.gitignore -rw-r--r-- 4.9 KB
.gitmodules -rw-r--r-- 0 bytes
CMakeLists.txt -rw-r--r-- 10.9 KB
CMakePresets.json -rw-r--r-- 6.8 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.5 KB
LICENSE.txt -rw-r--r-- 14.4 KB
MANIFEST.in -rw-r--r-- 159 bytes
Makefile -rw-r--r-- 106.0 KB
README.md -rw-r--r-- 16.5 KB
README_cmake.md -rw-r--r-- 77.9 KB
README_fuzz_testing.md -rw-r--r-- 3.9 KB
README_python.md -rw-r--r-- 31.8 KB
README_rungen.md -rw-r--r-- 12.1 KB
README_vulkan.md -rw-r--r-- 11.4 KB
README_webassembly.md -rw-r--r-- 10.4 KB
README_webgpu.md -rw-r--r-- 5.2 KB
pyproject.toml -rw-r--r-- 196 bytes
requirements.txt -rw-r--r-- 130 bytes
run-clang-format.sh -rwxr-xr-x 1.4 KB
run-clang-tidy.sh -rwxr-xr-x 3.8 KB
setup.py -rw-r--r-- 1.2 KB

README.md

back to top