Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The port is based on pattonkan/sse2rvv@ca0e0b4, which for now supports SSE2 and SSE4.2 that embree uses. It is verified using Ubuntu 24.04.1 RISC-V preinstalled server image from https://cdimage.ubuntu.com/releases/24.04/release/ with QEMU on Ubuntu 24.04.
Note this is just the initial port of RVV and has a limitation for VLEN=128 only. We expect further performance improvement from porting the other extensions.
Test steps:
Follow https://wiki.ubuntu.com/RISC-V/QEMU to install required packages and run the QEMU using the following command with vector extension enabled:
Use clang-18 to build embree in QEMU guest
sudo apt update; sudo apt install cmake libtbb-dev libglfw3-dev clang-18
cd embree; mkdir build; cd build; cmake -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18 ..; make -j4; sudo make install
Untar the archive https://github.com/RenderKit/embree/releases/download/v4.3.3/embree-4.3.3-testing.tar.gz to /usr/local and run tests
cd /usr/local/testing; sudo cmake -B build -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18 -DEMBREE_TESTING_INTENSITY=1; sudo cmake --build build --target test
The results are:
Running embree_bvh_builder alone is passed, and running embree_verify will have a segmentation fault in SSE4.2.regression_static_memory_monitor from libtbb for an invalid register value. Use regex to select only the test is passed though. This doesn't seem relate to the port and can be listed as a known issue.