AMGX
AMGX copied to clipboard
How to use the mixed precision in AMGX
Which example provide an tutorial on the usage of the mixed precision solver in AMGX. will it provide a faster speed compared to a fully double precision computation?
Does anybody know this? I can't find any infors in the userguide.
Hi @ztdepztdep ,
Mixed precision solver is enabled through different value of API parameter. You can see here: https://github.com/NVIDIA/AMGX/blob/main/examples/amgx_capi.c#L266 how mode
value is set and this value is used in all consecutive AMGX calls. For example value that corresponds to matrix data stored in float
and vectors data stored in double
would be AMGX_mode_dDFI
.
if we store the matrix in float, then at last how to iterative refinement its final solution to double precision which is true meaning of "mixed precision"
| | Professor Ding、 | | @.*** | ---- Replied Message ---- | From | @.> | | Date | 10/10/2022 22:19 | | To | @.> | | Cc | @.> , @.> | | Subject | Re: [NVIDIA/AMGX] How to use the mixed precision in AMGX (Issue #213) |
Hi @ztdepztdep ,
Mixed precision solver is enabled through different value of API parameter. You can see here: https://github.com/NVIDIA/AMGX/blob/main/examples/amgx_capi.c#L266 how mode value is set and this value is used in all consecutive AMGX calls. For example value that corresponds to matrix data stored in float and vectors data stored in double would be AMGX_mode_dDFI.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
It seems the second D or F specifies the matrix precision. I tried to set dFDI, but AMGX feedback error "no this kind of mode ".
| | Professor Ding、 | | @.*** | ---- Replied Message ---- | From | @.> | | Date | 10/10/2022 22:19 | | To | @.> | | Cc | @.> , @.> | | Subject | Re: [NVIDIA/AMGX] How to use the mixed precision in AMGX (Issue #213) |
Hi @ztdepztdep ,
Mixed precision solver is enabled through different value of API parameter. You can see here: https://github.com/NVIDIA/AMGX/blob/main/examples/amgx_capi.c#L266 how mode value is set and this value is used in all consecutive AMGX calls. For example value that corresponds to matrix data stored in float and vectors data stored in double would be AMGX_mode_dDFI.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
if we store the matrix in float, then at last how to iterative refinement its final solution to double precision which is true meaning of "mixed precision"
Restriction/prolongation matrices are also stored in lower precision, so coarse matrices are kept in lower precision too. For anything else (i.e. MatVec product) matrix data is promoted to "higher" precision and compute performed in higher precision too.
It seems the second D or F specifies the matrix precision. I tried to set dFDI, but AMGX feedback error "no this kind of mode ".
It's other way around, as i mentioned in my previous message:
For example value that corresponds to matrix data stored in float and vectors data stored in double would be AMGX_mode_dDFI.