[BUG] ‘::rsqrt’ has not been declared when building MatX
HugoPhibbs opened this issue · 1 comments
Describe the Bug
A clear and concise description of what the bug is.
I include matx.h
at the top of my file, and I get an error saying that rsqrt
has not been declared.
This was following a clean build and install of the latest MatX changes (from commit #703), but don't know which commit caused it. But before pulling I was up to commit #8b8da5a0
To Reproduce
Steps to reproduce the behavior:
Basically I pulled the latest changes commit #e2cb0de (PR #703) built my tests and got the trace:
In file included from /usr/local/include/matx/core/type_utils.h:44,
from /usr/local/include/matx/core/pybind.h:34,
from /usr/local/include/matx/core/file_io.h:47,
from /usr/local/include/matx.h:41,
from /home/hphi344/Documents/GS-DBSCAN-CPP/test/../include/TestUtils.h:14,
from /home/hphi344/Documents/GS-DBSCAN-CPP/test/TestUtils.cpp:6:
/usr/local/include/matx/core/half.h: In function ‘matx::matxHalf<T> matx::rsqrt(const matx::matxHalf<T>&)’:
/usr/local/include/matx/core/half.h:704:27: error: ‘::rsqrt’ has not been declared
704 | return static_cast<T>(::rsqrt(static_cast<float>(x.x)));
Expected Behavior
Build with no errors
Code Snippets
If applicable, add code snippets to help explain your problem.
System Details (please complete the following information):
- OS: Ubuntu 20.04
- CUDA version: CUDA 12.5
- g++ version: 9.4.0
Additional Context
May be a config issue on my behalf, but I'd be keen to see if you guys can reproduce it.
Thanks @HugoPhibbs . This is caused by building with a host compiler usually in a cpp file. We don't test this typically so sometimes it breaks. This is fixed in #706