OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1718 Discussions

clFFT on Intel Processor Graphics and Windows?

Colin_Reinhardt
Beginner
1,063 Views

Has anyone successfully used the open-source clFFT libraries (https://github.com/clMathLibraries/clFFT)

with a recent Intel Processor Graphics device (gen8/9), on Windows 10, with Visual Studio 2015/17 and Intel OpenCL SDK 2015/17?

I am trying to do it and wondering about any advice on setup/configuration of the dev environment/system from your experiences,

such as: will using the pre-compiled Windows/x64 binaries etc (clFFT.dll, clFFT.lib, clFFT.h) work,

or do we have to do the whole CMake build process ourselves?

Thanks, Colin

0 Kudos
3 Replies
Ben_A_Intel
Employee
1,063 Views

It's been a while, but I did get this to work about a year or so ago.  It looks like I built from source and didn't use pre-compiled binaries.  My project was CMake-based already and I don't see that I had to do anything fancy to add clFFT to the build, but like I said, it's been a while. :-)

Copying a few relevant parts of my CMakeLists.txt below, in case it's helpful:

add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/clFFT/src)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/third_party/clFFT/src/include )
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/third_party/clFFT/src/include )

target_link_libraries( ${TARGET_NAME} clFFT {other_libs_go_here} )

 

 

0 Kudos
wang__shu
Beginner
1,063 Views

Hello,

I tried an example of clfft on Intel Core M3 based laptop (I know it is extremely outdated) and received the error below. Any clue?

 

clFFT/src/examples/build$ make
[ 16%] Linking C executable examples/fft2d
/usr/bin/ld: CMakeFiles/example_examples_fft2d.dir/fft2d.c.o: undefined reference to symbol 'clGetPlatformIDs@@OPENCL_1.0'
//usr/lib/x86_64-linux-gnu/libOpenCL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/example_examples_fft2d.dir/build.make:94: recipe for target 'examples/fft2d' failed
make[2]: *** [examples/fft2d] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/example_examples_fft2d.dir/all' failed
make[1]: *** [CMakeFiles/example_examples_fft2d.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

 

0 Kudos
Ben_A_Intel
Employee
1,063 Views

wang, shu wrote:

I tried an example of clfft on Intel Core M3 based laptop (I know it is extremely outdated) and received the error below. Any clue?

Hello, were you able to resolve this problem?  If not, it looks like there was an issue detecting your OpenCL library to link with when your Makefile was generated.  It might be helpful to see what CMake commands you are issuing to generate your Makefiles.  I just tried this and it seemed to work:

cd <clFFT directory>
mkdir build && cd build
cmake ../src
make -j4

This should build clFFT and the examples.  If all goes well you should see lines like the following when your Makefiles are generated:

-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - found
-- Found OpenCL: /opt/intel/intel-opencl-1.2-6.2.0.1760/opencl-sdk/lib64/libOpenCL.so (found version "2.0") 

Hope this helps!

0 Kudos
Reply