Skip to main content

Screen capture to PyTorch XPU tensors on Intel GPUs

Project description

wc_xpu

A wrapper around windows-capture that captures the screen directly into PyTorch XPU tensors on Intel GPUs, avoiding CPU memory copies and inter-device memory transfers.

Requires a PyTorch XPU build (pip install torch --extra-index-url https://download.pytorch.org/whl/xpu). Only works on x64 Windows with Intel Arc or Intel Iris Xe graphics.

Usage

from wc_xpu import WindowsCapture

capture = WindowsCapture(
    monitor_index=1,
    reuse_output_buffer=True,
    output_buffer_count=4,
)

When buffer reuse is enabled, tensors may be overwritten after several frames (ring-buffer behavior), so clone tensors in your callback if you need to keep them long-term.

Credits

This was written by gemini-cli and Claude Code. Originally written by NiiightmareXD windows-capture-python and forked from Nagadomi wc_cuda, then further optimized by Claude Code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wc_xpu-0.1.3.post1-cp310-abi3-win_amd64.whl (188.0 kB view details)

Uploaded CPython 3.10+Windows x86-64

File details

Details for the file wc_xpu-0.1.3.post1-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: wc_xpu-0.1.3.post1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 188.0 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for wc_xpu-0.1.3.post1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2771ecc0eed96f3084d4741231301e5d6e9abddf97da0a390ec846df66b81641
MD5 e8dc38bef8f9d89bdaaee229e92ee738
BLAKE2b-256 d0ed8d4abc934f6b6c0915e50c22d4fd367a1fb544c6c86f0e301de7ac811730

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page