You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When use GCC48 to compile mkldnn, there are a lot of -Werror=unused-result errors. But when use GCC53, there is no error.
configuration:
[14:59:21] : [Step 1/4] -- Found Paddle host system: centos, version: 6.9
[14:59:21] : [Step 1/4] -- Found Paddle host system's CPU: 12 cores
[14:59:22] : [Step 1/4] -- The CXX compiler identification is GNU 4.8.2
[14:59:22] : [Step 1/4] -- The C compiler identification is GNU 4.8.2
error log:
In file included from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/cpu_barrier.hpp:22:0,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/cpu_barrier.cpp:19:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp: In member function ‘void mkldnn::impl::cpu::jit_generator::dump_code(const uint8*) const’:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp:719:47: error: ignoring return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
fwrite(code, getSize(), 1, fp);
^
cc1plus: all warnings being treated as errors
make[5]: *** [src/CMakeFiles/mkldnn.dir/cpu/cpu_barrier.cpp.o] Error 1
make[5]: *** Waiting for unfinished jobs....
In file included from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_uni_dw_conv_kernel_f32.hpp:21:0,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_uni_dw_conv_kernel_f32.cpp:23:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp: In member function ‘void mkldnn::impl::cpu::jit_generator::dump_code(const uint8*) const’:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp:719:47: error: ignoring return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
fwrite(code, getSize(), 1, fp);
^
In file included from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_transpose_src_utils.cpp:21:0:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp: In member function ‘void mkldnn::impl::cpu::jit_generator::dump_code(const uint8*) const’:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp:719:47: error: ignoring return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
fwrite(code, getSize(), 1, fp);
^
In file included from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_uni_reorder.cpp:29:0:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp: In member function ‘void mkldnn::impl::cpu::jit_generator::dump_code(const uint8*) const’:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp:719:47: error: ignoring return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
fwrite(code, getSize(), 1, fp);
^
cc1plus: all warnings being treated as errors
make[5]: *** [src/CMakeFiles/mkldnn.dir/cpu/jit_transpose_src_utils.cpp.o] Error 1
cc1plus: all warnings being treated as errors
make[5]: *** [src/CMakeFiles/mkldnn.dir/cpu/jit_uni_reorder.cpp.o] Error 1
In file included from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/cpu_barrier.hpp:22:0,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/cpu_reducer.hpp:28,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_avx2_convolution.hpp:23,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_avx2_convolution.cpp:20:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp: In member function ‘void mkldnn::impl::cpu::jit_generator::dump_code(const uint8*) const’:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp:719:47: error: ignoring return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
fwrite(code, getSize(), 1, fp);
^
cc1plus: all warnings being treated as errors
In file included from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/cpu_barrier.hpp:22:0,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/cpu_reducer.hpp:28,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_avx512_common_1x1_convolution.hpp:23,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_avx512_common_1x1_convolution.cpp:20:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp: In member function ‘void mkldnn::impl::cpu::jit_generator::dump_code(const uint8*) const’:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp:719:47: error: ignoring return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
fwrite(code, getSize(), 1, fp);
^
make[5]: *** [src/CMakeFiles/mkldnn.dir/cpu/jit_uni_dw_conv_kernel_f32.cpp.o] Error 1
In file included from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_avx512_common_conv_winograd_kernel_f32.hpp:23:0,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_avx512_common_convolution_winograd.hpp:25,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_avx512_core_convolution_winograd.cpp:28:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp: In member function ‘void mkldnn::impl::cpu::jit_generator::dump_code(const uint8*) const’:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp:719:47: error: ignoring return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
fwrite(code, getSize(), 1, fp);
^
In file included from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/cpu_barrier.hpp:22:0,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/cpu_reducer.hpp:28,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_avx2_1x1_convolution.hpp:23,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_avx2_1x1_convolution.cpp:20:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp: In member function ‘void mkldnn::impl::cpu::jit_generator::dump_code(const uint8*) const’:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp:719:47: error: ignoring return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
fwrite(code, getSize(), 1, fp);
^
cc1plus: all warnings being treated as errors
make[5]: *** [src/CMakeFiles/mkldnn.dir/cpu/jit_avx2_convolution.cpp.o] Error 1
cc1plus: all warnings being treated as errors
cc1plus: all warnings being treated as errors
make[5]: *** [src/CMakeFiles/mkldnn.dir/cpu/jit_avx512_core_convolution_winograd.cpp.o] Error 1
make[5]: *** [src/CMakeFiles/mkldnn.dir/cpu/jit_avx512_common_1x1_convolution.cpp.o] Error 1
In file included from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_uni_batch_normalization.cpp:26:0:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp: In member function ‘void mkldnn::impl::cpu::jit_generator::dump_code(const uint8*) const’:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp:719:47: error: ignoring return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
fwrite(code, getSize(), 1, fp);
^
cc1plus: all warnings being treated as errors
In file included from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_avx512_core_u8s8s32x_1x1_convolution.cpp:23:0:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp: In member function ‘void mkldnn::impl::cpu::jit_generator::dump_code(const uint8*) const’:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp:719:47: error: ignoring return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
fwrite(code, getSize(), 1, fp);
^
make[5]: *** [src/CMakeFiles/mkldnn.dir/cpu/jit_avx2_1x1_convolution.cpp.o] Error 1
cc1plus: all warnings being treated as errors
make[5]: *** [src/CMakeFiles/mkldnn.dir/cpu/jit_uni_batch_normalization.cpp.o] Error 1
cc1plus: all warnings being treated as errors
make[5]: *** [src/CMakeFiles/mkldnn.dir/cpu/jit_avx512_core_u8s8s32x_1x1_convolution.cpp.o] Error 1
In file included from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_uni_eltwise.cpp:22:0:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp: In member function ‘void mkldnn::impl::cpu::jit_generator::dump_code(const uint8*) const’:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp:719:47: error: ignoring return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
fwrite(code, getSize(), 1, fp);
^
In file included from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_avx2_gemm_f32.hpp:21:0,
from /home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_avx2_gemm_f32.cpp:22:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp: In member function ‘void mkldnn::impl::cpu::jit_generator::dump_code(const uint8*) const’:
/home/luotao02/Paddle/build/third_party/mkldnn/src/extern_mkldnn/src/cpu/jit_generator.hpp:719:47: error: ignoring return value of ‘size_t fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
fwrite(code, getSize(), 1, fp);
^
cc1plus: all warnings being treated as errors
make[5]: *** [src/CMakeFiles/mkldnn.dir/cpu/jit_avx2_gemm_f32.cpp.o] Error 1
cc1plus: all warnings being treated as errors
make[5]: *** [src/CMakeFiles/mkldnn.dir/cpu/jit_uni_eltwise.cpp.o] Error 1
make[4]: *** [src/CMakeFiles/mkldnn.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [third_party/mkldnn/src/extern_mkldnn-stamp/extern_mkldnn-build] Error 2
make[1]: *** [CMakeFiles/extern_mkldnn.dir/all] Error 2
make: *** [all] Error 2
Now we use -Wno-error=unused-result -Wno-unused-result to skip this error in PaddlePaddle/Paddle#10571. But could you help fix it at all? Thanks very much!
The text was updated successfully, but these errors were encountered:
When use GCC48 to compile mkldnn, there are a lot of
-Werror=unused-result
errors. But when use GCC53, there is no error.Now we use
-Wno-error=unused-result -Wno-unused-result
to skip this error in PaddlePaddle/Paddle#10571. But could you help fix it at all? Thanks very much!The text was updated successfully, but these errors were encountered: