Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PyTorch][Tensor] Introduce tensor.dim_order #106835

Closed
wants to merge 1 commit into from

Commits on Aug 24, 2023

  1. [PyTorch][Tensor] Introduce tensor.dim_order (pytorch#106835)

    Summary:
    Pull Request resolved: pytorch#106835
    
    This is a stride based attribute for a tensor available in Python.
    
    This can help inspect tensors generated using `torch.empty_permuted(.., physical_layout, ...)`, where physical_layout should match the dim_order returned here. `empty_permuted` will be renamed to use dim_order as the param name in the future. And also help Executorch export pipeline with implementing dim_order based tensors.
    
    Importing in the function to avoid circular dependency on torch.Tensor.
    
    Reviewed By: ezyang
    
    Differential Revision: D48134476
    
    fbshipit-source-id: 58513d445931d122af77ac1e04d35eec36cb4c3a
    digantdesai authored and facebook-github-bot committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    15b9e64 View commit details
    Browse the repository at this point in the history