Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8877455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:28:22+00:00 2026-06-14T19:28:22+00:00

I am doing gpgpu programming in windows and I have been doing that in

  • 0

I am doing gpgpu programming in windows and I have been doing that in Microsoft visual studio 2010. But for some reason I need to use matlab to run my cuda kernels. So I was checking this site and they have mentioned that I need to create a .ptx from .cu file to run my cuda kernels. But I am using windows and I want to create the .ptx file in windows. It would be really helpful if anyone could guide me know how to convert a .cu file to .ptx file. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:28:23+00:00Added an answer on June 14, 2026 at 7:28 pm

    One approach is to do this from the command line. You may need to know the location of nvcc.exe as well as cl.exe (the MS VC compiler). In my case I have MS VC 2008 express installed, and cl.exe is located at C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe I also have CUDA 4.2 on this particular machine, and nvcc is located at C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\nvcc.exe You can probably also use windows search to find these.

    With the above information, open a command prompt, and change directory to the .cu file (let’s call it foo.cu) that you want to convert to PTX. nvcc may already be on your PATH, so you may not have to use it’s path:

    <path-to-nvcc>nvcc -ptx -ccbin "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin" -o foo.ptx foo.cu 
    

    You can put the path to cl.exe on your PATH variable to simplify the above (should be able to eliminate the -ccbin switch that way.) To get more info about nvcc options, use:

    nvcc --help
    

    If your program needs additional include files beyond what nvcc knows about, you’ll have to specify the path to those as well using the -I switch. Review the nvcc options for more info.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Doing a small project I have received some Java code that I should rewrite
Doing some code reviews lately I came across a number of classes that have
I'm doing some GPGPU programming with OpenGL. I want to be able to write
Doing some jquery animation. I have certain divs set up with an attribute of
I'm doing some research on GPGPU and currently struggle with the question what Tesla
Doing some code reading and stumbled upon this snippet that I haven't seen before:
Doing a custom Tumblr theme that will have a mix of the usual Tumblr
I am doing some gpgpu calculations with GL and want to read my results
Doing some work in javascript I have a multidimensional made up in this format
Doing so select name from sqlite_master where type='table' but I need to display all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.