Skip to content

[REFACTOR] Enhance SlimmableWavenet model management#258

Merged
sdatkinson merged 5 commits intomainfrom
257-slim-rts
Apr 28, 2026
Merged

[REFACTOR] Enhance SlimmableWavenet model management#258
sdatkinson merged 5 commits intomainfrom
257-slim-rts

Conversation

@sdatkinson
Copy link
Copy Markdown
Owner

  • Introduced a staging model mechanism to allow for smoother transitions between model configurations without interrupting real-time processing.
  • Refactored the model rebuilding logic into separate functions for clarity and maintainability.
  • Updated the SetSlimmableSize method to utilize the new staging approach, improving performance during model updates.

Resolves #257

- Introduced a staging model mechanism to allow for smoother transitions between model configurations without interrupting real-time processing.
- Refactored the model rebuilding logic into separate functions for clarity and maintainability.
- Updated the SetSlimmableSize method to utilize the new staging approach, improving performance during model updates.
…ions

- Replaced unique_ptr with shared_ptr for active and staging models to enable safe concurrent access.
- Introduced StagedSlimModel struct to encapsulate model and channel information for atomic staging.
- Updated model rebuilding and staging logic to utilize atomic operations, ensuring data-race-free transitions during processing.
- Enhanced process, prewarm, and Reset methods to work with the new atomic staging mechanism, improving real-time performance.
…l handling

- Refactored pending model management to use a consistent approach for both libc++ and other STL implementations.
- Introduced private methods for atomic operations on the pending staged model, enhancing clarity and maintainability.
- Updated model rebuilding and staging logic to utilize the new methods, ensuring data-race-free transitions during processing.
- Introduced a new option, NAM_USE_LIBCXX_LINUX, to allow users to select libc++ for Linux builds.
- Updated CMakeLists.txt to conditionally link against stdc++fs or libc++ based on the new option.
- Enhanced compatibility for projects using Clang with libc++ on Linux, improving build flexibility.
Exercises the _LIBCPP_VERSION code path; checkout v4 on both jobs.

Made-with: Cursor
@sdatkinson sdatkinson merged commit c4a82a0 into main Apr 28, 2026
4 checks passed
synchu pushed a commit to synchu/NeuralAmpModelerCore that referenced this pull request Apr 29, 2026
* [REFACTOR] Enhance SlimmableWavenet model management

- Introduced a staging model mechanism to allow for smoother transitions between model configurations without interrupting real-time processing.
- Refactored the model rebuilding logic into separate functions for clarity and maintainability.
- Updated the SetSlimmableSize method to utilize the new staging approach, improving performance during model updates.

* [REFACTOR] Improve SlimmableWavenet model handling with atomic operations

- Replaced unique_ptr with shared_ptr for active and staging models to enable safe concurrent access.
- Introduced StagedSlimModel struct to encapsulate model and channel information for atomic staging.
- Updated model rebuilding and staging logic to utilize atomic operations, ensuring data-race-free transitions during processing.
- Enhanced process, prewarm, and Reset methods to work with the new atomic staging mechanism, improving real-time performance.

* [REFACTOR] Update SlimmableWavenet atomic operations for pending model handling

- Refactored pending model management to use a consistent approach for both libc++ and other STL implementations.
- Introduced private methods for atomic operations on the pending staged model, enhancing clarity and maintainability.
- Updated model rebuilding and staging logic to utilize the new methods, ensuring data-race-free transitions during processing.

* [FEATURE] Add option for using libc++ on Linux in CMake configuration

- Introduced a new option, NAM_USE_LIBCXX_LINUX, to allow users to select libc++ for Linux builds.
- Updated CMakeLists.txt to conditionally link against stdc++fs or libc++ based on the new option.
- Enhanced compatibility for projects using Clang with libc++ on Linux, improving build flexibility.

* Add GitHub Actions job to build and test with libc++ on Linux

Exercises the _LIBCPP_VERSION code path; checkout v4 on both jobs.

Made-with: Cursor
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.

[BUG] Channel-slicing WaveNet's SetSlimmableSize() isn't real-time safe

1 participant