Developer Guide for Intel® SDK for OpenCL™ Applications 2017
                    
                        ID
                        773042
                    
                
                
                    Date
                    10/22/2018
                
                
                    Public
                
            A newer version of this document is available. Customers should click here to go to the newest version.
                        
                        
                            
                            
                                Legal Information
                            
                        
                            
                            
                                Getting Help and Support
                            
                        
                            
                            
                                Introducing the Intel® SDK for OpenCL™ Applications
                            
                        
                            
                            
                                What's New in This Release
                            
                        
                            
                            
                                Which Version of the Intel® SDK for OpenCL™ Applications Should I Use?
                            
                        
                            
                                Intel® Code Builder for OpenCL™ API Plug-in for Microsoft Visual Studio*
                            
                            
                        
                            
                                Intel® Code Builder for OpenCL™ API Plug-in for Eclipse*
                            
                            
                        
                            
                                Debugging OpenCL™ Kernels on GPU
                            
                            
                        
                            
                                Intel® SDK for OpenCL™ Applications Standalone Version
                            
                            
                        
                            
                            
                                OpenCL™ 2.1 Development Environment
                            
                        
                            
                            
                                Intel® FPGA Emulation Platform for OpenCL™ Getting Started Guide
                            
                        
                            
                                Troubleshooting Intel® SDK for OpenCL™ Applications Issues
                            
                            
                        
                    
                
                                                
                                                
                                                    
                                                    
                                                        Configuring Microsoft Visual Studio* IDE
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Converting an Existing Project into an OpenCL™ Project
                                                    
                                                    
                                                
                                                    
                                                        OpenCL™ New Project Wizard
                                                    
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Building an OpenCL™ Project
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Using OpenCL™ Build Properties
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Selecting a Target OpenCL™ Device
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Generating and Viewing Assembly Code
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Generating and Viewing LLVM Code
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Generating Intermediate Program Binaries with Intel® Code Builder for OpenCL™ API Plug-in
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Configuring OpenCL™ Build Options
                                                    
                                                    
                                                
                                            
                                        Generating a Session from an OpenCL™ Application
The Generate Session feature enables you to generate a Kernel Development Framework session from an existing working executable file of an application that uses OpenCL™ APIs. This enables you to rerun a single kernel.
To create a Kernel Development Framework Session:
- In Microsoft* Visual Studio*, go to Tools > Intel Code Builder for OpenCL API > OpenCL Kernel Development > Generate Session.
- Select an application and its working directory.
-  Optionally, you can configure the following: 
    - Add application arguments in the Arguments field
- Change the output directory of the created sessions in the Output Directory field.
- Set the number of configurations generated per kernel in the Number of instance per NDRange. By default, this is set to 1. In this case if there is more than one instance of NDRange with the same global and local workgroup sizes, only one configuration is created.
- Load the created sessions to the Kernel Development Framework. By default, this checkbox is checked.
 
Session Generator Features
- The Session Generator generates regular Kernel Development Framework sessions. It records any data needed to rerun the kernels: *.cl input file, build option, device selection (CPU/GPU), assigned arguments and their data, global/local group sizes, target architecture (32/64 bit).
- The created variables are saved locally within the session.
- Every use of clBuildProgram API in the application creates a unique session file.
- Programs that are not used in the application do not create a session file.
- Every use of clEnqueueNDRangeKernel API in the application creates a kernel configuration (see Creating a New Analysis Configuration section).