GithubHelp home page GithubHelp logo

warning: calling a constexpr __host__ function from a __host__ __device__ function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. about faster-rcnn_tf HOT 5 OPEN

smallcorgi avatar smallcorgi commented on June 4, 2024
warning: calling a constexpr __host__ function from a __host__ __device__ function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

from faster-rcnn_tf.

Comments (5)

xxi511 avatar xxi511 commented on June 4, 2024 14

My environment is CUDA 8.0 cudnn 5, work well (demo and test)
If you think The experimental flag '--expt-relaxed-constexpr' can be used to allow this. is annoyed
you can modify make.sh like below, add --expt-relaxed-constexpr

if [ -d "$CUDA_PATH" ]; then
	nvcc -std=c++11 -c -o roi_pooling_op.cu.o roi_pooling_op_gpu.cu.cc \
		-I $TF_INC -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC $CXXFLAGS \
		-arch=sm_37 --expt-relaxed-constexpr

from faster-rcnn_tf.

miraclebiu avatar miraclebiu commented on June 4, 2024 2

I have the same warning ,but all things can work well. You can run demo and train net.

from faster-rcnn_tf.

emily2he avatar emily2he commented on June 4, 2024

what about your environment? is tensorflow installed by pip or make by yourself? cuda version is 7.5, cudnn is v3 in my environment.

from faster-rcnn_tf.

angelfish91 avatar angelfish91 commented on June 4, 2024

I meet the same problem and my tensorflow is installed by pip, CUDA 8.0 cudnn 5? can you help me ?

from faster-rcnn_tf.

Nummer42O avatar Nummer42O commented on June 4, 2024

I experienced this problem in some of my own cuda code. I'm currently figuring out how to get rid of it since it doesn't seem to be right. For me it happens when using thrust::exp in a host function. Oddly enough compiling the same code with gcc works perfectly fine but compiling when it with nvcc and gcc it spits out those warnings but still works perfectly fine.

So for now just ignore it - I will try to update you if I found a solution.

EDIT:

It seems like you can't really get rid of those warnings except with --expt-relaxed-constexpr which I'd strongly advise against since you don't know with what else in the code it might interfere. As long as everything still works it happens to be only host code and everything should be fine.
I know it's annoying but just ignore those warnings.

from faster-rcnn_tf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.