Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ‘::rsqrt’ has not been declared when building MatX #705

Closed
HugoPhibbs opened this issue Aug 8, 2024 · 1 comment · Fixed by #706
Closed

[BUG] ‘::rsqrt’ has not been declared when building MatX #705

HugoPhibbs opened this issue Aug 8, 2024 · 1 comment · Fixed by #706

Comments

@HugoPhibbs
Copy link
Contributor

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.

@HugoPhibbs HugoPhibbs changed the title [BUG] ‘::rsqrt’ has not been declared when building latest MatX commit [BUG] ‘::rsqrt’ has not been declared when building MatX Aug 8, 2024
@cliffburdick
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants