EnzymeAD / EnzymeAD/Enzyme

No pass found for various GSL FFT and Statistics methods

Open
#2,027 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
LLVM
Stars
1.7k
Forks
188
Avg merge
1d 22h
Merged PRs (30d)
26

Description

This issue references the C code, Makefile, and `make debug` output in this gist: [https://gist.github.com/RasmitDevkota/18f910de41bb455a77a65700e1394bc6](https://gist.github.com/RasmitDevkota/18f910de41bb455a77a65700e1394bc6), which I am running with the command `make -f Makefile clean && make -f Makefile gsl_fft_demo && ./gsl_fft_demo`.

The code demonstrates a use of some of the GSL FFT and Statistics methods for taking Fourier transforms and subsequently finding peaks. When the autodifferentiation step is commented out, the program compiles and runs successfully, but including the autodifferentiation step results in `Enzyme: No ... pass found for ...` errors as seen in the below trace.
```bash
$ make -f Makefile clean && make -f Makefile gsl_fft_demo && ./gsl_fft_demo
rm -f gsl_fft_demo
rm -f *.o
rm -f *.ll
clang -c gsl_fft_demo.c -g -flto -O3 -fpass-plugin=/home/rasmitdevkota/repos/Enzyme/enzyme/build/Enzyme/ClangEnzyme-18.so -Xclang -load -Xclang /home/rasmitdevkota/repos/Enzyme/enzyme/build/Enzyme/ClangEnzyme-18.so
clang: warning: -Wl,--disable-new-dtags: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -Wl,-rpath,/home/sw/spack/spack-v0.22.1-a/opt/spack/linux-rhel8-icelake/gcc-8.5.0/llvm-18.1.3-zcw4nm5lgjjytivtvbllwxc7a7f32zvt/lib: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -Wl,-rpath,/home/sw/spack/spack-v0.22.1-a/opt/spack/linux-rhel8-icelake/clang-18.1.3/nlopt-2.7.1-t4phaj7xqzxya2zydetihbchsdnjmxxj/lib64: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -Wl,-rpath,/home/sw/spack/spack-v0.22.1-a/opt/spack/linux-rhel8-icelake/clang-18.1.3/gsl-2.7.1-cevi3eediahw5tcqpvmj2gyeickt2sek/lib: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -Wl,--as-needed: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/home/sw/spack/spack-v0.22.1-a/opt/spack/linux-rhel8-icelake/gcc-8.5.0/llvm-18.1.3-zcw4nm5lgjjytivtvbllwxc7a7f32zvt/lib' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/home/sw/spack/spack-v0.22.1-a/opt/spack/linux-rhel8-icelake/clang-18.1.3/nlopt-2.7.1-t4phaj7xqzxya2zydetihbchsdnjmxxj/lib64' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-L/home/sw/spack/spack-v0.22.1-a/opt/spack/linux-rhel8-icelake/clang-18.1.3/gsl-2.7.1-cevi3eediahw5tcqpvmj2gyeickt2sek/lib' [-Wunused-command-line-argument]
gsl_fft_demo.c:131:3: error: Enzyme: No augmented forward pass found for gsl_fft_halfcomplex_unpack
at context: %15 = tail call i32 @gsl_fft_halfcomplex_unpack(ptr noundef %6, ptr noundef %9, i64 noundef 1, i64 noundef %4) #15, !dbg !128
131 | gsl_fft_halfcomplex_unpack( data, cdata, (size_t)1, (size_t)num_pts );
| ^
gsl_fft_demo.c:131:3: error: Enzyme: No reverse pass found for gsl_fft_halfcomplex_unpack
at context: %15 = tail call i32 @gsl_fft_halfcomplex_unpack(ptr noundef %6, ptr noundef %9, i64 noundef 1, i64 noundef %4) #16, !dbg !128
gsl_fft_demo.c:128:3: error: Enzyme: No augmented forward pass found for gsl_fft_real_wavetable_free
at context: tail call void @gsl_fft_real_wavetable_free(ptr noundef %12) #16, !dbg !127
128 | gsl_fft_real_wavetable_free( real_wavetable );
| ^
gsl_fft_demo.c:128:3: error: Enzyme: No reverse pass found for gsl_fft_real_wavetable_free
at context: tail call void @gsl_fft_real_wavetable_free(ptr noundef %12) #16, !dbg !127
gsl_fft_demo.c:126:3: error: Enzyme: No augmented forward pass found for gsl_fft_real_transform
at context: %14 = tail call i32 @gsl_fft_real_transform(ptr noundef %6, i64 noundef 1, i64 noundef %4, ptr noundef %12, ptr noundef %11) #16, !dbg !126
126 | gsl_fft_real_transform( data, (size_t)1, (size_t)num_pts, real_wavetable, workspace );
| ^
gsl_fft_demo.c:126:3: error: Enzyme: No reverse pass found for gsl_fft_real_transform
at context: %14 = tail call i32 @gsl_fft_real_transform(ptr noundef %6, i64 noundef 1, i64 noundef %4, ptr noundef %12, ptr noundef %11) #16, !dbg !126
gsl_fft_demo.c:120:20: error: Enzyme: No augmented forward pass found for gsl_fft_halfcomplex_wavetable_alloc
at context: %13 = tail call ptr @gsl_fft_halfcomplex_wavetable_alloc(i64 noundef %4) #16, !dbg !125
120 | hc_wavetable = gsl_fft_halfcomplex_wavetable_alloc( (size_t)num_pts );
| ^
gsl_fft_demo.c:120:20: error: Enzyme: No reverse pass found for gsl_fft_halfcomplex_wavetable_alloc
at context: %13 = tail call ptr @gsl_fft_halfcomplex_wavetable_alloc(i64 noundef %4) #16, !dbg !125
gsl_fft_demo.c:119:20: error: Enzyme: No augmented forward pass found for gsl_fft_real_wavetable_alloc
at context: %12 = tail call ptr @gsl_fft_real_wavetable_alloc(i64 noundef %4) #16, !dbg !124
119 | real_wavetable = gsl_fft_real_wavetable_alloc( (size_t)num_pts );
| ^
gsl_fft_demo.c:119:20: error: Enzyme: No reverse pass found for gsl_fft_real_wavetable_alloc
at context: %12 = tail call ptr @gsl_fft_real_wavetable_alloc(i64 noundef %4) #16, !dbg !124
gsl_fft_demo.c:118:20: error: Enzyme: No augmented forward pass found for gsl_fft_real_workspace_alloc
at context: %11 = tail call ptr @gsl_fft_real_workspace_alloc(i64 noundef %4) #16, !dbg !123
118 | workspace = gsl_fft_real_workspace_alloc( (size_t)num_pts ); // also suitable for halfcomplex below
| ^
gsl_fft_demo.c:118:20: error: Enzyme: No reverse pass found for gsl_fft_real_workspace_alloc
at context: %11 = tail call ptr @gsl_fft_real_workspace_alloc(i64 noundef %4) #16, !dbg !123
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Makefile:9: gsl_fft_demo.o] Error 1
```

The `make debug` output is quite long so I have attached it in the gist above, but it also ends with the same type of error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.