Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdfg.apply_strict_transformations() transforms compiling sdfg to non-compiling sdfg. #144

Closed
dominichofer opened this issue Feb 25, 2020 · 1 comment

Comments

@dominichofer
Copy link
Collaborator

Describe the bug
Applying strict transformations and then compiling this SDFG produces an error.
But only compiling without the strict transformations produces the desired output.

To Reproduce
Steps to reproduce the error:

  1. Load SDFG from file coriolis_expanded.zip
  2. sdfg.apply_strict_transformations()
  3. sdfg.compile(optimizer="")

Steps to reproduce the working equivalent program:

  1. Load SDFG from file coriolis_expanded.zip
  2. sdfg.compile(optimizer="")

Expected behavior
Get programs that produce the same output, with and without sdfg.apply_strict_transformations().

Desktop

Error log

-- Configuring done
-- Generating done
-- Build files have been written to: /home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/build

Scanning dependencies of target coriolis_stencil
[ 25%] Building CXX object CMakeFiles/coriolis_stencil.dir/home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp.o
/home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp: In function ‘void __program_coriolis_stencil_internal(double*, double*, double*, double*, double*, int, int, int, int)’:
/home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:17:230: error: no matching function for call to ‘dace::ArrayViewIn<double, 2, 1, 0>::ArrayViewIn(int, int, int)’
                                     auto __v_in = dace::ArrayViewIn<double, 2, 1, dace::NA_RUNTIME> (v + ((w + (((8 * (K + 1)) * (u - 1)) * int_ceil(I, 8))) + ((8 * (k + v)) * int_ceil(I, 8))), ((8 * (K + 1)) * int_ceil(I, 8)), 1);
                                                                                                                                                                                                                                      ^
In file included from /home/dominic/work/dace/dace/codegen/../runtime/include/dace/dace.h:20,
                 from /home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:2:
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/view.h:45:28: note: candidate: ‘template<class ... Dim> dace::ArrayViewIn<T, DIMS, VECTOR_LEN, NUM_ACCESSES, ALIGNED, OffsetT>::ArrayViewIn(const T*, const Dim& ...)’
         explicit DACE_HDFI ArrayViewIn(T const* ptr, const Dim&... strides) :
                            ^~~~~~~~~~~
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/view.h:45:28: note:   template argument deduction/substitution failed:
/home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:17:104: note:   cannot convert ‘(v + ((w + (((8 * (K + 1)) * (u - 1)) * int_ceil<int, int>(I, 8))) + ((8 * (k + v)) * int_ceil<int, int>(I, 8))))’ (type ‘int’) to type ‘const double*’
                                     auto __v_in = dace::ArrayViewIn<double, 2, 1, dace::NA_RUNTIME> (v + ((w + (((8 * (K + 1)) * (u - 1)) * int_ceil(I, 8))) + ((8 * (k + v)) * int_ceil(I, 8))), ((8 * (K + 1)) * int_ceil(I, 8)), 1);
                                                                                                      ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dominic/work/dace/dace/codegen/../runtime/include/dace/dace.h:20,
                 from /home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:2:
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/view.h:24:11: note: candidate: ‘constexpr dace::ArrayViewIn<double, 2, 1, 0>::ArrayViewIn(const dace::ArrayViewIn<double, 2, 1, 0>&)’
     class ArrayViewIn
           ^~~~~~~~~~~
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/view.h:24:11: note:   candidate expects 1 argument, 3 provided
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/view.h:24:11: note: candidate: ‘constexpr dace::ArrayViewIn<double, 2, 1, 0>::ArrayViewIn(dace::ArrayViewIn<double, 2, 1, 0>&&)’
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/view.h:24:11: note:   candidate expects 1 argument, 3 provided
/home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:18:64: error: expected primary-expression before ‘)’ token
                                     auto *v_in = __v_in.ptr<1>();
                                                                ^
/home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:20:43: warning: unused variable ‘fc_in’ [-Wunused-variable]
                                     auto *fc_in = __fc_in.ptr<1>();
                                           ^~~~~
/home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:45:230: error: no matching function for call to ‘dace::ArrayViewIn<double, 2, 1, 0>::ArrayViewIn(int, int, int)’
                                     auto __u_in = dace::ArrayViewIn<double, 2, 1, dace::NA_RUNTIME> (u + ((((((8 * u) * (K + 1)) * int_ceil(I, 8)) + w) + ((8 * (k + v)) * int_ceil(I, 8))) - 1), ((8 * (K + 1)) * int_ceil(I, 8)), 1);
                                                                                                                                                                                                                                      ^
In file included from /home/dominic/work/dace/dace/codegen/../runtime/include/dace/dace.h:20,
                 from /home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:2:
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/view.h:45:28: note: candidate: ‘template<class ... Dim> dace::ArrayViewIn<T, DIMS, VECTOR_LEN, NUM_ACCESSES, ALIGNED, OffsetT>::ArrayViewIn(const T*, const Dim& ...)’
         explicit DACE_HDFI ArrayViewIn(T const* ptr, const Dim&... strides) :
                            ^~~~~~~~~~~
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/view.h:45:28: note:   template argument deduction/substitution failed:
/home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:45:104: note:   cannot convert ‘(u + ((((((8 * u) * (K + 1)) * int_ceil<int, int>(I, 8)) + w) + ((8 * (k + v)) * int_ceil<int, int>(I, 8))) - 1))’ (type ‘int’) to type ‘const double*’
                                     auto __u_in = dace::ArrayViewIn<double, 2, 1, dace::NA_RUNTIME> (u + ((((((8 * u) * (K + 1)) * int_ceil(I, 8)) + w) + ((8 * (k + v)) * int_ceil(I, 8))) - 1), ((8 * (K + 1)) * int_ceil(I, 8)), 1);
                                                                                                      ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dominic/work/dace/dace/codegen/../runtime/include/dace/dace.h:20,
                 from /home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:2:
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/view.h:24:11: note: candidate: ‘constexpr dace::ArrayViewIn<double, 2, 1, 0>::ArrayViewIn(const dace::ArrayViewIn<double, 2, 1, 0>&)’
     class ArrayViewIn
           ^~~~~~~~~~~
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/view.h:24:11: note:   candidate expects 1 argument, 3 provided
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/view.h:24:11: note: candidate: ‘constexpr dace::ArrayViewIn<double, 2, 1, 0>::ArrayViewIn(dace::ArrayViewIn<double, 2, 1, 0>&&)’
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/view.h:24:11: note:   candidate expects 1 argument, 3 provided
/home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:46:64: error: expected primary-expression before ‘)’ token
                                     auto *u_in = __u_in.ptr<1>();
                                                                ^
/home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:48:43: warning: unused variable ‘fc_in’ [-Wunused-variable]
                                     auto *fc_in = __fc_in.ptr<1>();
                                           ^~~~~
In file included from /home/dominic/work/dace/dace/codegen/../runtime/include/dace/dace.h:16,
                 from /home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp:2:
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/math.h: At global scope:
/home/dominic/work/dace/dace/codegen/../runtime/include/dace/math.h:108:43: warning: ‘dace::math::pi’ defined but not used [-Wunused-variable]
         static DACE_CONSTEXPR typeless_pi pi{};
                                           ^~
CMakeFiles/coriolis_stencil.dir/build.make:62: recipe for target 'CMakeFiles/coriolis_stencil.dir/home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp.o' failed
make[2]: *** [CMakeFiles/coriolis_stencil.dir/home/dominic/work/dawn2dace/.dacecache/coriolis_stencil/src/cpu/coriolis_stencil.cpp.o] Error 1
CMakeFiles/Makefile2:77: recipe for target 'CMakeFiles/coriolis_stencil.dir/all' failed
make[1]: *** [CMakeFiles/coriolis_stencil.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
@tbennun
Copy link
Collaborator

tbennun commented Aug 19, 2020

@PanicSheep I think this was already resolved, could you please confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants