Skip to content

Could Torchrec support PyTorch's PrivateUse1 Dispatch Key? #3525

@kwgqjj

Description

@kwgqjj

Hello,

I've noticed that there are many conditional checks like if device.type == "cuda" in our TorchRec codebase. Without modifying TorchRec's source code, such fixed conditional logic might not be flexible enough to conveniently support third-party devices. From what I understand, PyTorch has introduced the PrivateUse1 DispatchKey to address third-party device extension issues. I'd like to ask if our TorchRec repository could add support for PyTorch's PrivateUse1 DispatchKey? This would enable third-party devices to seamlessly adapt TorchRec's functionality through PrivateUse1 without requiring code modifications.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions