premake / premake-core

Premake

Home Page:https://premake.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CUDA support?

brightening-eyes opened this issue · comments

Before opening a new feature request, please read Requesting New Features and consider if this is something you can contribute yourself. If this a new request, help us help you by filling in the template below.

What problem will this solve?
supporting CUDA toolkit for compilation of GPU compute code.

What might be a solution?
for clang, it can compile cuda as far as I am aware of. but, the path to cuda toolkit (include, lib, etc) and an option to compile the code as cuda should be specified.
for VS, it should use nvcc as far as I know.

What other alternatives have you already considered?
compiling cuda by itself is not supported in premake, but here and here are 2 repositories that adds support for it in premake, but I don't know if they are compatible. but as far as I understand, it should directly be supported in the toolsets like C and C++ are supported.

Anything else we should know?
nothing else, but if anything else comes in place, I'm more than happy to help.

Didn't test those repositories, but those are modules to use to extends premake with extra support.
Those are not listed in https://premake.github.io/community/modules/ :-/

To use modules, see https://premake.github.io/docs/Using-Modules/

@Jarod42
Actually I didn't ment to use it like this, I ment to have premake support cuda like c/c++ and d
the thing is, when a toolset like clang supports cuda compilation, why not to detect it like C++ and then compile and link it?

d support would probably disappears "soon", only supported by one deprecated generator (gmake).

why not to detect it like [..] ?

Resources are limited... :-/

maybe for now my best bet is to use one of those modules and see which one suits my needs then write one based on it and contribute back.

Hi, I am the author of one of those CUDA extensions. I tend to keep it up-to-date based on what people file as issues, but if there is anything you need, you can create an issue, and I will solve it if I know how.

On the matter of adding to the community modules, I do not know what the threshold for usefulness is, before modules are added to that page, otherwise I would put in a PR for it to be added.

On the matter of adding to the community modules, I do not know what the threshold for usefulness is, before modules are added to that page, otherwise I would put in a PR for it to be added.

I personally think that any modules might be added to that page (there are still readme.md or other way to state status/limitation of the module).

@Jarod42 : You have motivated me to submit a PR (#2183).