GithubHelp home page GithubHelp logo

Comments (3)

Flast avatar Flast commented on June 20, 2024

This is not a Fusion specific issue; BOOST_GPU_ENABLED is provided by Config. You should open this issue there.

from fusion.

BenByington avatar BenByington commented on June 20, 2024

I will gladly file an issue there, but I don't agree that there is no Fusion specific issue. Granted other modules probably do things wrong as well, because the whole strategy is brittle, but that doesn't change the fact that Fusion is doing things incorrectly as well.

Config is correctly determining that we are compiling a .cu file using nvcc and it is correctly populating BOOST_GPU_ENABLED with the necessary information to mark a function is being able to run on both host and gpu. Everything that Config is trying to do in regards to cuda is correct. However what Config is not doing is saying you need to mark every function as gpu enabled.

Adding BOOST_FUSION_GPU_ENABLED (e.g. __device__ __host__) to a function isn't a magical panacea to automatically make a function compile for a GPU. There are a number of things you are not allowed to do from a device function. Calling a host-only routine is one of those things you are not allowed to do. If you mark a function as BOOST_FUSION_GPU_ENABLED and then proceed to call another function that is only compiled for the host, that is an error. Just like if you decided to use certain parts of the STL, or certain disallowed c++14 constructs. Nothing Config is going to do will help if you mark a function as compilable on the GPU, and then proceed to do things that are forbidden in that context.

from fusion.

Flast avatar Flast commented on June 20, 2024

OK, but I don't know which functions are valid or invalid. So, PR is very welcome.

from fusion.

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.