-
Notifications
You must be signed in to change notification settings - Fork 194
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
undefined symbol: _ZN10tensorflow16CorrelationGrad #43
Comments
For me, it gave this error if I used any tensorflow version other than 1.2. |
DO NOT COMMENT -DGOOGLE_CUDA=1, or you will lose GPU support. If your error mentioned:
You can try add flag '--expt-relaxed-constexpr' to GPUCC in Makefile: If it's not fixed, can you paste full error message here? |
nvcc --expt-relaxed-constexpr -g -std=c++11 -I /usr/lib/gcc/x86_64-linux-gnu/5/include/emmintrin.h(1300): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/emmintrin.h(1306): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/emmintrin.h(1312): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/emmintrin.h(1318): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/emmintrin.h(1324): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/emmintrin.h(1330): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/emmintrin.h(1336): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/emmintrin.h(1342): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/smmintrin.h(270): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/smmintrin.h(798): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/avx2intrin.h(233): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/avx2intrin.h(240): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/avx2intrin.h(247): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/avx2intrin.h(254): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/avx2intrin.h(261): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/avx2intrin.h(268): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/avx2intrin.h(275): error: expression must have arithmetic, unscoped enum, or pointer type /usr/lib/gcc/x86_64-linux-gnu/5/include/avx2intrin.h(282): error: expression must have arithmetic, unscoped enum, or pointer type /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(96): error: identifier "x" is undefined /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(136): error: identifier "x" is undefined /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(136): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(221): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(221): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(274): error: class "__half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(300): error: class "__half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(311): error: class "__half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(320): error: class "__half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(329): error: class "__half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(333): error: class "__half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(350): error: class "__half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(362): error: class "__half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(370): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(376): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(385): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(385): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(522): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(522): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/CUDA/Half.h(554): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(87): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(89): error: class "Eigen::half" has no member "x" /usr/include/c++/5/bits/stl_tree.h(1440): error: identifier "_Compare" is undefined /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/google/protobuf/map.h(681): warning: type qualifier on return type is meaningless /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/framework/partial_tensor_shape.h(77): warning: integer conversion resulted in a change of sign /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h(322): warning: type qualifier on return type is meaningless /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(235): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(237): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(242): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(244): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(277): error: class "Eigen::half" has no member "x" /home/charles/Libraries/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h(294): error: class "Eigen::half" has no member "x" 48 errors detected in the compilation of "/tmp/tmpxft_00003273_00000000-7_data_augmentation.cu.cpp1.ii". |
I have the same error,
I modified my Makefile based on issue#45 Edit Makefile: -D_GLIBCXX_USE_CXX11_ABI=0 TF_LIB = my environment :Ubuntu 18.04 packages in conda environment Name Version Build Channel But if I remove -DGOOGLE_CUDA=1, the error is gone, but I encounter another error tensorflow.python.framework.errors_impl.NotFoundError: /home/pohsuanh/Documents/flownet2-tf/src/./ops/build/correlation.so: undefined symbol: _ZN10tensorflow16CorrelationGradAERKN5Eigen9GpuDeviceEiiiiiiiiiiiiiiiiiPKfS5_Pf |
You error seems different from irwinherrmann's (you have only 1 error for target preprocessing but he has 48). Can you paste your full error message? The Makefile should be OK. '-DGOOGLE_CUDA=1' is needed because the OPs was targeted on CUDA. For environment, CUDA 10 and gcc 7 may be too high. I'm not sure if they works. You can try to build with gcc 5 and cuda 9.x. I don't use conda. Not sure if it works, too. |
nvcc --expt-relaxed-constexpr -g -std=c++11 -I /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/google/protobuf/arena_impl.h(55): warning: integer conversion resulted in a change of sign /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/google/protobuf/arena_impl.h(309): warning: integer conversion resulted in a change of sign /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/google/protobuf/arena_impl.h(310): warning: integer conversion resulted in a change of sign /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::VALUE]" /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::VALUE]" /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::DERIVATIVE]" /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::DERIVATIVE]" /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]" /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]" /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::VALUE]" /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::VALUE]" /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::DERIVATIVE]" /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::DERIVATIVE]" /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]" /home/pohsuanh/miniconda3/envs/flownet/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]" 1 error detected in the compilation of "/tmp/tmpxft_00000f4d_00000000-6_data_augmentation.cu.cpp1.ii". |
Add For more information: tensorflow/tensorflow#22766 |
So from my previous full error message I found this :
Add -DNDEBUG shows all problems seem to result from
Should I concern about the warning ?
If I regardless run the test.py anyways, it kind of passed.
@Iamanorange you rock ! |
Congratulation. The only error is "constexpr function return is non-constant" and can be ignored by |
Hello, I still got some problems following the steps above. Here are some logs after compiling and running the test.py.
It seems that the Ops have not been registered to tensorflow, right? |
@leeskyed |
Edit: |
Hi, Sorry. I am using Python 3.6 Refer to comment 28: Looks my issue has gone. Thanks a lot! |
I compiled the ops successfully, but I got a really large number of flow, TF_INC = ifndef CUDA_HOME CC = gcc -O2 -pthread GPUCC = nvccGPUCC = nvcc --expt-relaxed-constexpr GPUCFLAGS = -c --expt-relaxed-constexprGPUCFLAGS = -c -gencode=arch=compute_61,code=sm_61 OUT_DIR = src/ops/build DOWNSAMPLE_SRC = "src/ops/downsample/downsample_kernel.cc" "src/ops/downsample/downsample_op.cc" CORRELATION_SRC = "src/ops/correlation/correlation_kernel.cc" "src/ops/correlation/correlation_grad_kernel.cc" "src/ops/correlation/correlation_op.cc" FLOWWARP_SRC = "src/ops/flow_warp/flow_warp_op.cc" "src/ops/flow_warp/flow_warp.cc" "src/ops/flow_warp/flow_warp_grad.cc" ifeq ($(OS),Windows_NT) all: preprocessing downsample correlation flowwarp thanks a lot! |
Hello, Months ago I compiled successfully the custom ops in a machine running Ubuntu 18.04LTS, CUDA 10 and Tensorflow-gpu 1.13.1. The configuration of the new machine is as follows:
Like I've said above, I have tried all the suggestions in this post and also in similar issues but I've also tried changing the version of GCC but 6.5 seems too high for CUDA 9 (will try 6.0 instead). Here's the complete error log and my Makefile which is very similar to the one that worked for my first installation with Cuda 10, etc.
Entire Makefile (added .txt so I could upload it) Error log
My only guess at this point is that the error may be related to working with a virtual environment and some variable not being set properly. However, it seems to link to the proper TF_LIB and TF_INC (see informational prints on the first lines of the log). Any help would be appreciated, Cheers. |
Env:
cuda: 9.0
cudnn: 9.0
tensorflow: 1.8.0
Ubuntu 16.04
I followed the instructions in Wxjwjj's post. Still get errors.
File "/home/charles/Libraries/anaconda2/envs/tensorflow1.2/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 64, in load_op_library
None, None, error_msg, error_code)
tensorflow.python.framework.errors_impl.NotFoundError: src/ops/build/correlation.so: undefined symbol: _ZN10tensorflow16CorrelationGradAERKN5Eigen9GpuDeviceEiiiiiiiiiiiiiiiiiPKfS5_Pf
This is after commenting out -DGOOGLE_CUDA=1. With that, I get the following error during the make process:
48 errors detected in the compilation of "/tmp/tmpxft_000076b3_00000000-7_data_augmentation.cu.cpp1.ii".
The text was updated successfully, but these errors were encountered: