How to compile with PTX ISA v2.3 support?

When I try to use layered textures(tex2DLayered()), I get the following error “Feature ‘array geometry’ requires PTX ISA .version 2.3 or later”.

I use the toolkit 4.0 which is supposed to meet this requirements. I’m even able to compile the simpleLayeredTexture example form the SDK, but when I compile my code with the tex2DLayered() function I get the error.

I couldn’t find a compiler option to select a version nor did i have different versions of the toolkit installed. So I’m totally clueless what could cause this inconvenience.

For compiling I use CMake with the FindCUDA package.

I would appreciate it, if some one could help me with this problem. Thanks.

As I recall, PTX version 2.x is only used for compute capability 2.x, but not any compute capability 1.x. So if you compile with either -arch=sm_20 or arch=sm_21 (depending on which Fermi-class GPU you have), it should work.

By default the compiler targets compute capability 1.0, and it probably generates PTX version 1.4 for that. If you specifiy the compiler flag -keep, you can inspect the intermediate PTX code (in a file with .ptx suffix). The PTX version is specified via the .version directive in PTX code emitted by the CUDa compiler.

Thanks. Compiling for compute capability 2.x solved the problem.


I have the exact the same question but I am still not clear how to solve it. I use graphics card with 2.0 compute capacity, and I can run the sample code ‘simplelayeredtexture’ in SDK. However, when I compile my own program, it has the error : Feature ‘array geometry’ requires PTX ISA .version 2.3 or later. I use visual studio 2008, cuda 4.0, cmake. The funstion tex2DLayered poses this problem. Also, if I check project->property->CUDA Runtime API->GPU, the GPU Architecture(1) is sm_10, Architecture(2) is sm_20. Even if I change both of them to sm_20, it still does not work.I do not know where the problem is…


Just share my experience with CUDA 5.0:

If using VisualStudio, right click on the .cu file -> Properties, then in the Configuration Properties -> CUDA C/C++ -> Device -> Code Generation, delete the compute_10 and sm_10. Also, there’s a similar property in the project properties configuration, but I’m not sure if that will affect.

If using Nsight(Eclipse), right click on the project -> Properties -> Build -> CUDA, then uncheck all the lower version for Generating PTX code and Generating GPU code.