[PR #1528] [CLOSED] sycl: size a card from the DRM fdinfo only when the driver reports it entirely free #3511

Closed
opened 2026-11-07 14:41:59 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1528
Author: @Arthur031221
Created: 10/8/2026
Status: ❌ Closed

Base: main ← Head: sycl-drm-free-figure


📝 Commits (1)

  • a15ea2d sycl: the DRM fdinfo replaces the driver's free figure only when the driver reports the whole card free

📊 Changes

4 files changed (+52 additions, -2 deletions)

View changed files

📝 sycl/CMakeLists.txt (+4 -0)
➕ sycl/include/strata/sycl_drm_free.hpp (+11 -0)
➕ sycl/src/core/drm_free_test.cpp (+34 -0)
📝 sycl/src/core/expert_cache.cpp (+3 -2)

📄 Description

Title

Issue: Part of #1440 (item 2)

Summary

On a layer split across two Arc cards on xe, the second card's expert cache doesn't open. device_free_bytes() charges it with the first card's cache and both cards' weights. On the issue's B70 pair it reads 3.81 GiB free, while the driver reports 26.97 of 31.89 GiB.

What changed

The DRM fdinfo total sums every card the process holds. It can only replace the driver's figure where the driver reports the whole card as free, as an Arc A750 on i915 does. drm_total_replaces_free (sycl/include/strata/sycl_drm_free.hpp) now requires the driver's figure to be within 16 MiB of the total. sycl/src/core/drm_free_test.cpp covers the issue's numbers and the A750 case:

g++ -std=c++20 -Isycl/include sycl/src/core/drm_free_test.cpp && ./a.out

Extra Notes

Builds on the patch @maxious posted in the issue, which @crobe201 had also suggested. Matching drm-pdev per card would also cover several i915 cards, but I can't check that query here. I couldn't compile the SYCL target either.

Assisted by Claude/Codex.

Co-authored-by: Alex Sadleir 81432+maxious@users.noreply.github.com
Co-authored-by: crobe201 273473305+crobe201@users.noreply.github.com


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1528 **Author:** [@Arthur031221](https://github.com/Arthur031221) **Created:** 10/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `sycl-drm-free-figure` --- ### 📝 Commits (1) - [`a15ea2d`](https://github.com/Niko1221/Strata/commit/a15ea2dcdb90af17bfe917a9f0c93c31dbbf771a) sycl: the DRM fdinfo replaces the driver's free figure only when the driver reports the whole card free ### 📊 Changes **4 files changed** (+52 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `sycl/CMakeLists.txt` (+4 -0) ➕ `sycl/include/strata/sycl_drm_free.hpp` (+11 -0) ➕ `sycl/src/core/drm_free_test.cpp` (+34 -0) 📝 `sycl/src/core/expert_cache.cpp` (+3 -2) </details> ### 📄 Description ## Title Issue: Part of #1440 (item 2) ## Summary On a layer split across two Arc cards on xe, the second card's expert cache doesn't open. `device_free_bytes()` charges it with the first card's cache and both cards' weights. On the issue's B70 pair it reads 3.81 GiB free, while the driver reports 26.97 of 31.89 GiB. ## What changed The DRM fdinfo total sums every card the process holds. It can only replace the driver's figure where the driver reports the whole card as free, as an Arc A750 on i915 does. `drm_total_replaces_free` (`sycl/include/strata/sycl_drm_free.hpp`) now requires the driver's figure to be within 16 MiB of the total. `sycl/src/core/drm_free_test.cpp` covers the issue's numbers and the A750 case: ``` g++ -std=c++20 -Isycl/include sycl/src/core/drm_free_test.cpp && ./a.out ``` ## Extra Notes Builds on the patch @maxious posted [in the issue](https://github.com/Niko1221/Strata/issues/1440#issuecomment-6054684788), which @crobe201 had also suggested. Matching `drm-pdev` per card would also cover several i915 cards, but I can't check that query here. I couldn't compile the SYCL target either. Assisted by Claude/Codex. Co-authored-by: Alex Sadleir <81432+maxious@users.noreply.github.com> Co-authored-by: crobe201 <273473305+crobe201@users.noreply.github.com> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:41:59 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3511
No description provided.