Bug Description
Using of sycl::sqrt() function leads to results that are incompatible to IEEE754 on NVidia cards (sqrt.approx.f PTX instruction is generated) even for precise ffp-model. sqrtf() works fine in contrast (sqrt.rn.f PTX instruction is generated).
To Reproduce
- Go to "sqrt" folder from archive in attachment;
- Build test application with
./build.sh
- Run
./sqrt
- Expected output:
Target device: GeForce RTX 2070
Difference: 1.788139e-07
Correct output should give zero difference, can be checked with sqrtf.
Environment:
Additional Context
Such an issue significantly degrades user experience while CUDA to DPC++ code migration. sycl::sqrt() is a function that normally used by default to compute square roots (e.g. it's generated by DPC++ Compatibility Tool), and observed accuracy issues that this function produces may be really tricky to debug.
sqrt.zip
Bug Description
Using of
sycl::sqrt()function leads to results that are incompatible to IEEE754 on NVidia cards (sqrt.approx.fPTX instruction is generated) even for precise ffp-model.sqrtf()works fine in contrast (sqrt.rn.fPTX instruction is generated).To Reproduce
./build.sh./sqrtCorrect output should give zero difference, can be checked with
sqrtf.Environment:
Additional Context
Such an issue significantly degrades user experience while CUDA to DPC++ code migration.
sycl::sqrt()is a function that normally used by default to compute square roots (e.g. it's generated by DPC++ Compatibility Tool), and observed accuracy issues that this function produces may be really tricky to debug.sqrt.zip