premake-core icon indicating copy to clipboard operation
premake-core copied to clipboard

Nvidia compiler support

Open abel0b opened this issue 2 years ago • 5 comments

What problem will this solve? Add support for Nvidia HPC C/C++ compiler.

What might be a solution? Add a new toolset adapter for nvidia compiler in https://github.com/premake/premake-core/tree/master/src/tools

Anything else we should know? This is a major compiler in the world of HPC, as is Intel (#227). I can try to make a PR for it.

abel0b avatar May 09 '22 18:05 abel0b

It would definitely be a interesting have, as would ICC. Would this be integrated into the gmake2 exporter?

As an aside, I think the main reason we don't have those is a lack of time from the core team members to maintain more toolsets. Feel free to put in a PR and I'd be happy to review it.

nickclark2016 avatar May 09 '22 19:05 nickclark2016

As an aside, I think the main reason we don't have those is a lack of time from the core team members to maintain more toolsets.

For ICC specifically, I tried to get a copy of it years ago through their FOSS program but I never heard back. On top of that, the interest in support for the compiler just isn't there - that issue was opened 7 years ago and there has been 4? people interested in it but nothing more than interest.

It looks like the Nvidia compiler is at least accessible to the general public without dropping thousands of dollars. However, this should probably start as a module. This is how we've handled all other suggested toolsets and exporters, this shouldn't be any different. I personally find it easier to make a module than to hack into core, it also means that others can pick it up and help you fill in the gaps. Additionally, It makes it easier for us to merge in and out of core - if there's nobody around to maintain it, there's a good chance it will be removed.

samsinsane avatar May 10 '22 11:05 samsinsane

PR opened with a new module adding a nvhpc toolset for C/C++ compilation and it works with gmake2 generator.

It would be nice to have better documentation (or API) for adding custom compiler toolchains and custom languages. I would be interested for CUDA support.

abel0b avatar May 14 '22 06:05 abel0b

There is this module for CUDA support, it looks like alpha12 broke something in it, possibly that it doesn't require "vstudio" or something. You may not be able to use it but it may provide guidance on custom languages, similarly, you can look at the D module in this repo but it adds more than just the D language.

samsinsane avatar May 16 '22 12:05 samsinsane

Feel free to try out my CUDA module, in case I can help:

https://github.com/theComputeKid/premake5-cuda

It is only for Visual Studio for now.

theComputeKid avatar Jan 22 '23 21:01 theComputeKid