-
Notifications
You must be signed in to change notification settings - Fork 796
Closed
Labels
bugSomething isn't workingSomething isn't workingcudaCUDA back-endCUDA back-endruntimeRuntime library related issueRuntime library related issue
Description
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:
- OS: Ubuntu 18.04
- Target device and vendor: NVidia GPUs
- DPC++ version: clang version 13.0.0 (https://github.com/intel/llvm d482ac3)
- Dependencies version: NEO 21.24.20098
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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcudaCUDA back-endCUDA back-endruntimeRuntime library related issueRuntime library related issue