<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/clintercept/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/clintercept/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 11 May 2013 23:01:15 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/clintercept/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/clintercept/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;strong&gt;To build the library:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;git clone git://git.code.sf.net/p/clintercept/code clintercept&lt;br /&gt;
cd clintercept&lt;br /&gt;
git clone git://gitorious.org/findopencl/findopencl FindOpenCL&lt;br /&gt;
mkdir xcode&lt;br /&gt;
cd xcode&lt;br /&gt;
cmake -G Xcode ..&lt;br /&gt;
xcodebuild -project CLIntercept.xcodeproj -target ALL_BUILD -configuration Debug build&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To use the library:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Window:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Copy OpenCL.dll and CLInterceptConfig.txt next to the application.&lt;br /&gt;
Edit the options in CLInterceptConfig.txt, especially the log file location.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Mac OS X:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Override DYLD_INSERT_LIBRARIES to the dylib's path and set any options in the environment.&lt;br /&gt;
You may also specify option in CLInterceptConfig.txt.&lt;br /&gt;
Logging will use NSLog by default, but a log file can be specified.&lt;/p&gt;
&lt;p&gt;DYLD_INSERT_LIBRARIES=/my/install/path/libCLIntercept.dylib CLINT_CHECK_ALL=1 ./clinfo&lt;/p&gt;
&lt;p&gt;Why is this a dylib not a framework?  If we write a replacement OpenCL framework, we can't&lt;br /&gt;
load the real framework.  We use DYLD_INSERT_LIBRARIES to inject replacement functions,&lt;br /&gt;
and use interposing internally to avoid DYLD_FORCE_FLAT_NAMESPACE.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Linux:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;LD_PRELOAD=/my/install/path/libOpenCL.so LD_LIBRARY_PATH=/my/install/path/ CLINT_CHECK_ALL=1 ./clinfo&lt;/p&gt;
&lt;p&gt;To run the test:&lt;br /&gt;
DYLD_INSERT_LIBRARIES=/my/install/path/libCLIntercept.dylib CLINT_CHECK_ALL=1 CLINT_EMBEDDED=1 ./test_clint all&lt;/p&gt;
&lt;p&gt;Yes, it does print errors.  That's intentional because these are illegal kernels or OpenCL calls.&lt;br /&gt;
It shouldn't crash.  Note that you must enable CLIntercept to run this test.  It checks for this,&lt;br /&gt;
because your OpenCL driver won't catch these mistakes and it may crash your display or worse.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Unimplemented:&lt;/strong&gt;&lt;br /&gt;
Kernel bounds checking is not implemented.  This would require a full OpenCL source code parser and preprocessor.&lt;br /&gt;
CLINT_CHECK_THREAD should detect cases where an object is referenced by a second thread before associated OpenCL commands have finished.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;CLINT_CONFIG_FILE &lt;br /&gt;
Read configuration settings from .&lt;/p&gt;
&lt;p&gt;CLINT_LOG_FILE &lt;br /&gt;
Write to  instead of standard error or NSLog.   can also be 1 or stdout,&lt;br /&gt;
or 2 or stderr.&lt;/p&gt;
&lt;p&gt;CLINT_TRACE&lt;br /&gt;
Log all OpenCL calls.&lt;/p&gt;
&lt;p&gt;CLINT_ERRORS&lt;br /&gt;
Log all OpenCL errors.&lt;/p&gt;
&lt;p&gt;CLINT_ABORT&lt;br /&gt;
Call abort() when any error is detected.&lt;/p&gt;
&lt;p&gt;CLINT_INFO&lt;br /&gt;
Log platform and device information during startup.&lt;/p&gt;
&lt;p&gt;CLINT_PROFILE&lt;br /&gt;
Profile all kernel execution and log the results.&lt;/p&gt;
&lt;p&gt;CLINT_PROFILE_ALL&lt;br /&gt;
Profile all expensive calls and log the results.  This will wait on events and affect&lt;br /&gt;
performance.&lt;/p&gt;
&lt;p&gt;CLINT_TRACK&lt;br /&gt;
Track all OpenCL objects.  This can discover when a previously released object is used.&lt;br /&gt;
Most of these options (other than logging) will turn this on.&lt;/p&gt;
&lt;p&gt;CLINT_ZOMBIES&lt;br /&gt;
Remember information about previously released objects.&lt;/p&gt;
&lt;p&gt;CLINT_LEAKS&lt;br /&gt;
Report any leaked objects at exit or when the last context is released.&lt;/p&gt;
&lt;p&gt;CLINT_STACK_LOGGING&lt;br /&gt;
Record the program's call stack during object allocation.&lt;/p&gt;
&lt;p&gt;CLINT_CHECK_THREAD&lt;br /&gt;
Check for thread safety.  All calls are thread-safe except clSetKernelArg with the same&lt;br /&gt;
cl_kernel.  OpenCL 1.2 Specification, A.2.&lt;/p&gt;
&lt;p&gt;CLINT_STRICT_THREAD&lt;br /&gt;
Check for OpenCL 1.0 thread safety.  Only calls that create, retain, and retain objects are&lt;br /&gt;
thread-safe.  OpenCL 1.0 Specification, A.2.&lt;/p&gt;
&lt;p&gt;CLINT_CHECK_MAPPING&lt;br /&gt;
Allocate intermediate memory buffers when mapping images or buffers.  This can help&lt;br /&gt;
detect buffer overwrites and allow other bounds checking tools to detect errors.&lt;br /&gt;
="protect"&lt;br /&gt;
Enforce read-only and write-only mappings, but without guard pages.  Write-only can only&lt;br /&gt;
be enforced on systems that support PROT_WRITE in mmap() without PROT_READ.&lt;br /&gt;
(Windows does not support write-only.)&lt;br /&gt;
="guard"&lt;br /&gt;
The intermediate buffer will be aligned to the end of a page and followed by a guard page.&lt;br /&gt;
This is the default.&lt;br /&gt;
="guard_before"&lt;br /&gt;
Add guard pages before and after the intermediate buffer.  A gap of up to a page will&lt;br /&gt;
be preset between the buffer and the last guard page.&lt;br /&gt;
="malloc"&lt;br /&gt;
Allocate using malloc() to avoid interfering with other memory debugging tools.&lt;/p&gt;
&lt;p&gt;CLINT_CHECK_ACQUIRE&lt;br /&gt;
Detect errors when sharing OpenGL or D3D objects.  Note that we only intercept OpenCL calls,&lt;br /&gt;
so synchronization is not checked.  OpenCL 1.2 Extension Specification, section 9.6.6.&lt;/p&gt;
&lt;p&gt;CLINT_CHECK_BOUNDS&lt;br /&gt;
&lt;strong&gt; Currently unimplemented &lt;/strong&gt;&lt;br /&gt;
Modify kernel source to allow memory bounds checking.  This won't work with binaries.&lt;/p&gt;
&lt;p&gt;CLINT_CHECK_ALL&lt;br /&gt;
Enable the following options:&lt;br /&gt;
CLINT_CHECK_THREAD, CLINT_CHECK_MAPPING, CLINT_CHECK_ACQUIRE, CLINT_CHECK_BOUNDS.&lt;/p&gt;
&lt;p&gt;CLINT_EMBEDDED&lt;br /&gt;
Enforce the minimum embedded profile requirements.&lt;br /&gt;
CL_PLATFORM_PROFILE and CL_DEVICE_PROFILE are set to EMBEDDED_PROFILE.&lt;br /&gt;
64-bit integers are supported unless cles_khr_int64 is disabled.&lt;br /&gt;
3D images are not supported.&lt;br /&gt;
read_imagef and read_imageh don't support CL_FILTER_LINEAR for CL_FLOAT or CL_HALF_FLOAT.&lt;br /&gt;
__EMBEDDED_PROFILE__ is defined.&lt;br /&gt;
The compiler is still available.&lt;br /&gt;
No other changes are made.&lt;br /&gt;
OpenCL 1.2 Extension Specification, section 10.&lt;/p&gt;
&lt;p&gt;CLINT_DISABLE_IMAGE&lt;br /&gt;
Remove CL_DEVICE_IMAGE_SUPPORT.&lt;br /&gt;
The following queries will return zero:&lt;br /&gt;
  CL_DEVICE_IMAGE_SUPPORT&lt;br /&gt;
  CL_DEVICE_MAX_READ_IMAGE_ARGS&lt;br /&gt;
  CL_DEVICE_MAX_WRITE_IMAGE_ARGS&lt;br /&gt;
  CL_DEVICE_IMAGE2D_MAX_WIDTH&lt;br /&gt;
  CL_DEVICE_IMAGE2D_MAX_HEIGHT&lt;br /&gt;
  CL_DEVICE_IMAGE3D_MAX_WIDTH&lt;br /&gt;
  CL_DEVICE_IMAGE3D_MAX_HEIGHT&lt;br /&gt;
  CL_DEVICE_IMAGE3D_MAX_DEPTH&lt;br /&gt;
  CL_DEVICE_IMAGE_MAX_BUFFER_SIZE&lt;br /&gt;
  CL_DEVICE_IMAGE_MAX_ARRAY_SIZE&lt;br /&gt;
  CL_DEVICE_MAX_SAMPLERS&lt;br /&gt;
The following functions will return CL_INVALID_OPERATION:&lt;br /&gt;
  clCreateImage&lt;br /&gt;
  clCreateImage2D&lt;br /&gt;
  clCreateImage3D&lt;br /&gt;
  clGetImageInfo&lt;br /&gt;
  clEnqueueReadImage&lt;br /&gt;
  clEnqueueWriteImage&lt;br /&gt;
  clEnqueueFillImage&lt;br /&gt;
  clEnqueueCopyImage&lt;br /&gt;
  clEnqueueCopyImageToBuffer&lt;br /&gt;
  clEnqueueCopyBufferToImage&lt;br /&gt;
  clEnqueueMapImage&lt;br /&gt;
  clCreateFromGLTexture&lt;br /&gt;
  clCreateFromGLTexture2D&lt;br /&gt;
  clCreateFromGLTexture3D&lt;br /&gt;
  clGetGLTextureInfo&lt;br /&gt;
  clCreateFromD3D10Texture2DKHR&lt;br /&gt;
  clCreateFromD3D10Texture3DKHR&lt;br /&gt;
  clCreateFromD3D11Texture2DKHR&lt;br /&gt;
  clCreateFromD3D11Texture3DKHR&lt;br /&gt;
clGetSupportedImageFormats is not disabled.&lt;/p&gt;
&lt;p&gt;CLINT_DISABLE_EXTENSION &lt;br /&gt;
Remove  from the extension list.  Most behavior is not enforced.&lt;/p&gt;
&lt;p&gt;CLINT_FORCE_DEVICE &lt;br /&gt;
Only  will appear to the application.  OpenGL or D3D sharing, however, may still&lt;br /&gt;
select a different device.   may also be one of the CL_DEVICE_TYPE values.&lt;br /&gt;
The CL_DEVICE_TYPE_ prefix is optional.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Garrick Meeker</dc:creator><pubDate>Sat, 11 May 2013 23:01:15 -0000</pubDate><guid>https://sourceforge.net3ff6babfd67eb7e478f45d584e7c7c3f23fd9399</guid></item><item><title>Home modified by Garrick Meeker</title><link>https://sourceforge.net/p/clintercept/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Welcome to your wiki!&lt;/p&gt;
&lt;p&gt;This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: &lt;span&gt;[SamplePage]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The wiki uses &lt;a class="" href="/p/clintercept/wiki/markdown_syntax/"&gt;Markdown&lt;/a&gt; syntax.&lt;/p&gt;
&lt;p&gt;&lt;h6&gt;Project Members:&lt;/h6&gt;&lt;ul class="md-users-list"&gt;&lt;li&gt;&lt;a href="/u/garrickmeeker/"&gt;Garrick Meeker&lt;/a&gt; (admin)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;p&gt;&lt;span class="download-button-5189ed2e85540d238237bba5" style="margin-bottom: 1em; display: block;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Garrick Meeker</dc:creator><pubDate>Wed, 08 May 2013 06:14:07 -0000</pubDate><guid>https://sourceforge.net6042686470ffc939f3303f93e2e068b6f24eecd6</guid></item></channel></rss>