Skip to content

implement torch.linalg.pinv xpu backend #1902

@yao-matrix

Description

@yao-matrix

🚀 The feature, motivation and pitch

torch.linalg.pinv is used by PEFT LORA-FA finetuning. Now, it will show below log on xpu:

/usr/local/lib/python3.11/dist-packages/peft/optimizers/lorafa.py:149: UserWarning: Aten Op fallback from XPU to CPU happends. This may have performance implications. If need debug the fallback ops please set environment variable PYTORCH_DEBUG_XPU_FALLBACK=1 (Triggered internally at /pytorch/build/xpu/ATen/RegisterXPU_0.cpp:54525.)
AA_T_inv = torch.linalg.pinv(AA_T + delta * torch.eye(A.shape[0]).to(A.device))

Pls plan xpu backend for this op

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions