Add regression test for recursive BackwardDifferentiable hang (#10066)#10067
Add regression test for recursive BackwardDifferentiable hang (#10066)#10067rkoivunen-sw wants to merge 1 commit intoshader-slang:masterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughAdds a new ignored regression test that reproduces a hang in the backward-differentiation path by invoking the backward-diff extension on a recursive BackwardDifferentiable function. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/bugs/recursive-backward-diff-hang.slang`:
- Around line 7-8: Update the manual reproduction comment to use the correct
filename: replace the incorrect `bug-report-03-recursive-hang.slang` string with
`recursive-backward-diff-hang.slang` in the reproduction command comment so the
timeout example matches the actual file name; look for the reproduced command
line containing `timeout 10 ... -entry computeMain -stage compute` and edit that
filename.
80b91d8 to
21280fb
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/bugs/recursive-backward-diff-hang.slang`:
- Around line 1-8: The two manual repro command lines in the comment block are
inconsistent; update them so both use the same timeout and target to avoid
confusion (e.g., change "timeout 5 slangc recursive-backward-diff-hang.slang
-target glsl -entry computeMain -stage compute" to match "timeout 10 slangc
recursive-backward-diff-hang.slang -target spirv -entry computeMain -stage
compute" or vice versa). Locate the two command strings ("timeout 5 slangc ..."
and "timeout 10 slangc ...") in the file and make them identical (same timeout
value and same -target) so the documentation is unambiguous.
| // Regression test for https://github.com/shader-slang/slang/issues/10066 | ||
| // Compiler hangs on recursive [BackwardDifferentiable]. Uses TEST_IGNORE_FILE until fixed. | ||
| // Run manually: timeout 5 slangc recursive-backward-diff-hang.slang -target glsl -entry computeMain -stage compute | ||
|
|
||
| //TEST_IGNORE_FILE: | ||
|
|
||
| // To reproduce the hang manually (with timeout): | ||
| // timeout 10 slangc recursive-backward-diff-hang.slang -target spirv -entry computeMain -stage compute |
There was a problem hiding this comment.
Align the two manual repro commands to avoid confusion.
You currently document two different timeouts/targets. Consider consolidating or making them identical so the instructions are unambiguous.
💡 Suggested alignment
-// Run manually: timeout 5 slangc recursive-backward-diff-hang.slang -target glsl -entry computeMain -stage compute
+// Run manually: timeout 5 slangc recursive-backward-diff-hang.slang -target glsl -entry computeMain -stage compute
...
-// To reproduce the hang manually (with timeout):
-// timeout 10 slangc recursive-backward-diff-hang.slang -target spirv -entry computeMain -stage compute
+// To reproduce the hang manually (with timeout):
+// timeout 5 slangc recursive-backward-diff-hang.slang -target glsl -entry computeMain -stage compute🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tests/bugs/recursive-backward-diff-hang.slang` around lines 1 - 8, The two
manual repro command lines in the comment block are inconsistent; update them so
both use the same timeout and target to avoid confusion (e.g., change "timeout 5
slangc recursive-backward-diff-hang.slang -target glsl -entry computeMain -stage
compute" to match "timeout 10 slangc recursive-backward-diff-hang.slang -target
spirv -entry computeMain -stage compute" or vice versa). Locate the two command
strings ("timeout 5 slangc ..." and "timeout 10 slangc ...") in the file and
make them identical (same timeout value and same -target) so the documentation
is unambiguous.
21280fb to
53fd9ca
Compare
Adds regression test for #10066
The test uses
//TEST_IGNORE_FILE:because the unfixed compiler hangs. It will be ignored by CI until the bug is fixed. To verify manually:timeout 5 slangc tests/bugs/recursive-backward-diff-hang.slang -target glsl -entry computeMain -stage compute -o /dev/null # Exit 124 = timeout (confirming hang)