viable/strict/1792101043: Fix PagedAttention defaulting to CUDA on non-CUDA accelerators (#196191)
- PyTorch: 2378 events in the last 90 days
- PyTorch: 2346th Release in the last 90 days
- Previous: earlier the same day · viable/strict/1792099671
What happened
Summary PagedAttention.__init__ defaulted device to the literal string "cuda" , even though nothing else in the class is CUDA-specific: every tensor allocation already threads the device parameter through generically ( torch.ones/zeros(..., device=device) ), and later methods ( reserve , convert_logical_block_mask ) derive their device from existing tensors rather than hardcoding anything. The class is already exerc…
Summary assembled by rule from the sources below