Pull requests / #1528

#1528 sycl: size a card from the DRM fdinfo only when the driver reports it entirely free

open · @Arthur031221 · 0 comments · View on GitHub

Security

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 <[email protected]>
Co-authored-by: crobe201 <[email protected]>

Related on strata.com

Editorial links to help you install, pick models, or read release notes — not part of the upstream thread.