POV-Ray / povray

The Persistence of Vision Raytracer: http://www.povray.org/
GNU Affero General Public License v3.0
1.35k stars 282 forks source link

AVX512 version for POVRAY #452

Open Srihari-mcw opened 1 year ago

Srihari-mcw commented 1 year ago

The current PR implements AVX512 version of POV-RAY. This contains optimized implementations for Noise and DNoise functions.

Details of implementation:

We are able to observe significantly better performance for POVRAY pipeline with the AVX512 implementation. Results related to performance comparison of AVX512 version and AVX2FMA3 version with MSVC compiler are added in avx512_build_setup folder in a xlsx file. The results are recorded in Intel I5-1035 G1 and AMD 7600X. README related to the AVX512 version is attached in the avx512_build_setup folder detailing how to build the Windows and UNIX versions. Details with the Windows build is attached here also for easier reference

Notes for AVX512 Windows build ==============================

The visual studio version was updated from vs2015 to vs2022 to enable support of AVX512 Version

  1. Set the configuration in solution file to Release-AVX512 | x64
  2. Select the 'Generic POV-Ray > povbase' project and expand 'Backend Headers', then open the file build.h(source/base/build.h) listed within it.In it replace with name and email of person who builds the code in BUILT_BY flag and comment the #error directive (line 129)
  3. In syspovconfig.h(windows/povconfig/syspovconfig.h) uncomment the #define _CONSOLE. (line 56) The AVX512 version was developed with the console version. The GUI build has been skipped in the solution file. Note: (Presently with the updated code the GUI project is skipped for building, as the cmedit64.dll and povcmax64.dll from official windows distribution are incompatible with VS2022. The console version alone is available to build and test).
  4. Build the solution file and in the vs2022/bin64 folder we can run the POVRAY examples with povconsole-avx512.exe.
         General command example - povconsole-avx512.exe +Ibenchmark.pov
         Single worker thread - povconsole-avx512.exe +WT1 benchmark.pov
         Output image - benchmark.png
Srihari-mcw commented 1 year ago

For easier reference of the performance results a excel workbook detailing the same has been attached here (also part of the branch submitted) - POVRAY Compiled Results - AVX512 - AMD 7600X and Intel I5-1035 G1 with +WT1 Option.xlsx

Srihari-mcw commented 1 year ago

Sample results for dimensions 320 x 240 :

AMD Raphael 7600X

image

image

Intel Icelake I5-1035 G1 image image