Trying to "add" Intel hardware support to Python-OSPRayRenderer "by hand".

Dear Ovito people,

this is a Windows-topic (Win10/x64): after dropping my RTX 3060/12 (which worked excellent with the Anari-renderer), I put an Intel ARC B580 into the machine (just for curiosity). OpenCL works fine out of the box (as tested in Axels’ current LAMMPS build for Windows) and is surprisingly more performant than I expected.

Now I tried to “force” the OSPRayRenderer from the current Python-Ovito module into “Acceleration mode” by (after backup, of course) copying all DLLs from Intel’s OSPRay package (freely downloadable, Intel OSPRay Download) into the Ovito-python plugins folder ([…]\Python-3.12.6.amd64\Lib\site-packages\ovito\plugins):


and modifying __init__.py to load the gpu module:
image

This did, as I suspected (but I tried anyway) NOT work. I missed something.

Q: Is there a possibility (for the future) to add OSPRay hardware rendering if available?

Thanks!

Hi,

From our perspective, you are the first to ask and we developers at OVITO do not own any such hardware to test this. But I can understand your desire to use the GPU-accelerated version of OSPRay, which can make use of Intel’s GPU accelerators.

I would also have been surprised if this simple attempt had actually worked. But I would be interested to know how exactly it failed. Were you no longer able to render images after the replacing the DLLs, or only in CPU mode as before?

I see two problems: We do not use the original version of OSPRay in OVITO, but a forked version, which corresponds to OSPRay 3.2.0 and has been extended by us with functions for rendering ellipsoids and superellipsoids. However, these extensions are only implemented for the CPU device, not the Intel GPU device/SYCL.

Secondly, OVITO explicitly initializes a CPU device during the rendering process (“ospLoadModule("cpu"); ospNewDevice("cpu");"). I am not sure whether this behavior can be overridden by environment variables from outside (see here).

Until there is significant demand for Intel GPU accelerator support from the OVITO Pro user community, we unfortunately do not have the resources to develop full support for it ourselves. We would have to rely on support from Intel and its developers (as we are seeing from NVIDIA with VisRTX). Unfortunately, Intel seems to have reduced its activities in the area of OSPRay technology significantly in the last 12 months, and the GitHub project seems to have gone almost dormant.

This is how we build the OSPRay binaries for Windows using MSVC 2022, by the way, which get shipped with the OVITO Python module:

git clone https://github.com/stukowski/ospray.git
cd ospray
mkdir build
cd build
cmake -G "Ninja" ^
   -DCMAKE_BUILD_TYPE=Release ^
   -DCMAKE_INSTALL_PREFIX=%OVITO_DEPS_DIR%/ospray_install ^
   -DISPC_EXECUTABLE=%OVITO_DEPS_DIR%/ispc/bin/ispc.exe ^
   -Dembree_DIR=%OVITO_DEPS_DIR%/embree_install/lib/cmake/embree-4.3.3 ^
   -Drkcommon_DIR=%OVITO_DEPS_DIR%/rkcommon_install/lib/cmake/rkcommon-1.14.0 ^
   -DOpenImageDenoise_DIR=%OVITO_DEPS_DIR%/oidn_install/lib/cmake/OpenImageDenoise-2.3.2 ^
   -DRKCOMMON_TBB_ROOT=%OVITO_DEPS_DIR%/tbb ^
   -DBUILD_SHARED_LIBS=ON ^
   -DCMAKE_CXX_STANDARD=20 ^
   -DOSPRAY_ENABLE_APPS=OFF ^
   -DOSPRAY_ENABLE_VOLUMES=OFF ^
   -DOSPRAY_MODULE_DENOISER=ON ^
   -DOSPRAY_BUILD_ISA=ALL ^
   ..
cmake --build . --config Release --target install

Hi Alexander,

It looks like I was a bit too enthusiastic about these Intel consumer GPUs. As I found out, there are a few problems:

General “GPGPU” support including the new ARC B5xx series is provided for Linux only, at least it looks like this. They even provide build examples for LAMMPS with Ubuntu:

GPU-Hardware support for the generic OSPRay renderer appears non-existent or at least limited. Last official version is 3.2 (from 1 year ago), current version is 3.3 with almost a year of no significant updates.

Current Intel toolchain system (ONE API 2025.1) does also not specifically state support for B5xx (but mentions A7xx).

It appears that the new Intel GPU line, B5xx, has limited value for GPU computation tasks. This leads me to believe that it would be better, for now at least, to switch back to an RTX-based card. However, I would love to experiment with new ideas and concepts.

For your question regarding the Ovito OSPRay invocation: It simply took the CPU path as I could not see any difference in the images or in the processing time. The current (downloadable) OSPRay DLLs are v.3.2., and ovito-python did not complain about the files that were secretly exchanged. Maybe I didn’t call the mentioned procedures that you added.

Thanks for your response,

Best wishes!

Thanks for sharing these observations and insights with us. I think we can agree that it doesn’t really make sense to invest a lot of development time in the further integration of OSPRay’s (still incomplete) Intel GPU support. We are aiming much more at the future integration of other cross-vendor, GPU-accelerated sci-vis renderers, such as Barney or Cycles. The recent switch to the Khronos ANARI standard in OVITO will hopefully make this possible.