Skip to content

Use the cached task-local SYCL queue for oneMKL FFT plans#586

Draft
michel2323 wants to merge 1 commit into
mainfrom
fft-sycl-queue-lifetime
Draft

Use the cached task-local SYCL queue for oneMKL FFT plans#586
michel2323 wants to merge 1 commit into
mainfrom
fft-sycl-queue-lifetime

Conversation

@michel2323

Copy link
Copy Markdown
Member

Summary

_create_descriptor built fresh syclDevice/syclContext/syclQueue objects for every FFT plan. Once those wrappers become garbage, their finalizers (syclQueueDestroy etc.) tear down SYCL runtime state for the still-in-use underlying Level Zero queue, corrupting later DFT commits and crashing at process exit.

This switches _create_descriptor to the cached task-local sycl_queue(global_queue(...)) accessor that every other oneMKL wrapper (BLAS/LAPACK/sparse) already uses, so the plan shares the managed queue lifetime instead of owning a throwaway one.

Notes

Touches only the queue construction in _create_descriptor. The GC.@preserve rooting of lengths/strides already present on main (#582) is left untouched.

🤖 Generated with Claude Code

`_create_descriptor` built fresh syclDevice/syclContext/syclQueue
objects for every FFT plan. Once those wrappers become garbage their
finalizers (syclQueueDestroy etc.) tear down SYCL runtime state for the
still-in-use underlying Level Zero queue, corrupting later DFT commits
and crashing at process exit.

Use the cached task-local `sycl_queue(global_queue(...))` accessor that
every other oneMKL wrapper already uses, so the plan shares the managed
queue lifetime instead of owning a throwaway one.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.87%. Comparing base (e995a63) to head (be0cf3c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #586      +/-   ##
==========================================
- Coverage   80.92%   80.87%   -0.05%     
==========================================
  Files          48       48              
  Lines        3234     3232       -2     
==========================================
- Hits         2617     2614       -3     
- Misses        617      618       +1     

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant