timothybrooks / hdr-plus

HDR+ Implementation
MIT License
594 stars 201 forks source link

Build Error #82

Open Zhang-Setsail opened 2 years ago

Zhang-Setsail commented 2 years ago

Thank you for your help!!! It's said that some function's argument number is not correct. How to fix the error? Or some error in my build?

Command: make -j$(expr $(nproc) + 1)

Output: zsh: command not found: nproc expr: syntax error Consolidate compiler generated dependencies of target align_and_merge_generator Consolidate compiler generated dependencies of target hdrplus_pipeline_generator [ 6%] Building CXX object CMakeFiles/hdrplus_pipeline_generator.dir/src/align.cpp.o [ 9%] Building CXX object CMakeFiles/align_and_merge_generator.dir/src/align.cpp.o [ 12%] Building CXX object CMakeFiles/hdrplus_pipeline_generator.dir/src/finish.cpp.o [ 15%] Building CXX object CMakeFiles/align_and_merge_generator.dir/src/merge.cpp.o [ 15%] Building CXX object CMakeFiles/hdrplus_pipeline_generator.dir/src/merge.cpp.o /Users/zhangqihang/Downloads/llvm/hdr-plus/src/merge.cpp:29:24: error: no matching function for call to 'mirror_interior' Func imgs_mirror = BoundaryConditions::mirror_interior(imgs, 0, width, 0, height); ^~~~~~~~~~~ /usr/local/include/Halide.h:18733:6: note: candidate function not viable: requires 2 arguments, but 5 were provided Func mirror_interior(const Func &source, const Region &bounds); ^ /usr/local/include/Halide.h:18736:33: note: candidate function template not viable: requires 2 arguments, but 5 were provided HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like, const Region &bounds) { ^ /usr/local/include/Halide.h:18741:33: note: candidate function template not viable: requires single argument 'func_like', but 5 arguments were provided HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like) { ^ /Users/zhangqihang/Downloads/llvm/hdr-plus/src/merge.cpp:29:24: error: no matching function for call to 'mirror_interior' Func imgs_mirror = BoundaryConditions::mirror_interior(imgs, 0, width, 0, height); ^~~~~~~~~~~ /usr/local/include/Halide.h:18733:6: note: candidate function not viable: requires 2 arguments, but 5 were provided Func mirror_interior(const Func &source, const Region &bounds); ^ /usr/local/include/Halide.h:18736:33: note: candidate function template not viable: requires 2 arguments, but 5 were provided HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like, const Region &bounds) { ^ /usr/local/include/Halide.h:18741:33: note: candidate function template not viable: requires single argument 'func_like', but 5 arguments were provided HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like) { ^ /Users/zhangqihang/Downloads/llvm/hdr-plus/src/align.cpp:77:24: error: no matching function for call to 'mirror_interior' Func imgs_mirror = BoundaryConditions::mirror_interior(imgs, 0, width, 0, height); ^~~~~~~~~~~ /usr/local/include/Halide.h:18733:6: note: candidate function not viable: requires 2 arguments, but 5 were provided Func mirror_interior(const Func &source, const Region &bounds); ^ /usr/local/include/Halide.h:18736:33: note: candidate function template not viable: requires 2 arguments, but 5 were provided HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like, const Region &bounds) { ^ /usr/local/include/Halide.h:18741:33: note: candidate function template not viable: requires single argument 'func_like', but 5 arguments were provided HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like) { ^ /Users/zhangqihang/Downloads/llvm/hdr-plus/src/align.cpp:77:24: error: no matching function for call to 'mirror_interior' Func imgs_mirror = BoundaryConditions::mirror_interior(imgs, 0, width, 0, height); ^~~~~~~~~~~ /usr/local/include/Halide.h:18733:6: note: candidate function not viable: requires 2 arguments, but 5 were provided Func mirror_interior(const Func &source, const Region &bounds); ^ /usr/local/include/Halide.h:18736:33: note: candidate function template not viable: requires 2 arguments, but 5 were provided HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like, const Region &bounds) { ^ /usr/local/include/Halide.h:18741:33: note: candidate function template not viable: requires single argument 'func_like', but 5 arguments were provided HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like) { ^ /Users/zhangqihang/Downloads/llvm/hdr-plus/src/align.cpp:117:29: error: no matching function for call to 'repeat_edge' Func alignment_repeat = BoundaryConditions::repeat_edge(alignment, 0, num_tx, 0, num_ty); ^~~~~~~ /usr/local/include/Halide.h:18636:6: note: candidate function not viable: requires 2 arguments, but 5 were provided Func repeat_edge(const Func &source, const Region &bounds); ^ /usr/local/include/Halide.h:18639:33: note: candidate function template not viable: requires 2 arguments, but 5 were provided HALIDE_NO_USER_CODE_INLINE Func repeat_edge(const T &func_like, const Region &bounds) { ^ /usr/local/include/Halide.h:18644:33: note: candidate function template not viable: requires single argument 'func_like', but 5 arguments were provided HALIDE_NO_USER_CODE_INLINE Func repeat_edge(const T &func_like) { ^ /Users/zhangqihang/Downloads/llvm/hdr-plus/src/align.cpp:117:29: error: no matching function for call to 'repeat_edge' Func alignment_repeat = BoundaryConditions::repeat_edge(alignment, 0, num_tx, 0, num_ty); ^~~~~~~ /usr/local/include/Halide.h:18636:6: note: candidate function not viable: requires 2 arguments, but 5 were provided Func repeat_edge(const Func &source, const Region &bounds); ^ /usr/local/include/Halide.h:18639:33: note: candidate function template not viable: requires 2 arguments, but 5 were provided HALIDE_NO_USER_CODE_INLINE Func repeat_edge(const T &func_like, const Region &bounds) { ^ /usr/local/include/Halide.h:18644:33: note: candidate function template not viable: requires single argument 'func_like', but 5 arguments were provided HALIDE_NO_USER_CODE_INLINE Func repeat_edge(const T &func_like) { ^ /Users/zhangqihang/Downloads/llvm/hdr-plus/src/finish.cpp:90:25: error: no matching function for call to 'mirror_interior' Func input_mirror = BoundaryConditions::mirror_interior(input, 0, width, 0, height); ^~~~~~~~~~~ /usr/local/include/Halide.h:18733:6: note: candidate function not viable: requires 2 arguments, but 5 were provided Func mirror_interior(const Func &source, const Region &bounds); ^ /usr/local/include/Halide.h:18736:33: note: candidate function template not viable: requires 2 arguments, but 5 were provided HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like, const Region &bounds) { ^ /usr/local/include/Halide.h:18741:33: note: candidate function template not viable: requires single argument 'func_like', but 5 arguments were provided HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like) { ^ /Users/zhangqihang/Downloads/llvm/hdr-plus/src/finish.cpp:200:25: error: no matching function for call to 'mirror_interior' Func input_mirror = BoundaryConditions::mirror_interior(input, 0, width, 0, height); ^~~~~~~~~~~ /usr/local/include/Halide.h:18733:6: note: candidate function not viable: requires 2 arguments, but 5 were provided Func mirror_interior(const Func &source, const Region &bounds); ^ /usr/local/include/Halide.h:18736:33: note: candidate function template not viable: requires 2 arguments, but 5 were provided HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like, const Region &bounds) { ^ /usr/local/include/Halide.h:18741:33: note: candidate function template not viable: requires single argument 'func_like', but 5 arguments were provided HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like) { ^ /Users/zhangqihang/Downloads/llvm/hdr-plus/src/finish.cpp:254:25: error: no matching function for call to 'mirror_image' Func input_mirror = BoundaryConditions::mirror_image(input, 0, width, 0, height); ^~~~~~~~ /usr/local/include/Halide.h:18698:6: note: candidate function not viable: requires 2 arguments, but 5 were provided Func mirror_image(const Func &source, const Region &bounds); ^ /usr/local/include/Halide.h:18701:33: note: candidate function template not viable: requires 2 arguments, but 5 were provided HALIDE_NO_USER_CODE_INLINE Func mirror_image(const T &func_like, const Region &bounds) { ^ /usr/local/include/Halide.h:18706:33: note: candidate function template not viable: requires single argument 'func_like', but 5 arguments were provided HALIDE_NO_USER_CODE_INLINE Func mirror_image(const T &func_like) { ^ /Users/zhangqihang/Downloads/llvm/hdr-plus/src/finish.cpp:350:23: error: no matching function for call to 'repeat_edge' Func im1_mirror = BoundaryConditions::repeat_edge(im1, 0 , width, 0, height); ^~~~~~~ /usr/local/include/Halide.h:18636:6: note: candidate function not viable: requires 2 arguments, but 5 were provided Func repeat_edge(const Func &source, const Region &bounds); ^ /usr/local/include/Halide.h:18639:33: note: candidate function template not viable: requires 2 arguments, but 5 were provided HALIDE_NO_USER_CODE_INLINE Func repeat_edge(const T &func_like, const Region &bounds) { ^ /usr/local/include/Halide.h:18644:33: note: candidate function template not viable: requires single argument 'func_like', but 5 arguments were provided HALIDE_NO_USER_CODE_INLINE Func repeat_edge(const T &func_like) { ^ /Users/zhangqihang/Downloads/llvm/hdr-plus/src/finish.cpp:351:23: error: no matching function for call to 'repeat_edge' Func im2_mirror = BoundaryConditions::repeat_edge(im2, 0 , width, 0, height); ^~~~~~~ /usr/local/include/Halide.h:18636:6: note: candidate function not viable: requires 2 arguments, but 5 were provided Func repeat_edge(const Func &source, const Region &bounds); ^ /usr/local/include/Halide.h:18639:33: note: candidate function template not viable: requires 2 arguments, but 5 were provided HALIDE_NO_USER_CODE_INLINE Func repeat_edge(const T &func_like, const Region &bounds) { ^ /usr/local/include/Halide.h:18644:33: note: candidate function template not viable: requires single argument 'func_like', but 5 arguments were provided HALIDE_NO_USER_CODE_INLINE Func repeat_edge(const T &func_like) { ^ 2 errors generated. 1 error generated. 1 error generated. 2 errors generated. make[2]: [CMakeFiles/hdrplus_pipeline_generator.dir/src/align.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[2]: [CMakeFiles/align_and_merge_generator.dir/src/merge.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[2]: [CMakeFiles/hdrplus_pipeline_generator.dir/src/merge.cpp.o] Error 1 make[2]: [CMakeFiles/align_and_merge_generator.dir/src/align.cpp.o] Error 1 make[1]: [CMakeFiles/align_and_merge_generator.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... 5 errors generated. make[2]: [CMakeFiles/hdrplus_pipeline_generator.dir/src/finish.cpp.o] Error 1 make[1]: [CMakeFiles/hdrplus_pipeline_generator.dir/all] Error 2 make: *** [all] Error 2

Zhang-Setsail commented 2 years ago

Because Halide 12.0.0 delete the code: template<typename T, typename... Bounds, typename std::enable_if<Halide::Internal::all_are_convertible<Expr, Bounds...>::value>::type * = nullptr> HALIDE_ATTRIBUTE_DEPRECATED("Add braces around the bounds like so: {{a, b}, {c, d}}") HALIDE_NO_USER_CODE_INLINE Func mirror_image(const T &func_like, Bounds &&... bounds) { Region collected_bounds; Internal::collect_region(collected_bounds, std::forward<Bounds>(bounds)...); return mirror_image(Internal::func_like_to_func(func_like), collected_bounds); } highlight is ("Add braces around the bounds like so: {{a, b}, {c, d}}") You can add this kind of function to your halide.

However, I meet another error.

make

`Consolidate compiler generated dependencies of target hdrplus_pipeline_generator [ 21%] Built target hdrplus_pipeline_generator [ 27%] Built target hdrplus_pipeline.runtime [ 30%] Generating hdrplus_pipeline.h, hdrplus_pipeline.o Unhandled exception: Error: All Params and embedded Buffers must have unique names, but the name 'gauss_down4_kernel' was seen multiple times.

make[2]: [hdrplus_pipeline.h] Error 255 make[1]: [CMakeFiles/hdrplus_pipeline.update.dir/all] Error 2 make: *** [all] Error 2`

I can't solve this totally! What's wrong with the code of this project????

gariac commented 13 hours ago

basically the same problem Debian 12.5 libhalide18 Linux framework13 6.10.11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.10.11-1 (2024-09-22) x86_64 GNU/Linux

` make [ 3%] Building CXX object CMakeFiles/hdrplus_pipeline_generator.dir/src/align.cpp.o /usr/local/src/hdr-plus/src/align.cpp: In function ‘Halide::Func align(Halide::Func, Halide::Expr, Halide::Expr)’: /usr/local/src/hdr-plus/src/align.cpp:77:59: error: no matching function for call to ‘mirror_interior(const Halide::Func&, int, Halide::Expr&, int, Halide::Expr&)’ 77 | Func imgs_mirror = BoundaryConditions::mirror_interior(imgs, 0, width, 0, height); | ~~~~~~~^~~~~~~ In file included from /usr/local/src/hdr-plus/src/align.h:12, from /usr/local/src/hdr-plus/src/align.cpp:1: /usr/include/halide18/Halide.h:21019:33: note: candidate: ‘template Halide::Func Halide::BoundaryConditions::mirror_interior(const T&, const Halide::Region&)’ 21019 | HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like, const Region &bounds) { | ^~~~~~~ /usr/include/halide18/Halide.h:21019:33: note: candidate expects 2 arguments, 5 provided /usr/include/halide18/Halide.h:21024:33: note: candidate: ‘template Halide::Func Halide::BoundaryConditions::mirror_interior(const T&)’ 21024 | HALIDE_NO_USER_CODE_INLINE Func mirror_interior(const T &func_like) { | ^~~~~~~ /usr/include/halide18/Halide.h:21024:33: note: candidate expects 1 argument, 5 provided /usr/include/halide18/Halide.h:21016:6: note: candidate: ‘Halide::Func Halide::BoundaryConditions::mirror_interior(const Halide::Func&, const Halide::Region&)’ 21016 | Func mirror_interior(const Func &source, const Region &bounds); | ^~~~~~~ /usr/include/halide18/Halide.h:21016:6: note: candidate expects 2 arguments, 5 provided /usr/local/src/hdr-plus/src/align.cpp:117:60: error: no matching function for call to ‘repeat_edge(Halide::Func&, int, Halide::Expr&, int, Halide::Expr&)’ 117 | Func alignment_repeat = BoundaryConditions::repeat_edge(alignment, 0, num_tx, 0, num_ty); | ~~~~~~~^~~~~~~~~ /usr/include/halide18/Halide.h:20922:33: note: candidate: ‘template Halide::Func Halide::BoundaryConditions::repeat_edge(const T&, const Halide::Region&)’ 20922 | HALIDE_NO_USER_CODE_INLINE Func repeat_edge(const T &func_like, const Region &bounds) { | ^~~ /usr/include/halide18/Halide.h:20922:33: note: candidate expects 2 arguments, 5 provided /usr/include/halide18/Halide.h:20927:33: note: candidate: ‘template Halide::Func Halide::BoundaryConditions::repeat_edge(const T&)’ 20927 | HALIDE_NO_USER_CODE_INLINE Func repeat_edge(const T &func_like) { | ^~~ /usr/include/halide18/Halide.h:20927:33: note: candidate expects 1 argument, 5 provided /usr/include/halide18/Halide.h:20919:6: note: candidate: ‘Halide::Func Halide::BoundaryConditions::repeat_edge(const Halide::Func&, const Halide::Region&)’ 20919 | Func repeat_edge(const Func &source, const Region &bounds); | ^~~ /usr/include/halide18/Halide.h:20919:6: note: candidate expects 2 arguments, 5 provided make[2]: [CMakeFiles/hdrplus_pipeline_generator.dir/build.make:90: CMakeFiles/hdrplus_pipeline_generator.dir/src/align.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:209: CMakeFiles/hdrplus_pipeline_generator.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

`

Titaniumtown commented 12 hours ago

I'll look at this now.