swh:1:snp:70f530b74f5be73cfb71c212c9e3317ce44c1ebc
Revision 39e5c08a88ac59ef1e848e7b7e40f2056c792b08 authored by Andrew Adams on 07 February 2024, 17:49:06 UTC, committed by GitHub on 07 February 2024, 17:49:06 UTC
* Update makefile to use test/common/terminate_handler.cpp

This means we actually print error messages when using exceptions and
the makefile

* Better validate of GPU schedules

GPU loop constraints were checked in two different places. Checking them
in ScheduleFunctions was incorrect because it didn't consider update
definitions and specializations. Checking them in FuseGPUThreadLoops was
too late, because the Var names have gone (they've been renamed to
things like __thread_id_x). Furthermore, some problems were internal
errors or runtime errors when they should have been user errors. We
allowed 4d thread and block dimensions, but then hit an internal error.

This PR centralizes checking of GPU loop structure in
CanonicalizeGPUVars and adds more helpful error messages that print the
problematic loop structure. E.g:

```
Error: GPU thread loop over f$8.s0.v0 is inside three other GPU thread
loops. The maximum number of nested GPU thread loops is 3. The loop nest
is:
compute_at for g$8:
 for g$8.s0.v7:
  for g$8.s0.v6:
   for g$8.s0.v5:
    for g$8.s0.v4:
     gpu_block g$8.s0.v3:
      gpu_block g$8.s0.v2:
       gpu_thread g$8.s0.v1:
        gpu_thread g$8.s0.v0:
         store_at for f$8:
          compute_at for f$8:
           gpu_thread f$8.s0.v1:
            gpu_thread f$8.s0.v0:
```

Fixes the bug found in #7946

* Delete dead code

* Actually clear the ostringstream
1 parent 37153a9
History
Tip revision: 4e0b313fa7f6d3897f960dd322cfd13daed97c98 authored by Andrew Adams on 18 April 2024, 19:48:59 UTC
Rewrite IREquality to use a more compact stack instead of deep recursion (#8198)
Tip revision: 4e0b313
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