Skip to content

Fix derived function reflection hot reload - #1086

Draft
ccummingsNV wants to merge 1 commit into
mainfrom
dev/ccummings/hotreload-fix
Draft

Fix derived function reflection hot reload#1086
ccummingsNV wants to merge 1 commit into
mainfrom
dev/ccummings/hotreload-fix

Conversation

@ccummingsNV

Copy link
Copy Markdown
Contributor

Summary

  • retain each function's directly derived overloads and specializations with the type information needed to recreate them
  • recursively refresh derived reflection objects when their parent function is refreshed
  • match overloads by parameter signature so declaration reordering remains compatible
  • extend native reflection hot-reload coverage to direct and nested derived functions

Root cause

Layout hot reload refreshed named functions, but overload and specialization objects are created outside the named-function cache. Those live objects therefore retained invalid low-level reflection after device hot reload, which could terminate Python when Falcor2 reused a specialized path-tracer function.

Keeping the derivation tree on Function lets each refreshed parent repair its existing children. If the corresponding overload, specialization, or argument type no longer exists, the child remains invalid as expected.

Validation

  • VS2022 17.10 Release build: slangpy_ext, falcor2_ext, and falcor2_tests
  • focused native hot-reload test: 40 assertions passed
  • full native SlangPy suite: 196 passed, 1 skipped; 14,884 assertions
  • Python reflection hot-reload tests: 6 passed across D3D12, Vulkan, and CUDA
  • real watched-file D3D12 invalidation reproduced and verified for overload, specialization, and nested specialization objects
  • pre-commit run --all-files

@CLAassistant

CLAassistant commented Jul 31, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 077344e7-d43b-4536-b787-2c8a2b26c9c9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants