In hindsight - given that CUDA 3.1
(http://developer.nvidia.com/object/cuda_3_1_downloads.html) has been
out for a few weeks, couldn't we just delete the warning section in
cuda.hpp about CUDA 3.0 Beta?

I.e. remove all the following in cuda.hpp:

#if (CUDA_VERSION == 3000)
#warning *****************************************************************
#warning **** CUDA 3.0 detected.
#warning **** (Don't worry, that's not in itself bad.)
#warning *****************************************************************
#warning **** PyCUDA assumes that you are using the release (non-beta)
#warning **** version. 3.0 beta will result in compile errors.
#warning **** I apologize, but I have no way of checking whether I am
#warning **** compiling against the beta--Nvidia cleverly changed the
#warning **** API without bumping the version number.
#warning **** You may try undefining CUDAPP_POST_30_BETA in
#warning **** src/cpp/cuda.hpp to get this to work.
#warning *****************************************************************
#endif

i.

On 24 June 2010 14:31, Ian Ozsvald <i...@ianozsvald.com> wrote:
> This follows up on the recent report by Vu Nguyen that cuda.hpp breaks
> with MSVC:
>> c:\pycuda-0.94rc\src\cpp\cuda.hpp(32) :
>> fatal error C1021: invalid preprocessor command 'warning'
>> error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"'
>> failed with exit status 2
>
> I've just moved to new WinXP machine with a GTX 480 (woot!) card with
> CUDA 3.0. Upon compilation I hit the same problem. The issue is that:
> #if (CUDA_VERSION == 3000)
> in cuda.hpp is now active (before I had CUDA 2.3 IIRC) but MSVC
> doesn't like the #warning statements, instead it needs:
> #pragma warning
> http://msdn.microsoft.com/en-us/library/2c8f766e%28VS.71%29.aspx
>
> It looks like the best solution is to use a compiler-specific test:
> #ifdef _MSC_VER
> http://www.mobydisk.com/softdev/techinfo/cpptips.html#cpptip3
> to switch between a "#pragma warning" block or the original "#warning" block.
>
> If anyone knows of a better solution then say now else I'll make a
> simple patch early next week.
>
> i.
> ps. I've also updated the "Windows Installation" wiki page with
> updated version info and dependency package names.
>
> --
> Ian Ozsvald (A.I. researcher, screencaster)
> i...@ianozsvald.com
>
> http://IanOzsvald.com
> http://morconsulting.com/
> http://TheScreencastingHandbook.com
> http://ProCasts.co.uk/examples.html
> http://twitter.com/ianozsvald
>



-- 
Ian Ozsvald (A.I. researcher, screencaster)
i...@ianozsvald.com

http://IanOzsvald.com
http://morconsulting.com/
http://TheScreencastingHandbook.com
http://ProCasts.co.uk/examples.html
http://twitter.com/ianozsvald

_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda

Reply via email to