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

Revert embedding dataformat cast #59

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

pmarkovicTT
Copy link
Contributor

@pmarkovicTT pmarkovicTT commented Jan 27, 2025

We don't need explicit embedding dataformat cast in tvm (from float32 to bf16) as dataformat workaround for this case is implemented in mlir.

PRs for reference:

Related to this issue tenstorrent/tt-forge-fe#1112

@pmarkovicTT pmarkovicTT merged commit 705bca2 into main Jan 27, 2025
8 checks passed
pmarkovicTT added a commit to tenstorrent/tt-forge-fe that referenced this pull request Feb 7, 2025
#1111)

### Ticket
Close #1112

### Problem description
We don't need explicit embedding dataformat cast in tvm (from float32 to
bf16) as dataformat workaround for this case is implemented in mlir.

PRs for reference:
- [TVM change](tenstorrent/tt-tvm#59)
- [Embedding Op
workaround](tenstorrent/tt-mlir#1583)
- [EmbeddingBackward Op
workaround](tenstorrent/tt-mlir#1756)

### What's changed
Removed explicit cast to bfloat16 if dataformat for embedding weights is
float32.
Updated llama backward test to reflect new forge api for training
(setting training argument).

### Checklist
- [x] Remove explicit cast in
third_party/tvm/python/tvm/relay/frontend/pytorch.py
- [x] Update test_llama_backward.py

---------

Co-authored-by: Vladimir Milosevic <157983820+vmilosevic@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants