Skip to content

Don't emit pointless copy-to-host in CPU only pipelines#9139

Open
abadams wants to merge 2 commits into
mainfrom
abadams/no_host_copies_in_cpu_kernels
Open

Don't emit pointless copy-to-host in CPU only pipelines#9139
abadams wants to merge 2 commits into
mainfrom
abadams/no_host_copies_in_cpu_kernels

Conversation

@abadams
Copy link
Copy Markdown
Member

@abadams abadams commented May 14, 2026

Running inject_host_dev_buffer_copies on CPU-only pipelines was injecting no-op copy-to-host calls. Benign, but they clutter the profiler output. They're guaranteed to be no-ops because they come after an assertion that device_dirty is false.

This PR just manually sets host dirty flags in AddImageChecks alongside the code that asserts device_dirty is false, instead of running the full pass.

I also removed a pointless false-initialization of a field that was already set to false at the member declaration.

Running inject_host_dev_buffer_copies on CPU-only pipelines was
injecting no-op copy-to-host calls. Benign, but they clutter the
profiler output. They're guaranteed to be no-ops because they come after
an assertion that device_dirty is false.

This commit just manually sets host dirty flags in AddImageChecks
alongside the code that asserts device_dirty is false, instead of
running the full inject_host_dev_buffer_copies pass on CPU-only
pipelines.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@d58798a). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9139   +/-   ##
=======================================
  Coverage        ?   69.79%           
=======================================
  Files           ?      255           
  Lines           ?    77527           
  Branches        ?    18534           
=======================================
  Hits            ?    54109           
  Misses          ?    17968           
  Partials        ?     5450           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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