Repository navigation
Conversation
Pick CUDA, then Intel XPU, then the CPU as the default device in the scripts that run the model and in the LIBERO evaluator, which also finds Intel GPUs and pins its workers to them with ZE_AFFINITY_MASK. The latency benchmarks use the matching torch.cuda or torch.xpu calls. CUDA behavior is unchanged. The README gets a short XPU install section.
A worker pinned to a missing or unusable GPU used to fail when it moved the model to CUDA. With the CUDA, XPU, CPU fallback it loaded on the CPU and ran the whole evaluation there. The code that needed CUDA before (the LIBERO evaluator worker, policy_example.py and the --verify step of prepare_release_checkpoint.py) now uses CUDA or XPU and raises when neither is usable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Inference now runs on Intel GPUs through PyTorch's XPU backend. CUDA behavior is unchanged.
tapestry/utils/device.py:default_device()(CUDA, else XPU, else CPU) andgpu_device()(CUDA, else XPU, raises when neither is usable).scripts/policy_example.pyandprepare_release_checkpoint.py --verifyusegpu_device(), so a process without a usable GPU stops at start, as with the previous hard-coded"cuda".eval_teacher_forced.pyandeval_determinism_at_t.pykeep their CPU fallback.visible_gpus()falls back to Intel GPUs when CUDA has none, and each worker is pinned withZE_AFFINITY_MASKnext toCUDA_VISIBLE_DEVICES.torch.cudaortorch.xputo match the device.torch==2.13.*from the XPU index stays inside the existingtorch<2.14pin.visible_gpus()and for a worker without a usable GPU.How it was checked
On an Intel Core Ultra 9 285H with Arc integrated graphics:
tapestry.pt,TapestryPolicy.actin fp32, XPU against CPU, 4 inputs with 3 noise seeds each, the action noise drawn on the CPU and shared: max abs diff 8.5e-05, cosine 1.0000000 (torch 2.15.0+xpu); max abs diff 8.3e-05 with torch 2.13.0+xpu installed by the new README lines.eval_libero_parallel.pyandpolicy_example.pyin LIBERO with a checkpoint built fromcfg/train_libero.yamland an untrained action head: workers start on XPU, render and step. Pinned to a device id with no GPU, the worker stops at start with a clear error.prepare_release_checkpoint.py --verify,eval_determinism_at_t.py,eval_teacher_forced.pyand both latency benchmarks run on XPU.pytest tests/: 166 passed.Notes
train.py) is unchanged and has only been run on CUDA.AGENTS.mdstill describes NVIDIA GPUs.