-
Notifications
You must be signed in to change notification settings - Fork 326
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
riscv64/LTO: lto1: fatal error: target specific builtin not available #1740
Comments
looks like cmake is not passing Compare: /usr/bin/c++ -DHWY_SHARED_DEFINE -Dhwy_EXPORTS -I/home/malat/highway-1.0.7 -g -O2 -ffile-prefix-map=/home/malat/highway-1.0.7=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -DHWY_BROKEN_EMU128=0 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" -fmerge-all-constants -Wall -Wextra -Wconversion -Wsign-conversion -Wvla -Wnon-virtual-dtor -fmath-errno -fno-exceptions -march=rv64gcv1p0 -Werror -MD -MT CMakeFiles/hwy.dir/hwy/per_target.cc.o -MF CMakeFiles/hwy.dir/hwy/per_target.cc.o.d -o CMakeFiles/hwy.dir/hwy/per_target.cc.o -c /home/malat/highway-1.0.7/hwy/per_target.cc while: /usr/bin/c++ -fPIC -g -O2 -ffile-prefix-map=/home/malat/highway-1.0.7=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -DHWY_BROKEN_EMU128=0 -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,--version-script=/home/malat/highway-1.0.7/hwy/hwy.version -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libhwy.so.1 -o libhwy.so.1.0.7 CMakeFiles/hwy.dir/hwy/aligned_allocator.cc.o CMakeFiles/hwy.dir/hwy/nanobenchmark.cc.o CMakeFiles/hwy.dir/hwy/per_target.cc.o CMakeFiles/hwy.dir/hwy/print.cc.o CMakeFiles/hwy.dir/hwy/targets.cc.o CMakeFiles/hwy.dir/hwy/timer.cc.o |
setting |
ok nevermind: |
Thanks for reporting. Sounds like a compiler bug. Would you suggest any code changes or documentation updates? |
I vaguely remember we had a discussion about |
Yes indeed, I think you mean #838? |
Yes precisely ! If I understand correctly |
Thanks, that makes sense. hm, I had forgotten that we already detect HWY_RISCV in CMake and add that flag to HWY_FLAGS. Is the issue that HWY_RISCV is not being detected correctly in CMake? (by checking __riscv) Or should we add |
HWY_RISCV is a little bit more than just checking riscv, it adds (unconditionally)
That is a rather bad workaround to cope with current GCC-13 limitation. I'd prefer not to go this route. Fundamentally in the case of dynamic dispatch, the issue is that I do not want to see any I'll try to prepare a patch for HWY_CMAKE_RVV |
I take that back: I see that |
Right. Ah, I see, you wanted to make the existing "always set march=gcv" conditional upon both RISCV and the user-specified flag. That makes sense, thanks for sending the PR! |
Just tested it out on pioneer add_link_options(-march=rv64gcv1p0) This turns on flag for all targets, I tried turning it on for hwy only, but it did not work |
Thanks @k0tran :) As mentioned above, we'd like to eventually get to a state where we don't have any -march, and that pragma attributes take care of enabling V extension. Clang is not quite ready for this yet, see llvm/llvm-project#56592. But if you make the add_link_options conditional on HWY_CMAKE_RVV, that would be fine and we'd welcome a PR :) |
Yes @jan-wassenberg , I understand that this is temporary solution, but these bugs are old. Would be nice to have solution at least for now.
In LastTest.log (the other test fails similarly):
It's just falls silently. I'm not sure where to start |
I agree the bugs are old. Progress in compilers is a bit uneven :) The issue is likely identified by 'WARNING: CPU supports 0x6000000000000000'. Bit 37 being zero indicates RVV is not supported, or at least that we are unable to detect it. Are we sure the CPU and OS actually support V? Some Linux versions require opting in to V, e.g. because they don't save the vector regs in context switches otherwise. |
Thanks! Actually it's not supported on machine at the moment, but compiler says it does. So it's not related to highway. I will test it on rvv machine though, If I get one at some point |
Seems like default flag:
-march=rv64gcv1p0
is conflicting with-flto=auto
. Will need to dig further.ref:
The text was updated successfully, but these errors were encountered: