Giter Site home page Giter Site logo

CUDA compilation flags about blt HOT 6 OPEN

llnl avatar llnl commented on July 23, 2024
CUDA compilation flags

from blt.

Comments (6)

cyrush avatar cyrush commented on July 23, 2024 1

the issue is for CMake cuda targets (created via macros in FindCUDA), you can't add any additional flags after the targets are created.

The work around is to add the defines to global flags CMAKE_CXX_FLAGS before blt_add_library and then restore the old flags after

This is actually a compelling case for adding an optional DEFINES arg to blt_add_library

We can't use blt_register_library to solve this b/c these flags are needed to compile the lib. (And in this case the aren't needed by client code)

from blt.

kennyweiss avatar kennyweiss commented on July 23, 2024

blt_register_library has additional arguments to add flags and defines to a library target.

I am not entirely sure how blt_register_library works when the library is generated with blt_add_library through. @white238, can you please clarify?

from blt.

mclarsen avatar mclarsen commented on July 23, 2024

To be clear, this works correctly without cuda.

from blt.

cyrush avatar cyrush commented on July 23, 2024

Update: setting CMAKE_CXX_FLAGS doesn't work w/ BLT's current cuda support. The only path I found was to add the defs to global CUDA_NVCC_FLAGS (along with keeping old and restoring them after adding the lib)

@mclarsen and I were able to modify CMAKE_CXX_FLAGS before, however we were using cuda_wrap_srcs, not cuda_add_library, which BLT is currently using

from blt.

mclarsen avatar mclarsen commented on July 23, 2024

Bit by this again in another project.

from blt.

cyrush avatar cyrush commented on July 23, 2024

FYI: @mclarsen There is work to pivot to CMake's native cuda support: #154

from blt.

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.