Skip to content

Add transpose to torch/csrc/stable #158160

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

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update on "Add transpose to torch/csrc/stable"
[ghstack-poisoned]
  • Loading branch information
mikaylagawarecki committed Jul 16, 2025
commit bdb90cd616a73b5800777574659a47605eebb43a
7 changes: 2 additions & 5 deletions torch/csrc/stable/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@

using torch::stable::Tensor;

// We expect this to be the stable version of the tranpose op with identical
// We expect this to be the stable version of the transpose op with identical
// semantics to the existing transpose.int op.
inline Tensor transpose(const Tensor& self, int64_t dim0, int64_t dim1) {
const auto num_args = 3;
std::array<StableIValue, num_args> stack{};
stack[0] = from(self);
stack[1] = from(dim0);
stack[2] = from(dim1);
std::array<StableIValue, num_args> stack{from(self), from(dim0), from(dim1)};
AOTI_TORCH_ERROR_CODE_CHECK(
aoti_torch_call_dispatcher("aten::transpose", "int", stack.data()));
return to<Tensor>(stack[0]);
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy