Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA support? #2168

Open
brightening-eyes opened this issue Dec 5, 2023 · 7 comments
Open

CUDA support? #2168

brightening-eyes opened this issue Dec 5, 2023 · 7 comments

Comments

@brightening-eyes
Copy link

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.

@Jarod42
Copy link
Contributor

Jarod42 commented Dec 6, 2023

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/

@brightening-eyes
Copy link
Author

@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?

@Jarod42
Copy link
Contributor

Jarod42 commented Dec 7, 2023

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

why not to detect it like [..] ?

Resources are limited... :-/

@brightening-eyes
Copy link
Author

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.

@theComputeKid
Copy link
Contributor

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.

@Jarod42
Copy link
Contributor

Jarod42 commented Feb 11, 2024

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).

@theComputeKid
Copy link
Contributor

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

nickclark2016 pushed a commit that referenced this issue Feb 12, 2024
CUDA support has been queried multiple times (#2168, #1898 etc.). I have been maintaining this module for quite some time, so listing it here would let people use CUDA with Visual Studio (and on Linux).

Signed-off-by: thecomputekid <thecomputekid@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants