Skip to content

feat: accelerate inference#405

Merged
begumcig merged 11 commits intomainfrom
feat/accelerate-inference
Oct 22, 2025
Merged

feat: accelerate inference#405
begumcig merged 11 commits intomainfrom
feat/accelerate-inference

Conversation

@begumcig
Copy link
Copy Markdown
Member

@begumcig begumcig commented Oct 14, 2025

Description

Related Issue

Fixes #(issue number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes


Note

Revamps device management across engine/evaluation/metrics with accelerate-aware utilities, adds a new image sharpness metric, updates tutorials/docs, and expands tests for multi-device compatibility.

  • Engine/Runtime:
    • Add robust device utilities: device_to_string, split_device, find_bytes_free_per_gpu, enhanced set_to_best_available_device, _resolve_cuda_device, and move_to_device with accelerate device map support and GPTQ consistency.
    • get_device now preserves indices and accelerate state; unify batch device moves via move_batch_to_device in InferenceHandler.
  • Evaluation/Task:
    • Task now auto-selects devices, separates inference vs. stateful metric devices (stateful_metric_device, low_memory), and builds metrics accordingly.
    • EvaluationAgent ensures model/task device consistency, preserves/restores device map, and runs metrics on correct devices.
  • Metrics:
    • Introduce runs_on/device validation and movement in StatefulMetric/BaseMetric and metric implementations.
    • Update time/energy/memory/architecture/CLIP metrics to use new device flow; add sync timing across multiple CUDA devices.
    • New SharpnessMetric for blind IQA and export via metrics/__init__.py.
  • Docs/Tutorials:
    • Update metric customization guide with device support (runs_on, move_to_device).
    • Notebooks: switch to move_to_device(...) helper.
  • Tests:
    • Add comprehensive device-compatibility and accelerate-distributed tests; adjust existing tests to new APIs.
  • Tooling:
    • Pre-commit: tweak trufflehog invocation and refine local grep hook.

Written by Cursor Bugbot for commit 72c8c4a. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@begumcig begumcig force-pushed the feat/accelerate-inference branch from 4f8f23d to 06c8c5d Compare October 22, 2025 08:45
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@begumcig begumcig closed this Oct 22, 2025
@begumcig begumcig reopened this Oct 22, 2025
@begumcig begumcig merged commit 792f980 into main Oct 22, 2025
10 checks passed
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.

2 participants