[petsc-users] GPUs and the float-double dilemma

Jed Brown jed at jedbrown.org
Fri Feb 10 17:16:49 CST 2023


Ces VLC <cesarillovlc at gmail.com> writes:

> El El vie, 10 feb 2023 a las 21:44, Barry Smith <bsmith at petsc.dev> escribió:
>
>>
>>    What is the use case you are looking for that cannot be achieved by
>> just distributing a single precision application? If the user is happy when
>> they happen to have GPUs to use single precision everywhere, then why would
>> they need double precision if they happen not to have a GPU?
>>
>>    Are you just using KSP or also SNES, TS etc?
>
>
> Thanks for your replies. The use case is structural analysis (so, sparse
> symmetrical matrix, and minimum degree reorder tends to work fine in CPU
> (for GPU I’ll need to check the best performing scenarios).

Sparse direct solvers are rather lacking on GPUs. You may be able to use an algebraic multigrid on GPUs. If you're using an iterative solver, you'll be limited by memory bandwidth, not flops, so double -> float is at best an 8/12 improvement.

You may be interested in this work on structural mechanics for GPUs.

https://arxiv.org/abs/2204.01722

> Obviously, this use case requires double precision. But single precision
> might be fine enough for faster low quality runs if the user happens to
> have a GPU that accelerates float and not double (I have a 12GB Pascal
> Titan, it accelerates float, not double).
>
> Kind regards,
>
> César


More information about the petsc-users mailing list