chore: remove unused set_current_device_sm_limit setters - #249
chore: remove unused set_current_device_sm_limit setters#249veyron-kairo wants to merge 1 commit into
Conversation
set_current_device_sm_limit is declared in the header but never defined or called, and set_current_device_sm_limit_scale is defined but never called anywhere in the tree (including test/). Remove both, as suggested in Project-HAMi#231. The sm_init_flag field that the scale setter touched is left in the shared-region struct to keep its cross-process memory layout stable; with the setter gone it is simply initialized to 0 and never read. Fixes Project-HAMi#231 Signed-off-by: Shridhar Panigrahi <198173519+veyron-kairo@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: veyron-kairo The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @veyron-kairo! It looks like this is your first PR to Project-HAMi/HAMi-core 🎉 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThe change removes the SM-limit scaling function from the implementation and removes the public declarations for both SM-limit setter APIs. ChangesSM-limit API removal
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
What this does
Removes two unused functions flagged in #231:
set_current_device_sm_limit(int dev, int scale)— declared in the header but never defined or called.set_current_device_sm_limit_scale(int dev, int scale)— defined but never called anywhere in the tree, includingtest/.A repo-wide search confirms neither symbol is referenced outside its own declaration/definition.
The
sm_init_flagfield that the scale setter used to touch is intentionally left in the shared-region struct — it is part of the memory-mapped, cross-process layout, so removing it would be a compatibility change beyond the scope of this cleanup. With the setter gone it is only initialized to0and never read, which is inert.Credit to @KaminariOS for spotting these in #231.
Verification
Repo-wide
grepconfirms no remaining references. I was not able to run a full build locally (it needs the CUDA toolkit), but since the removed symbols have no callers or other definitions, the removal cannot affect compilation — thebuild-in-dockertarget / CI will confirm.Fixes #231
Summary by CodeRabbit