'include/cuda/cuda.h': Add parts necessary for nvptx-tools 'nvptx-run' (was: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches))

2022-05-18 Thread Thomas Schwinge
Hi! On 2017-01-13T19:11:23+0100, Jakub Jelinek wrote: > cuda.h header included > in this patch In order to be able to use that file without changes for nvptx-tools 'nvptx-run', I've pushed to GCC master branch commit 86f64400a5692499856d41462461327b93f82b8d "'include/cuda/cuda.h': Add parts

'include/cuda/cuda.h': For C++, wrap in 'extern "C"' (was: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches))

2022-05-18 Thread Thomas Schwinge
Hi! On 2017-01-13T19:11:23+0100, Jakub Jelinek wrote: > cuda.h header included > in this patch To make this '#include'able in C++ code, I've pushed to master branch commit bdd1dc1bfbe1492edf3ce5e4288cfbc55be329ab "'include/cuda/cuda.h': For C++, wrap in 'extern "C"'", see attached. Grüße

Re: Move 'libgomp/plugin/cuda/cuda.h' to 'include/cuda/cuda.h' (was: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches))

2022-04-06 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 06, 2022 at 02:39:18PM +0200, Thomas Schwinge wrote: > ... so that it may be used by other projects that inherit GCC's 'include' > directory. > > include/ > * cuda/cuda.h: New file. > libgomp/ > * plugin/cuda/cuda.h: Remove file. > * plugin/plugin-nvptx.c

Move 'libgomp/plugin/cuda/cuda.h' to 'include/cuda/cuda.h' (was: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches))

2022-04-06 Thread Thomas Schwinge
Hi! On 2017-01-13T19:11:23+0100, Jakub Jelinek wrote: > Especially for distributions it is undesirable to need to have proprietary > CUDA libraries and headers installed when building GCC. > I've talked to our lawyers and they said that the cuda.h header included > in this patch doesn't

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-05-04 Thread Thomas Schwinge
Hi! On Wed, 3 May 2017 11:00:14 +0200, Jakub Jelinek wrote: > On Sat, Jan 21, 2017 at 03:50:43PM +0100, Thomas Schwinge wrote: > > > In order to configure gcc to load libcuda.so.1 dynamically, > > > one has to either configure it --without-cuda-driver, or without > > >

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-05-03 Thread Jakub Jelinek
On Sat, Jan 21, 2017 at 03:50:43PM +0100, Thomas Schwinge wrote: > > In order to configure gcc to load libcuda.so.1 dynamically, > > one has to either configure it --without-cuda-driver, or without > > --with-cuda-driver=/--with-cuda-driver-lib=/--with-cuda-driver-include= > > options if cuda.h

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-21 Thread Jakub Jelinek
On Sat, Jan 21, 2017 at 03:50:43PM +0100, Thomas Schwinge wrote: > > In order to configure gcc to load libcuda.so.1 dynamically, > > one has to either configure it --without-cuda-driver, or without > > --with-cuda-driver=/--with-cuda-driver-lib=/--with-cuda-driver-include= > > options if cuda.h

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-21 Thread Thomas Schwinge
Hi! On Fri, 13 Jan 2017 19:11:23 +0100, Jakub Jelinek wrote: > This is something that has been discussed already during the last Cauldron. > Especially for distributions it is undesirable to need to have proprietary > CUDA libraries and headers installed when building GCC.

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 06:09:35PM +0300, Alexander Monakov wrote: > > -#ifdef __LP64__ > > +#if defined(__LP64__) || defined(_WIN64) > > > > (is that the right define for 64-bit MingW, right?). > > Yes, _WIN64; libsanitizer has a similar test. Alternatively, I guess, > > #if

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-19 Thread Alexander Monakov
On Wed, 18 Jan 2017, Jakub Jelinek wrote: > On Wed, Jan 18, 2017 at 10:52:32PM +0300, Alexander Monakov wrote: > > Sorry for not noticing this earlier, but ... > > > > > +#ifdef __LP64__ > > > +typedef unsigned long long CUdeviceptr; > > > +#else > > > +typedef unsigned CUdeviceptr; > > > +#endif

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-18 Thread Jakub Jelinek
On Wed, Jan 18, 2017 at 10:52:32PM +0300, Alexander Monakov wrote: > Sorry for not noticing this earlier, but ... > > > +#ifdef __LP64__ > > +typedef unsigned long long CUdeviceptr; > > +#else > > +typedef unsigned CUdeviceptr; > > +#endif > > I think this #ifdef doesn't do the right thing on

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-18 Thread Alexander Monakov
Hello Jakub, Sorry for not noticing this earlier, but ... > +#ifdef __LP64__ > +typedef unsigned long long CUdeviceptr; > +#else > +typedef unsigned CUdeviceptr; > +#endif I think this #ifdef doesn't do the right thing on MinGW. Would it be fine to simplify it? In my code I have typedef

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-16 Thread Jeff Law
On 01/13/2017 11:28 AM, Jakub Jelinek wrote: On Fri, Jan 13, 2017 at 06:19:02PM +, Joseph Myers wrote: --- libgomp/plugin/cuda/cuda.h.jj 2017-01-13 15:58:00.966544147 +0100 +++ libgomp/plugin/cuda/cuda.h 2017-01-13 17:02:47.355817896 +0100 @@ -0,0 +1,174 @@ +/* CUDA API description.

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-13 Thread Jakub Jelinek
On Fri, Jan 13, 2017 at 06:19:02PM +, Joseph Myers wrote: > > --- libgomp/plugin/cuda/cuda.h.jj 2017-01-13 15:58:00.966544147 +0100 > > +++ libgomp/plugin/cuda/cuda.h 2017-01-13 17:02:47.355817896 +0100 > > @@ -0,0 +1,174 @@ > > +/* CUDA API description. > > + Copyright (C) 2017 Free

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-13 Thread Joseph Myers
On Fri, 13 Jan 2017, Jakub Jelinek wrote: > --- libgomp/plugin/cuda/cuda.h.jj 2017-01-13 15:58:00.966544147 +0100 > +++ libgomp/plugin/cuda/cuda.h2017-01-13 17:02:47.355817896 +0100 > @@ -0,0 +1,174 @@ > +/* CUDA API description. > + Copyright (C) 2017 Free Software Foundation, Inc.

[PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-13 Thread Jakub Jelinek
Hi! This is something that has been discussed already during the last Cauldron. Especially for distributions it is undesirable to need to have proprietary CUDA libraries and headers installed when building GCC. These two patches allow building GCC without CUDA around in a way that later on can