Feature Request - More build architectures per build

I have already raised this through the feedback (Reference #130411-000017), but I am curious whether anyone else has either hit this issue before or has a quick workaround.

With my development work I need high performance on multiple, unknown at compile time, devices. Selecting the architectures to build against helps this obviously by allowing more modern GPUs to make use of the newer features. Currently this is limited inside VS2008 to selecting 3 architectures to build. I currently select 2.0, 3.0 and 3.5 but obviously that is limiting me to post-2.0 cards and I lose optimisations for 2.1 (and any future architectures …). Is there a quick and dirty way of adding more, or can it be something easily added to the VS2008 build options to select as many (or all) possible architectures accepting that the tradeoff will be higher build times and larger binaries.

Cheers

I believe this may be a CUDA issue so I have moved it to the appropriate forum.

I cannot tell you how to extend build configurations in VS2008 (I do not use pointy-clicky stuff), but there are no restrictions imposed by the CUDA toolchain on the number of architectures specified for a fat binary. For example, in a Makefile I have here I pass the following on the nvcc commandline:

-gencode arch=compute_10,"code=sm_10" -gencode arch=compute_20,"code=sm_20" -gencode arch=compute_30,"code=sm_30" -gencode arch=compute_35,"code=sm_35,compute_35"

This generates SASS (machine code) for sm_10, sm_20, sm_30, and sm_35, as well as PTX for sm_35 to allow forward compatibilitt, i.e. the capability to JIT compile to a future binary architecture.

One option is to just delete the properties in the ‘Code Generation’ field and explicitly specify them in ‘Additional Options’ via Property Pages>Configuration Properties>CUDA C/C++>Command Line>Additional Options.

See the “–generate-code” option in the NVCC doc for how to generate multiple targets at once.

In a quick test on the command line under Linux I had no problem generating an executable with object code for six different architectures, plus PTX code. So I assume this is merely a matter of finding a place in Visual Studio to enter all the build options?

[appears my answer is not only the last, but also the least useful one…]