This project is read-only.

CUDAfy error: No suitable PTX present in Cudafy module.

Aug 21, 2012 at 6:24 AM
Edited Aug 22, 2012 at 4:52 AM

Hi there!

I have some problems running CUDAfy application.

I have:

  1. GeForce GTS250 with 1.1 compute architecture
  2. Windows 7 x64 Ultimate
  3. VS 2010 x86 Ultimate
  4. CUDAfy v1.9
  5. CUDA Toolkit 4.2.9 x86 and x32
  6. Nsight Parallel Visual Studio Edition 2.2 x64
  7. nVidia devdrivers v301.42

Application properties:

  1. Configuration - Active (Debug)
  2. Platform - Active (x86)

Code snippet:

_CUDAmodule = CudafyTranslator.Cudafy(ePlatform.x86, eArchitecture.sm_11);

//Parallel Nsight debug
if (_CUDAmodule.CompilerOptionsList.Count == 0)
{                         _CUDAmodule.CompilerOptionsList.Add(NvccCompilerOptions.Createx86());                   _CUDAmodule.CompilerOptionsList[0].GenerateDebugInfo = true;
_CUDAmodule.Compile(eGPUCompiler.CudaNvcc);
_CUDAmodule.Serialize();
}

_GPU = CudafyHost.GetDevice(eGPUType.Cuda, 0);
_GPU.LoadModule(_CUDAmodule);
int[] c = new int[1];
int[] _dev_c = _GPU.Allocate(c.Length);
_GPU.Launch().summ(2, 4, _dev_c);
_GPU.CopyFromDevice(_dev_c, c);
_GPU.FreeAll();

After compilation and running I have an error: "No suitable PTX present in Cudafy module".

Any solutions?

Thank you.

Aug 21, 2012 at 9:42 PM

Is summ a dynamic expression?  I normally use an entry point to an existing method decorated with the CUDAFY attribute.

-Dan

Aug 22, 2012 at 4:54 AM
Edited Aug 22, 2012 at 4:55 AM
DanRosanova wrote:

Is summ a dynamic expression?  I normally use an entry point to an existing method decorated with the CUDAFY attribute.

-Dan

Here is code snippet of method:

        [Cudafy]
        public int[] summ(GThread thread, int a, int b, int[] c)
        {
            c[0] = a + b;
            return c;
        }

What is the problem in it? Thx.

Aug 22, 2012 at 9:23 AM

Is your application 32-bit or 64-bit?  I see you have Windows 7 64-bit, so if target is x86 or Any then you need to set platform correctly.

Nick

Aug 22, 2012 at 9:50 AM
NickKopp wrote:

Is your application 32-bit or 64-bit?  I see you have Windows 7 64-bit, so if target is x86 or Any then you need to set platform correctly.

Nick

Thank you, Nick.

I tried to change platform in my application, but there was the same error - "No suitable PTX present in Cudafy module". I dont know what to do...

Aug 22, 2012 at 6:47 PM

Can you post the generated *.cdfy file?

Aug 23, 2012 at 4:20 AM
Edited Aug 23, 2012 at 4:46 AM
NickKopp wrote:

Can you post the generated *.cdfy file?

Sure. Here it is:

<?xml version="1.0" encoding="utf-8"?>
<CudafyModule Version="1.9.4495.35683" Name="cuDDevice" DebugInfo="false" HasCudaSourceCode="true" HasPTX="true">
  <CudaSourceCode>DQovLyBjdURGVC5jdURGVEdQVS5jdURGVERldmljZQ0KZXh0ZXJuICJDIiBfX2dsb2JhbF9fIHZvaWQgc3VtbShpbnQgYSwgaW50IGIsIGludCogYywgaW50IGNMZW4wKTsNCg0KLy8gY3VERlQuY3VERlRHUFUuY3VERlREZXZpY2UNCmV4dGVybiAiQyIgX19nbG9iYWxfXyB2b2lkIHN1bW0oaW50IGEsIGludCBiLCBpbnQqIGMsIGludCBjTGVuMCkNCnsNCgljWygwKV0gPSBhICsgYjsNCn0NCg==</CudaSourceCode>
  <PTXMODULE Platform="x86">
    <PTX>CS52ZXJzaW9uIDEuNA0KCS50YXJnZXQgc21fMTEsIG1hcF9mNjRfdG9fZjMyDQoJLy8gY29tcGlsZWQgd2l0aCBDOlxQcm9ncmFtIEZpbGVzXE5WSURJQSBHUFUgQ29tcHV0aW5nIFRvb2xraXRcQ1VEQVx2NC4yXGJpbi8uLi9vcGVuNjQvbGliLy9iZS5leGUNCgkvLyBudm9wZW5jYyA0LjEgYnVpbHQgb24gMjAxMi0wNC0wNw0KDQoJLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KCS8vIENvbXBpbGluZyBDOi9Vc2Vycy9MU0MyNS9BcHBEYXRhL0xvY2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g0KCS5maWxlCTI4CSJjOlxwcm9ncmFtIGZpbGVzXG52aWRpYSBncHUgY29tcHV0aW5nIHRvb2xraXRcY3VkYVx2NC4yXGluY2x1ZGVcbWF0aF9mdW5jdGlvbnNfZGJsX3B0eDEuaCINCg0KDQoJLmVudHJ5IHN1bW0gKA0KCQkucGFyYW0gLnMzMiBfX2N1ZGFwYXJtX3N1bW1fYSwNCgkJLnBhcmFtIC5zMzIgX19jdWRhcGFybV9zdW1tX2IsDQoJCS5wYXJhbSAudTMyIF9fY3VkYXBhcm1fc3VtbV9jLA0KCQkucGFyYW0gLnMzMiBfX2N1ZGFwYXJtX3N1bW1fY0xlbjApDQoJew0KCS5yZWcgLnUzMiAlcjw2PjsNCgkubG9jCTE1CTYJMA0KJExEV2JlZ2luX3N1bW06DQoJLmxvYwkxNQk4CTANCglsZC5wYXJhbS5zMzIgCSVyMSwgW19fY3VkYXBhcm1fc3VtbV9hXTsNCglsZC5wYXJhbS5zMzIgCSVyMiwgW19fY3VkYXBhcm1fc3VtbV9iXTsNCglhZGQuczMyIAklcjMsICVyMSwgJXIyOw0KCWxkLnBhcmFtLnUzMiAJJXI0LCBbX19jdWRhcGFybV9zdW1tX2NdOw0KCXN0Lmdsb2JhbC5zMzIgCVslcjQrMF0sICVyMzsNCgkubG9jCTE1CTkJMA0KCWV4aXQ7DQokTERXZW5kX3N1bW06DQoJfSAvLyBzdW1tDQoNCg==</PTX>
  </PTXMODULE>
  <Functions>
    <CudafyKernelMethod Name="summ" Type="Global" IsDummy="false">
      <Type>cuD.cuDGPU.cuDDevice</Type>
      <Assembly>cuDFT, Version=0.0.0.1, Culture=neutral, PublicKeyToken=null</Assembly>
      <AssemblyName>cuD</AssemblyName>
      <AssemblyPath>C:\Users\LSC25\Documents\Visual Studio 2010\Projects\cuD\cuD\bin\Debug\cuD.exe</AssemblyPath>
      <Checksum>3734407828</Checksum>
      <Parameters>
        <ReturnType>System.Void</ReturnType>
        <Parameter Type="Cudafy.GThread" Name="thread" Position="0" />
        <Parameter Type="System.Int32" Name="a" Position="1" />
        <Parameter Type="System.Int32" Name="b" Position="2" />
        <Parameter Type="System.Int32[]" Name="c" Position="3" />
      </Parameters>
    </CudafyKernelMethod>
  </Functions>
  <Constants />
  <Types />
</CudafyModule>

Thank you.

Aug 23, 2012 at 7:17 AM
Edited Aug 23, 2012 at 8:37 AM

Thx for your help! I found a solution.

I set up final platform in my project file (not in the solution) to x86. Now my CUDAfy block looks like:

CUDAmodule = CudafyTranslator.Cudafy(ePlatform.Auto, eArchitecture.sm_11, typeof(cuDlib));
_GPU = CudafyHost.GetDevice(eGPUType.Cuda, 0);
_GPU.LoadModule(_CUDAmodule);

So, I have one more question. After the compilation here are some generated files by CUDAfy library. I mean "CUDAFYSOURCETEMP.cu", "CUDAFYSOURCETEMP.ptx", etc. How can I delete them? I don't want to see CUDA source code in the program folder. I know that CUDAfy.dll contains CudafyTranslator.CompilerOptionsList. Could I use it to delete temporary files was generated by CUDAfy?

Thank you!

Aug 23, 2012 at 1:56 PM

Yes I believe there is an option flag that can be set to delete temp files.  An alternative is to set working directory to say an application folder.

Aug 24, 2012 at 5:15 AM

Thank you, Nick!

Would you give code snippet for example? Both ways, please.