Hi Freddie, Freddie Witherden <[email protected]> writes: > Recently I have been playing around with OpenCL on the Intel Xeon Phi. > A quirk of the OpenCL stack (which also applies to the Intel CPU > stack) is that the compiler is extremely chatty. Running a simple > axpy kernel gives: > > /usr/local/lib/python2.7/site-packages/pyopencl/__init__.py:57: > Build on <pyopencl.Device 'Intel(R) Many Integrated Core Acceleration > Card' on 'Intel(R) OpenCL' at 0x1a207d8> succeeded, but said: > > Compilation started > Compilation done > Linking started > Linking done > Build started > Kernel <sum> was successfully vectorized > Done. > warn(text, CompilerWarning) > /usr/local/lib/python2.7/site-packages/pyopencl/__init__.py:57: > CompilerWarning: From-binary build succeeded, but resulted in > non-empty logs: > Build on <pyopencl.Device 'Intel(R) Many Integrated Core Acceleration > Card' on 'Intel(R) OpenCL' at 0x1a207d8> succeeded, but said: > > Linking started > Linking done > Build started > Kernel <sum> was successfully vectorized > Done. > warn(text, CompilerWarning) > > I am not sure the best way to handle this; PyOpenCL does not appear to > expose an API for programmatic control over if these 'warnings' are > generated. It is of course possible to sink the output but this does > not help us to decide if a genuine warning has been generated or not > (which are absolutely of interest and should be displayed).
There's the current scheme of /home/andreas/src/pyopencl/pyopencl/__init__.py:61: CompilerWarning: Non-empty compiler output encountered. Set the environment variable PYOPENCL_COMPILER_OUTPUT=1 to see more. "to see more.", CompilerWarning) which is shown exactly once per program run. IIRC, I introduced this because the Intel CL compiler is chatty on CPUs, too. You can set that environment variable to control compiler chattiness. You could conceivably also set the environment variable programmatically. Does this do what you want? If not, what behavior would you like? Andreas
pgpqAPdvQkPPH.pgp
Description: PGP signature
_______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
