Closed goombado closed 1 year ago
Hmm, indeed looks like the wrong ISA is used. Some suggestions to find out what goes wrong:
CMAKE_VERBOSE_MAKEFILE
so that we can see the ispc invocation (in particular the --target=
argumentbuild-osx-arm
in .gitlab-ci.yml
:
scripts/build_gitlab/macosx.sh -DBUILD_TBB_FROM_SOURCE=ON -DBUILD_EMBREE_FROM_SOURCE=ON -DBUILD_OIDN=ON -DBUILD_OIDN_FROM_SOURCE=ON
or directly:
cmake -D CMAKE_INSTALL_LIBDIR=lib -DBUILD_TBB_FROM_SOURCE=ON -DBUILD_EMBREE_FROM_SOURCE=ON -DBUILD_OIDN=ON -DBUILD_OIDN_FROM_SOURCE=ON ../scripts/superbuild
BTW: You can use the prebuild ISPC https://github.com/ispc/ispc/releases/download/v1.18.0/ispc-v1.18.0-macOS.tar.gz, no need to compile that one from source.
Thanks for the advice! I'm currently using a build of Asahi Linux, so I think the macOS builds are unfortunately not relevant to me (although, if I am incorrect in this assumption, and the only thing that matters is the ARM architecture, please do let me know). And, to answer your question, I did also build Embree from source. The superbuild, on my computer, attempts to download the Linux prebuilt binaries, which I don't believe are compiled for ARM, and so the build fails almost immediately. The only success I've had in compiling these tools is by doing so manually, as the superbuilds don't seem to work unfortunately.
As per your advice, I've enabled CMAKE_VERBOSE_MAKEFILE
and the following commands are run that cause the error:
[ 2%] Building ISPC object /home/andrei/repos/ospray/build/modules/cpu/local__volume/transferFunction/LinearTransferFunction.dev.o
cd /home/andrei/repos/ospray/build/modules/cpu && /usr/bin/cmake -E make_directory /home/andrei/repos/ospray/build/modules/cpu/local__volume/transferFunction
cd /home/andrei/repos/ospray/build/modules/cpu && /usr/bin/cmake -E make_directory /home/andrei/repos/ospray/build/modules/cpu/volume/transferFunction/
cd /home/andrei/repos/ospray/build/modules/cpu && /home/andrei/ISPC/bin/ispc -I /home/andrei/repos/ospray/modules/cpu -I /home/andrei/repos/ospray/ospray/include -I /home/andrei/repos/ospray/ospray -I /home/an
drei/repos/ospray -I /home/andrei/repos/ospray/build -I /usr/local/include -I /usr/local/include -I /usr/local/include --arch=aarch64 --addressing=32 -O3 --target=neon-i32x4,sse2 --opt=fast-math --wno-perf --p
ic --opt=disable-assertions -h /home/andrei/repos/ospray/build/modules/cpu/volume/transferFunction/LinearTransferFunction_ispc.h -MMM /home/andrei/repos/ospray/build/modules/cpu/local__volume/transferFunction/
LinearTransferFunction.dev.idep -o /home/andrei/repos/ospray/build/modules/cpu/local__volume/transferFunction/LinearTransferFunction.dev.o /home/andrei/repos/ospray/modules/cpu/volume/transferFunction/LinearTr
ansferFunction.ispc
Error: arch = aarch64 and target = sse2-i32x4 is not a valid combination.
make[2]: *** [modules/cpu/CMakeFiles/ospray_module_cpu.dir/build.make:1114: modules/cpu/local__volume/transferFunction/LinearTransferFunction.dev.o] Error 1
make[2]: Leaving directory '/home/andrei/repos/ospray/build'
make[1]: *** [CMakeFiles/Makefile2:480: modules/cpu/CMakeFiles/ospray_module_cpu.dir/all] Error 2
make[1]: Leaving directory '/home/andrei/repos/ospray/build'
make: *** [Makefile:159: all] Error 2
It seems that in the generated build.make
file, the target switch is always written as --target=neon-i32x4,sse2
. I have gone into build.make and manually removed the ,sse2
component of the target switch, and this allows the command to succeed. It immediately fails on the next command, however, due to the same issue with a different instance of the command. Is there a way to specify that the target should explicitly be only neon-i32x4
without the ,sse2
at the end?
Again, thank you for your help!
Update: I looked into the trace of the initial CMake invocation, and saw a CMake option relating to embree called EMBREE_MAX_ISA
. It seems that this is by default set to NONE, which, in turn, has the effect of enabling an SSE2 flag. Rebuilding Embree with EMBREE_MAX_ISA=NEON
and then generating the OSPRay build files seemed to fix the issue. Thanks so much for the suggestion for looking into Embree!
I'm having an issue with building ospray on my computer (ARM supporting NEON). I have manually built all dependencies required for ospray, including an ARM build of ispc v1.18.0, oneTBB, rkcommon v1.10.0 and OpenVKL. However, after generating the CMake configuration files and running make, the following output is always given:
I am not too experienced with CPU instructions etc., but, from my understanding, for some reason an SSE2 instruction is being used instead of a NEON. I have set the
OSPRAY_BUILD_ISA
option toNEON
.I have attempted to:
None of these have had any effect on the error message I keep receiving. Any help on the matter would be greatly appreciated, and if any additional information would help to narrow down the nature of the problem, please advise me as to what else I should upload.
Thanks!