KEMBAR78
set_default_device/torch.device has performance impact for non-factory functions · Issue #92701 · pytorch/pytorch · GitHub
Skip to content

set_default_device/torch.device has performance impact for non-factory functions #92701

@ezyang

Description

@ezyang

🐛 Describe the bug

Because it is implemented as a TorchFunctionMode, we interpose ALL functions even if we actually do nothing on those functions. We have ideas for how to optimize this but have delayed doing so until someone actually has a problem. This is a placeholder issue to track people having this problem.

Versions

master

cc @hameerabbasi @rgommers @peterbell10 @soumith @msaroufim @wconstab @ngimel @bdhirsh

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: __torch_function__module: performanceIssues related to performance, either of kernel code or framework gluetriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions