OptiX MFC wizard
I have downloaded Optix 4.0, I am working with CUDA 9.0, My problem is that I dont have an OPTIX wizard when I select a new project in Visual STudio 2015. It is also informed that samples of Optix Sdk are successfully running. Is there a wizard to create a MFC application supporting OptiX? Any help would be appreciated. Thanks
I have downloaded Optix 4.0, I am working with CUDA 9.0, My problem is that I dont have an OPTIX wizard when I select a new project in Visual STudio 2015.

It is also informed that samples of Optix Sdk are successfully running.

Is there a wizard to create a MFC application supporting OptiX?

Any help would be appreciated.
Thanks

#1
Posted 12/06/2017 02:24 PM   
Please note that OptiX 4.1.1 is the latest available version at this time. If you're using a 4.0.x version it's recommended to update to the latest 4.1.1 version. CUDA 9.0 is not officially supported by any OptiX 4 version. It's recommended to use the CUDA 8.0 toolkit with those. As far as I know there is no MFC Wizard included since some time. But that shouldn't deter you from using OptiX. All you need would be the OptiX library and include folder and the CUDA Visual Studio integration to be able to translate your OptiX CUDA device code for the different program domains to PTX source code. You could also add a custom build step which calls the CUDA compiler nvcc with the proper command line options. Those command line options normally contain [b]machine=64[/b], [b]compute_30[/b], [b]use_fast_math[/b], [b]relocatable-device-code=true[/b] and most importantly [b]ptx[/b] to just generate PTX source code and no [b]-g[/b] or [b]-G[/b] options for debug code.
Please note that OptiX 4.1.1 is the latest available version at this time.
If you're using a 4.0.x version it's recommended to update to the latest 4.1.1 version.

CUDA 9.0 is not officially supported by any OptiX 4 version. It's recommended to use the CUDA 8.0 toolkit with those.

As far as I know there is no MFC Wizard included since some time. But that shouldn't deter you from using OptiX.
All you need would be the OptiX library and include folder and the CUDA Visual Studio integration to be able to translate your OptiX CUDA device code for the different program domains to PTX source code.
You could also add a custom build step which calls the CUDA compiler nvcc with the proper command line options.
Those command line options normally contain machine=64, compute_30, use_fast_math, relocatable-device-code=true and most importantly ptx to just generate PTX source code and no -g or -G options for debug code.

#2
Posted 12/06/2017 03:35 PM   
Hi, Detlef Roettger, Thanks for your guidance. Is there any specification about how to create a MFC or CUDA runtime application using Optix? Thanks.
Hi, Detlef Roettger,
Thanks for your guidance.

Is there any specification about how to create a MFC or CUDA runtime application using Optix?

Thanks.

#3
Posted 12/07/2017 09:20 AM   
I'm not sure what exactly you're asking for. What's your experience level with MFC? MFC is just another framework to write applications. If you know how to write an MFC application from scratch, and as a bonus use some graphics API like OpenGL for rendering, there shouldn't be a problem to add OptiX specific code to such an application. In the end all you need to do is to react on the various window messages and handle them as you like. Everything else is framework agnostic. Building CUDA applications with Visual Studio is explained inside the CUDA documentation. [url]http://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html[/url] [url]http://docs.nvidia.com/cuda/cuda-quick-start-guide/index.html#windows[/url] For OptiX the *.cu compilation settings are different because you only translate *.cu to *.ptx files and not actual binary code and you normally don't need any of the CUDA runtimes. I haven't used MFC in years, but to get a working MFC project you just click something together inside the Visual Studio IDE as you need it and then add your customized code which actually does something useful. To add OptiX you would need to add the necessary OptiX and CUDA include paths to the compiler options, add the optix.1.lib to the linker inputs, and if you have the CUDA Visual Studio integration installed, make sure all *.cu CUDA source files which implement the OptiX domain specific programs are translated to PTX source code given the nvcc command line options described earlier. Or again, write a small batch file with the proper nvvc command line (which can be tested and used independently of the project) and add that as custom build step.
I'm not sure what exactly you're asking for. What's your experience level with MFC?

MFC is just another framework to write applications. If you know how to write an MFC application from scratch, and as a bonus use some graphics API like OpenGL for rendering, there shouldn't be a problem to add OptiX specific code to such an application.
In the end all you need to do is to react on the various window messages and handle them as you like. Everything else is framework agnostic.

Building CUDA applications with Visual Studio is explained inside the CUDA documentation.
http://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html
http://docs.nvidia.com/cuda/cuda-quick-start-guide/index.html#windows

For OptiX the *.cu compilation settings are different because you only translate *.cu to *.ptx files and not actual binary code and you normally don't need any of the CUDA runtimes.

I haven't used MFC in years, but to get a working MFC project you just click something together inside the Visual Studio IDE as you need it and then add your customized code which actually does something useful.
To add OptiX you would need to add the necessary OptiX and CUDA include paths to the compiler options, add the optix.1.lib to the linker inputs, and if you have the CUDA Visual Studio integration installed, make sure all *.cu CUDA source files which implement the OptiX domain specific programs are translated to PTX source code given the nvcc command line options described earlier.
Or again, write a small batch file with the proper nvvc command line (which can be tested and used independently of the project) and add that as custom build step.

#4
Posted 12/07/2017 11:11 AM   
Detlef Roettger, Thanks for your reply. (1)"To add OptiX you would need to add the necessary OptiX and CUDA include paths to the compiler options, add the optix.1.lib to the linker inputs,” I am familiar with MFC, but I do not know Which paths and input libraries are necessary in order to use CUDA and OptiX. Is there any introduction about this in detailed? I know I can learn it from the samples. (2) “and if you have the CUDA Visual Studio integration installed, make sure all *.cu CUDA source files which implement the OptiX domain specific programs are translated to PTX source code given the nvcc command line options described earlier." I have CUDA Visual Studio integration installed, but I don't understand this statement. Do you mean, “You could also add a custom build step which calls the CUDA compiler nvcc with the proper command line options.Those command line options normally contain machine=64, compute_30, use_fast_math, relocatable-device-code=true and most importantly ptx to just generate PTX source code and no -g or -G options for debug code.” But how can I do this? (3)” Or again, write a small batch file with the proper nvvc command line (which can be tested and used independently of the project) and add that as custom build step.” Can you give me some document links about this? Thanks for your continuous guidance. Best regards.
Detlef Roettger, Thanks for your reply.
(1)"To add OptiX you would need to add the necessary OptiX and CUDA include paths to the compiler options, add the optix.1.lib to the linker inputs,”
I am familiar with MFC, but I do not know Which paths and input libraries are necessary in order to use CUDA and OptiX. Is there any introduction about this in detailed? I know I can learn it from the samples.
(2) “and if you have the CUDA Visual Studio integration installed, make sure all *.cu CUDA source files which implement the OptiX domain specific programs are translated to PTX source code given the nvcc command line options described earlier."
I have CUDA Visual Studio integration installed, but I don't understand this statement. Do you mean, “You could also add a custom build step which calls the CUDA compiler nvcc with the proper command line options.Those command line options normally contain machine=64, compute_30, use_fast_math, relocatable-device-code=true and most importantly ptx to just generate PTX source code and no -g or -G options for debug code.”
But how can I do this?
(3)” Or again, write a small batch file with the proper nvvc command line (which can be tested and used independently of the project) and add that as custom build step.”
Can you give me some document links about this?

Thanks for your continuous guidance.
Best regards.

#5
Posted 12/09/2017 09:13 AM   
Because the samples in SDK 4.1.1 are build through command line. for example, The optiXHello sample, draw_color.cu is build by custom build and all the build configurations is done by written files. It is too difficult to follow it for me. I want to get a sample using visual studio IDE. Is it available and can it get by web? Thanks very much.
Because the samples in SDK 4.1.1 are build through command line. for example, The optiXHello sample, draw_color.cu is build by custom build and all the build configurations is done by written files.
It is too difficult to follow it for me.

I want to get a sample using visual studio IDE. Is it available and can it get by web?

Thanks very much.

#6
Posted 12/10/2017 02:18 AM   
Scroll To Top

Add Reply