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

asmjit fails to compile with bitwise and #957

Open
gregrodgers opened this issue Mar 1, 2022 · 6 comments
Open

asmjit fails to compile with bitwise and #957

gregrodgers opened this issue Mar 1, 2022 · 6 comments

Comments

@gregrodgers
Copy link

gregrodgers commented Mar 1, 2022

I am new to fbgemm and I am trying to build with clang instead of gcc. gcc builds fine but clang gets this error when building or using asmjit. Should asmjit be fixed or should I turn off the error in clang?
Thank you.

/work/grodgers/git/aomp-test/FBGEMM/third_party/asmjit/src/asmjit/core/../core/operand.h:910:79: error: use of bitwise '&' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
  static inline bool isGp(const Operand_& op, uint32_t rId) noexcept { return isGp(op) & (op.id() == rId); }
                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                       &&
/work/grodgers/git/aomp-test/FBGEMM/third_party/asmjit/src/asmjit/core/../core/operand.h:910:79: note: cast one or both operands to int to silence this warning

@jianyuh
Copy link
Member

jianyuh commented Mar 18, 2022

Hi @gregrodgers , do you have more details on clang version and repro instruction? We were able to build with clang 9.

@gregrodgers
Copy link
Author

I am using upstream build of clang-15. I really want to be able to use latest version of clang for latest OpenMP offloading support.

@gregrodgers
Copy link
Author

BTW, I am getting around this now with this:
export CXXFLAGS="-Wno-error=bitwise-instead-of-logical -Wno-error=unused-but-set-variable -Wno-error=unused-parameter -Wno-error=sign-compare -pthread"

So for now this is not high priority.

@gregrodgers
Copy link
Author

I may close this issue because I have successfully built fbgemm_gpu with clang 15 and did not run into this problem. In fact I have clang cuda working nicely. In the one case I tested (fbgemm_gpu/bench/sparse_ops_benchmark.py), it ran slightly faster than nvcc :-). I did this with latest upstream clang 15.0.0 built from llvm trunk.

@Tectu
Copy link

Tectu commented May 5, 2022

I can confirm that this is still an issue (at least out of the box) with clang14.

@kobalicek
Copy link

This should be already fixed by asmjit upstream.

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

No branches or pull requests

4 participants