perf: SIMD loop optimizations and stream resolution stabilization#65
Merged
Conversation
This commit stabilizes cacao by migrating from ERRMODE_ABORT to ERRMODE_WARN across 25+ files, and implements MILK_RESTRICT / MILK_ASSUME_ALIGNED to enable autovectorization in high-frequency module loops.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR stabilizes the
cacaomodule ecosystem and aligns it with recent framework performance optimizations.Key Changes
ERRMODE_ABORTtoERRMODE_WARNacross 26 files. This prevents the entire compute unit from aborting when encountering missing or disconnected streams.RETURN_FAILUREchecks inspotpos.c,AOloopControl_DM_comb.c, andDMturbulence.cafterresolveIMGIDcalls, ensuring that stream failures propagate gracefully without segmentation faults.linopt_imtools_makeCPAmodesfunction calls incompute_control_modes.candAOloopControl_computeCalib_loDMmodes.cto match the latest 19-argument signature introduced inmilk'sframework-devbranch, resolving standing compilation errors.MILK_RESTRICTandMILK_ASSUME_ALIGNEDdirectives into hot loops withinao188_preprocessor.cto enable GCC auto-vectorization.Testing
cacaoand its plugins withmake -j$(nproc)from themilk/_builddirectory.linopt_imtools_makeCPAmodesandRETURN_FAILUREtype mismatch compiler errors.Prompt Summary
The user requested the stabilization and performance hardening of the
cacaoplugin ecosystem, analogous to the optimizations recently deployed tomilk. Specifically, the request entailed replacingERRMODE_ABORTwithERRMODE_WARN, implementing graceful failure paths, and injecting SIMD pointer hints (MILK_RESTRICT/MILK_ASSUME_ALIGNED). After encountering build failures due to type mismatches and upstream API changes, manual compilation fixes were applied to restore thecacaobuild.AI Authorship