Cycles render tests: Add the option to test with OSL enabled #124601
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#124601
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Alaska/blender:enable-osl-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This commit adds a new cmake variable
WITH_CYCLES_TEST_OSL
that runs every Cycles test a second time with OSL enabled.
At the moment only CPU OSL is enabled. There are plans to enable
OptiX OSL in the future when stability issues with OptiX OSL
have been resolved.
Some render tests have been blocked from running until we can figure
out a fix. The most notiable being all the Pricincipled BSDF tests
as some of them are failing due to noise differences.
TODO/Questions:
BLENDER_TEST_UPDATE=1 ctest...
, when ideally SVM should be the reference. But this could be resolved by scheduling OSL tests first, then SVM second. And it shouldn't matter as OSL and SVM should match.Use blocklist name for blocked tests
andEnable MNEE tests on Metal
. Should those also be backported? Or should I create a 4.2 version of just this PR? - Up to Philipp to decideRef #123012
5d8f82c912
tof8a4d702d8
@Sergey and @weizhen can I get your input on some things?
Failing noise tests
image below)Note: If you run this locally you will notice there are three other tests I haven't blocked that are failing. I have submitted a PR that fixes two of them: !124673
The other is theīmage_log_osl
test. Theīmage_log_osl
test is expected to be different between OSL and SVM. So there are OSL and SVM variants of this test. The issue is that the OSL variant doesn't have OSL turned on, and so the test was wrong. This pull request just exposes that.Has been fixed in main.
I would suggest narrowing the scope of the first step. Surely ideally all permutations will be tested, especially on the CI/CD. Adding
WITH_CYCLES_TEST_OSL
disabled by default which will enable rendering all tests with OSL will be the good first step.On the implementation level it is quite strange to have render-engine-specific code in a generic base class. More ideally would be to subclass
render_report.Report
incycles_render_tests.py
and implement all specific logic as method overrides.Image tests will be too different between OSL and SVN due to the difference in image sampling. But the rest of the files is not immediately clear to me why they are so different.
@ -702,6 +702,22 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS)
-blacklist ${_cycles_blacklist}
)
if(WITH_CYCLES_TEST_OSL AND WITH_CYCLES_OSL)
Will this create
cycles_osl_osl
test, since we already have osl folder?You mean the commandline output from
make test
? It'scycles_osl_cpu_osl
Ah indeed. But is it just
cycles_osl_cpu_osl
, or do we have bothcycles_osl_cpu_osl
andcycles_osl_cpu
with this change?It creates both. Would you like me to change it so the tests in the OSL folder to only run if
WITH_CYCLES_TEST_OSL
is enabled?We could make it so:
WITH_CYCLES_TEST_OSL=OFF
then we addcycles_osl_cpu
as we do it now (so nothing changes compared to the state prior to this PR, for neither test coverage, nor for people).WITH_CYCLES_TEST_OSL=ON
then we addcycles_osl_cpu_osl
(and potentiallycycles_osl_optix_osl
), so that we test everything supported on OSL, at a cost of potentially longer test run times).Sounds a bit convoluted, but it avoids running essentially the same test twice, and also keeps it so the basics of OSL are always tested, even by people who don't necessarily want to test all device/shading models permutations.
How does this sound to you?
For the buildbot-only configurations I've just landed #124892 which makes it much easier to tweak CMake options which we want to have on the buildbot but not on a local configurations.
So if we want OSL tests enabled by default on the build bot, I should just add
set(WITH_CYCLES_TEST_OSL ON CACHE BOOL "" FORCE)
to/build_files/cmake/config/blender_release.cmake
?And do you want this enabled by default on the build bot in this first iteration?
No, you add them to
build_files/buildbot/config/blender_{liinux,macos,windows}.cmake
. Similarly to theset(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
.The
blender_release.cmake
is whatmake release
will use, and what buildbot is basing its configuration on, with ability override some things.For enabling by default on buildbot -- it depends. If we can do things to pass quickly, then we might as well. One way forward with this would be to have somewhat longer block-list than it will be in ideal world.
If there are scenes where we need to have a more dedicated look then i'm totally open for having it as a disabled-for-now but make-it-easy-to-look-into option.
render_passes.*.blend
andprincipled.*.blend
in the block list when only a few tests that match that expression are failing). But it means people can interate in those areas and not be afraid of Cycles OSL suddenly reporting a failure.Feel free to ask the build bot to run these tests. I've primarily been testing on ARM macOS and there may be more failing tests I missed on other platforms.
WIP: Add the option to test with OSL enabled in Cycles render teststo Add the option to test with OSL enabled in Cycles render testsAdd the option to test with OSL enabled in Cycles render teststo Cycles render tests: Add the option to test with OSL enabled@blender-bot build
@blender-bot build
Just to recap the current state of this PR.
Open questions:
Leave them in the blocklist for now, re-iterate later.
We should try to keep scoping narrow, and look into discovered issues as a follow-up.
I don't really think so. It is not different from the metal tests running after CPU i.e.
When I update reference image i explicitly specify the test with the device name in it to avoid the exact issue you've described. I think others do the same.
We can update the report template to explicitly include device type there, for easier copy-paste.
If you can update the PR against the latest
main
, I think it will be ready to land. From reading the code I can't spot stoppers (but hasn't been able to test it locally yet, but I can't imagine anything big will be discovered then).@ -708,0 +721,4 @@
-testdir "${TEST_SRC_DIR}/render/${render_test}"
-outdir "${TEST_OUT_DIR}/cycles_osl"
-device ${_cycles_device}
-blocklist ""
Can we just skip the
-blocklist
argument?Simply removing results in errors like
This can probably be fixed by adjusting
parser.add_argument("-blocklist", nargs="*")
, but I haven't looked into yet. I'll test it in a few hours.Ah, good point. I think
parser.add_argument("-blocklist", nargs="*", default=[])
would do the trick.Was right in the middle of running the test suite to make sure it worked.
@ -23,3 +24,3 @@
BLOCKLIST_OSL = [
BLOCKLIST_EXPLICIT_OSL = [
# OSL only supported on CPU.
The comment needs to be updated to reflect nowadays realities. Maybe just remove it.
I'd also suggest adding some comment around
BLOCKLIST_OSL
andBLOCKLIST_EXPLICIT_OSL
:@blender-bot build
Thanks for the updates. I'll wait for the tests to officially finish, and land the change.
It adds abut 40sec (on Linux) time to tests, but all things considered I think this is a good trade-off.
For the 4.2, the
Use blocklist name for blocked tests
seems fine to port. TheEnable MNEE tests on Metal
i am not fully sure what it is about, can't see an exact commit. Does it require some change that i not in 4.2 yet?I don't know the full list of changes that need to be backported to avoid merge conflicts. All I remember is what I had to deal with when merging main into my branch during development.
The main ones were:
Enable MNEE tests on Metal:
ef010da315
Rename to blocklist:
935c49f1cf
Fix typo from the blocklist rename (Thank you Sergey):
35198ec363
I don't see any issue with porting those. Basically, as long as ti is about expanding the coverage of tests that's all fine.
I'd just want to be a bit careful with porting commits that might change the look of renders.
That makes sense. I've added them to the LTS task
Edit: Temporarily removed because vector math tests will fail due to assert on release on build bot.