Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This draft provides the custom double on device side, which might reduce a bit work if the vendor does not provide simulated double and remove the double precision core.
do not need to review this pr unless we have decided to investigate this direction further.
This can be compiled with cuda 12.6.
It mainly focuses on the interface and forward the operation internally to double precision.
This PR disables the conversion custom_double -> double to ensure there is no double operation directly in the kernels.
Unfortunately, the other direction double -> custom_double (via static_cast), but the implicit conversion should be avoided.
The requirement is from thrust::complex that needs
T(1.0)/s
which require this constructor from double.If the vendor delete the double precision core without the simulation way, some functions might not be available due to hardware limit, but the others can be simulated in software side by more operations or allowing reinterpret.
Somethings needs to implement (simulate):
If the application does not need the double precision at all, we have done the same things for dpcpp on the Intel GPU without double precision support. We only need to reapply it again to other backend, which mainly takes care of some accidental usage of double.