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

Binary op operand swap #1124

Open
jnie-TT opened this issue Oct 31, 2024 · 2 comments
Open

Binary op operand swap #1124

jnie-TT opened this issue Oct 31, 2024 · 2 comments
Assignees

Comments

@jnie-TT
Copy link
Contributor

jnie-TT commented Oct 31, 2024

We're currently swapping the operands for binary ops in runtime if the lhs operand is smaller (and requires broadcast onto the rhs operand).

  // Switch the order of operands if the second operand requires broadcast
  if ((*rhs)->volume() < (*lhs)->volume()) {
    std::swap(*lhs, *rhs);
  }

Metal will push a fix on their side, once we uplift their fix we should remove this workaround.

Blocked by tenstorrent/tt-metal#13566

@uazizTT
Copy link
Contributor

uazizTT commented Oct 31, 2024

We don't intend to fix it in the compiler as it should be fixed in tt-metal, this is the reported issue in tt-metal to track it. tenstorrent/tt-metal#13566

Once tt-metal fixes it on their end, this workaround can be removed, but until then it can be guarded as a workaround in runtime.

@jnie-TT
Copy link
Contributor Author

jnie-TT commented Oct 31, 2024

Thanks @uazizTT I'll keep this issue open to track this on the mlir side, once metal merges a fix and we uplift it, I'll remove the workaround and close this issue.

@jnie-TT jnie-TT changed the title Move binary op operand swap to compiler Binary op operand swap Oct 31, 2024
@jnie-TT jnie-TT assigned jnie-TT and unassigned uazizTT Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants