GithubHelp home page GithubHelp logo

thecomputekid / premake5-cuda Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 0.0 67 KB

Premake5 module that enables CUDA development in Visual Studio using the native CUDA Toolkit integration.

License: MIT License

C++ 5.71% Cuda 10.74% Lua 75.26% Makefile 8.28%
cuda premake-module premake5 visual-studio

premake5-cuda's People

Contributors

thecomputekid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

premake5-cuda's Issues

Using separate premake5.lua files

Howdy,

Thanks very much for taking the time to do this project!

Your example project works fine here. But my usual MO is to make a single premake5.lua to hold the solution setting and add separate project folders, each with it's own settings stored in a premake5.lua file and "include" them in the solution premake5 file.

Here's a simple example using your own Example project. If you run "generateVS2019.bat", you'll see that the *.cu files are not added to the Example project. The solution and projects live in the "build" folder

Is that just a limitation or is it something that can be fixed. Thanks!

https://github.com/Hurleyworks/cudaPremake

creating ptx files in vs2019

Sorry to bother you again! I use NVIDIA OptiX in my projects and it needs to create .ptx files from .cu files. Below is the relevant vs2019 project settings. I've gotten just about everything working by adding the necessary additions to the "cuda-exported-variables" file. But I can't figure out how create "CompileOut" setting so that a different .ptx file will be saved for each .cu file. Could you tell me how I might do this? Thanks!

 <ItemGroup>
    <CudaCompile Include="deform.cu" />
    <CudaCompile Include="optix_kernels.cu">
      <GPUDebugInfo Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GPUDebugInfo>
      <CodeGeneration Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">compute_75,sm_75</CodeGeneration>
      <CodeGeneration Condition="'$(Configuration)|$(Platform)'=='Release|x64'">compute_75,sm_75</CodeGeneration>
    </CudaCompile>
  </ItemGroup>

 <CudaCompile>
      <GenerateRelocatableDeviceCode>true</GenerateRelocatableDeviceCode>
    </CudaCompile>
    <CudaCompile>
      <NvccCompilation>ptx</NvccCompilation>
    </CudaCompile>
    <CudaCompile>
      <TargetMachinePlatform>64</TargetMachinePlatform>
      <CudaRuntime>Shared</CudaRuntime>
      <CompileOut>$(SolutionDir)$(Platform)\$(Configuration)\$(TargetName)\ptxes\%(Filename).ptx</CompileOut>
      <AdditionalOptions>-std=c++17 --use_fast_math -Xcompiler "/wd 4819" -D_DEBUG %(AdditionalOptions)</AdditionalOptions>
      <FastMath>true</FastMath>
      <GenerateLineInfo>true</GenerateLineInfo>
    </CudaCompile>
    <CudaLink>
      <PerformDeviceLink>false</PerformDeviceLink>
    </CudaLink>

How to define the output directory for .obj

Hi,
How can I defined in premake the compiler output :
image

I try to add to -o=path/to/my/output to the cudaCompilerOptions variable, but it didn't work.
Is it possible to defined this parameters with your module ?

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.