public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* GPU offloading question
@ 2024-02-03  0:21 Steve Kargl
  2024-02-03 13:37 ` Richard Biener
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Kargl @ 2024-02-03  0:21 UTC (permalink / raw)
  To: fortran

All,

Suppose one is working in a funding-constrained environment
such as an academician with limited grant funding.  If one
wanted to dabble in GPU offloading with gcc/gfortran, what
recommendations would one have for minimum required hardware?
In addition, are there any vendor software layers that are
required (such as AMD ROCm with an AMD GPU)?

-- 
Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GPU offloading question
  2024-02-03  0:21 GPU offloading question Steve Kargl
@ 2024-02-03 13:37 ` Richard Biener
  2024-02-03 16:13   ` Steve Kargl
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Biener @ 2024-02-03 13:37 UTC (permalink / raw)
  To: sgk; +Cc: fortran



> Am 03.02.2024 um 01:22 schrieb Steve Kargl <sgk@troutmask.apl.washington.edu>:
> 
> All,
> 
> Suppose one is working in a funding-constrained environment
> such as an academician with limited grant funding.  If one
> wanted to dabble in GPU offloading with gcc/gfortran, what
> recommendations would one have for minimum required hardware?
> In addition, are there any vendor software layers that are
> required (such as AMD ROCm with an AMD GPU)?

You need the HSA runtime for AMD which comes with ROCm and libcuda for NvIDIA which comes with CUDA.  I’ve had success getting both a very low end gtx1650 and a high end rx6900xt running with simple offloading.  The officially supported set of hardware is way bigger with CUDA when it comes to lower end cards.

I can’t say anything about performance with regard to how GCC handles both.

Note that double precision math performance is said to be severely constrained for consumer hardware.

Richard 

> 
> --
> Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GPU offloading question
  2024-02-03 13:37 ` Richard Biener
@ 2024-02-03 16:13   ` Steve Kargl
  2024-02-03 18:15     ` Benson Muite
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Kargl @ 2024-02-03 16:13 UTC (permalink / raw)
  To: Richard Biener; +Cc: fortran

On Sat, Feb 03, 2024 at 02:37:05PM +0100, Richard Biener wrote:
> 
> > Am 03.02.2024 um 01:22 schrieb Steve Kargl <sgk@troutmask.apl.washington.edu>:
> > 
> > All,
> > 
> > Suppose one is working in a funding-constrained environment
> > such as an academician with limited grant funding.  If one
> > wanted to dabble in GPU offloading with gcc/gfortran, what
> > recommendations would one have for minimum required hardware?
> > In addition, are there any vendor software layers that are
> > required (such as AMD ROCm with an AMD GPU)?
> 
> You need the HSA runtime for AMD which comes with ROCm and libcuda
> for NvIDIA which comes with CUDA.

Thanks.  I'll need to check the level of support for the above
in FreeBSD.  I suspect it's non-existent, so looks like I'll take
a plunge down the linux rabbit hole.

> I’ve had success getting both a very low end gtx1650 and a high
> end rx6900xt running with simple offloading.  The officially supported
> set of hardware is way bigger with CUDA when it comes to lower end cards.
> 
> I can’t say anything about performance with regard to how GCC handles both.
> 
> Note that double precision math performance is said to be severely
> constrained for consumer hardware.

Ah, good point.  I'll need to find a card I can afford that supports
double precision.


-- 
steve

> 
> Richard 
> 
> > 
> > --
> > Steve

-- 
Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GPU offloading question
  2024-02-03 16:13   ` Steve Kargl
@ 2024-02-03 18:15     ` Benson Muite
  2024-02-03 18:37       ` Steve Kargl
  2024-02-03 19:38       ` Richard Biener
  0 siblings, 2 replies; 6+ messages in thread
From: Benson Muite @ 2024-02-03 18:15 UTC (permalink / raw)
  To: sgk, Richard Biener; +Cc: fortran

On 03/02/2024 19.13, Steve Kargl wrote:
> On Sat, Feb 03, 2024 at 02:37:05PM +0100, Richard Biener wrote:
>>
>>> Am 03.02.2024 um 01:22 schrieb Steve Kargl <sgk@troutmask.apl.washington.edu>:
>>>
>>> All,
>>>
>>> Suppose one is working in a funding-constrained environment
>>> such as an academician with limited grant funding.  If one
>>> wanted to dabble in GPU offloading with gcc/gfortran, what
>>> recommendations would one have for minimum required hardware?
>>> In addition, are there any vendor software layers that are
>>> required (such as AMD ROCm with an AMD GPU)?
>>
>> You need the HSA runtime for AMD which comes with ROCm and libcuda
>> for NvIDIA which comes with CUDA.
> 
> Thanks.  I'll need to check the level of support for the above
> in FreeBSD.  I suspect it's non-existent, so looks like I'll take
> a plunge down the linux rabbit hole.
> 
>> I’ve had success getting both a very low end gtx1650 and a high
>> end rx6900xt running with simple offloading.  The officially supported
>> set of hardware is way bigger with CUDA when it comes to lower end cards.
>>
>> I can’t say anything about performance with regard to how GCC handles both.
>>
>> Note that double precision math performance is said to be severely
>> constrained for consumer hardware.
> 
> Ah, good point.  I'll need to find a card I can afford that supports
> double precision.
> 
> 
Consider https://allocations.access-ci.org/resources
for a PI based in the USA. Use the limited funding to support your time
improving off loading support for GFortran.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GPU offloading question
  2024-02-03 18:15     ` Benson Muite
@ 2024-02-03 18:37       ` Steve Kargl
  2024-02-03 19:38       ` Richard Biener
  1 sibling, 0 replies; 6+ messages in thread
From: Steve Kargl @ 2024-02-03 18:37 UTC (permalink / raw)
  To: Benson Muite; +Cc: Richard Biener, fortran

On Sat, Feb 03, 2024 at 09:15:21PM +0300, Benson Muite wrote:
> >>>

I wrote:

> >>> Suppose one is working in a funding-constrained environment
> >>> such as an academician with limited grant funding.  If one
> >>> wanted to dabble in GPU offloading with gcc/gfortran, what
> >>> recommendations would one have for minimum required hardware?
> >>> In addition, are there any vendor software layers that are
> >>> required (such as AMD ROCm with an AMD GPU)?
> >>
> > 
> Consider https://allocations.access-ci.org/resources
> for a PI based in the USA. Use the limited funding to support your time
> improving off loading support for GFortran.


Thanks for the link.  I'll see what might be available to me.

I already support gfortran development (although not offloading)
with my limited time.  See gcc/fortran/ChangeLog* from the last
25 or so years. :-)

-- 
Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GPU offloading question
  2024-02-03 18:15     ` Benson Muite
  2024-02-03 18:37       ` Steve Kargl
@ 2024-02-03 19:38       ` Richard Biener
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Biener @ 2024-02-03 19:38 UTC (permalink / raw)
  To: Benson Muite; +Cc: sgk, fortran



> Am 03.02.2024 um 19:15 schrieb Benson Muite <benson_muite@emailplus.org>:
> 
> On 03/02/2024 19.13, Steve Kargl wrote:
>>> On Sat, Feb 03, 2024 at 02:37:05PM +0100, Richard Biener wrote:
>>> 
>>>> Am 03.02.2024 um 01:22 schrieb Steve Kargl <sgk@troutmask.apl.washington.edu>:
>>>> 
>>>> All,
>>>> 
>>>> Suppose one is working in a funding-constrained environment
>>>> such as an academician with limited grant funding.  If one
>>>> wanted to dabble in GPU offloading with gcc/gfortran, what
>>>> recommendations would one have for minimum required hardware?
>>>> In addition, are there any vendor software layers that are
>>>> required (such as AMD ROCm with an AMD GPU)?
>>> 
>>> You need the HSA runtime for AMD which comes with ROCm and libcuda
>>> for NvIDIA which comes with CUDA.
>> 
>> Thanks.  I'll need to check the level of support for the above
>> in FreeBSD.  I suspect it's non-existent, so looks like I'll take
>> a plunge down the linux rabbit hole

Support is likely non existent on FreeBSD since there’s a driver component as well.  For modern GPUs the driver is open source in Linux for both vendors but the firmware is not.  CUDA is proprietary while the HSA runtime part is easily built from source (it’s hosted on GitHub)

>>> I’ve had success getting both a very low end gtx1650 and a high
>>> end rx6900xt running with simple offloading.  The officially supported
>>> set of hardware is way bigger with CUDA when it comes to lower end cards.
>>> 
>>> I can’t say anything about performance with regard to how GCC handles both.
>>> 
>>> Note that double precision math performance is said to be severely
>>> constrained for consumer hardware.
>> 
>> Ah, good point.  I'll need to find a card I can afford that supports
>> double precision.
>> 
>> 
> Consider https://allocations.access-ci.org/resources
> for a PI based in the USA. Use the limited funding to support your time
> improving off loading support for GFortran.

Yeah, I would also suggest development resources available as part of SC center access here.

Richard 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-03 19:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-03  0:21 GPU offloading question Steve Kargl
2024-02-03 13:37 ` Richard Biener
2024-02-03 16:13   ` Steve Kargl
2024-02-03 18:15     ` Benson Muite
2024-02-03 18:37       ` Steve Kargl
2024-02-03 19:38       ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).