KhronosGroup / SPIRV-Tools

Apache License 2.0
1.03k stars 543 forks source link

Try to apply Profile-Guided Optimization (PGO) to SPIRV tooling #5303

Open zamazan4ik opened 1 year ago

zamazan4ik commented 1 year ago

Hi!

I think SPIRV tools can get performance improvement by using Profile-Guided Optimization (PGO). I think so because, from my experience, compiler-like things get up to a 20% boost with it (according to Clang and Rustc tests).

Did anyone try to do such optimization on the project? Not sure, if is it possible or not to use tests as a profile since a good profile should work on a "hot" path in general cases.

s-perron commented 11 months ago

We have not tried it. I agree that it would probably give a good improvement, but the tests would not be good training data. To build usefully with PGO we would need a good set of shaders from a variety of source that have the correct licence.

This is not something that the maintainers are interested in perusing at this time. We could accept a PR from someone else, but we would have to look it over carefully.