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

Add TVM decomposition for masked_scatter op #1188

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ashokkumarkannan1
Copy link
Contributor

@ashokkumarkannan1 ashokkumarkannan1 commented Feb 6, 2025

Ticket

Fix #1187

Problem description

  • Missing PyTorch to TVM mapping / decomposition for masked_scatter

What's changed

  • Added TVM decomposition for masked_scatter
  • Remove decomposition for adv_index due to this error: tt-forge-fe/forge/csrc/passes/erase_inverse_ops.cpp:69: users.size() > 0 for the 3rd test case in Masked Scatter which is collected from the BevFormer Model

Copy link

github-actions bot commented Feb 6, 2025

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests510 ran451 passed59 skipped0 failed
TestResult
No test annotations available

Copy link

github-actions bot commented Feb 6, 2025

TestsPassed ☑️Skipped ⚠️Failed ❌️
TT-Forge-FE Tests568 ran473 passed79 skipped16 failed
TestResult
TT-Forge-FE Tests
pytest
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape0-indices_shape0]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape0-indices_shape1]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape0-indices_shape2]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape0-indices_shape3]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape1-indices_shape0]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape1-indices_shape1]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape1-indices_shape2]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape1-indices_shape3]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape2-indices_shape0]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape2-indices_shape1]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape2-indices_shape2]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape2-indices_shape3]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape3-indices_shape0]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape3-indices_shape1]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape3-indices_shape2]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape3-indices_shape3]❌ failure

1 similar comment
Copy link

github-actions bot commented Feb 6, 2025

TestsPassed ☑️Skipped ⚠️Failed ❌️
TT-Forge-FE Tests568 ran473 passed79 skipped16 failed
TestResult
TT-Forge-FE Tests
pytest
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape0-indices_shape0]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape0-indices_shape1]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape0-indices_shape2]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape0-indices_shape3]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape1-indices_shape0]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape1-indices_shape1]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape1-indices_shape2]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape1-indices_shape3]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape2-indices_shape0]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape2-indices_shape1]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape2-indices_shape2]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape2-indices_shape3]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape3-indices_shape0]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape3-indices_shape1]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape3-indices_shape2]❌ failure
test_tm.test_adv_index_embedding_decompostion[input_tensor_shape3-indices_shape3]❌ failure

@nvukobratTT
Copy link
Contributor

nvukobratTT commented Feb 6, 2025

@ashokkumarkannan1 seems like a few of tests are failing. Can we fix those before pushing for review? Until then, it can probably be a Draft PR? :))

@ashokkumarkannan1 ashokkumarkannan1 force-pushed the akannan/op_support_maskedscatter branch 3 times, most recently from fe819d8 to 05d38a5 Compare February 7, 2025 13:51
@ashokkumarkannan1 ashokkumarkannan1 force-pushed the akannan/op_support_maskedscatter branch from 05d38a5 to 161f799 Compare February 7, 2025 13:53
Copy link

github-actions bot commented Feb 8, 2025

TestsPassed ☑️Skipped ⚠️Failed ❌️
TT-Forge-FE Tests648 ran508 passed139 skipped1 failed
TestResult
TT-Forge-FE Tests
pytest
test_scatter_ops.test_masked_scatter[2d_masked_scatter]❌ failure

Copy link

github-actions bot commented Feb 8, 2025

TestsPassed ☑️Skipped ⚠️Failed ❌️
TT-Forge-FE Tests590 ran465 passed124 skipped1 failed
TestResult
TT-Forge-FE Tests
pytest
test_scatter_ops.test_masked_scatter[1d_masked_scatter]❌ failure

Copy link

github-actions bot commented Feb 8, 2025

TestsPassed ☑️Skipped ⚠️Failed ❌️
TT-Forge-FE Tests648 ran508 passed139 skipped1 failed
TestResult
TT-Forge-FE Tests
pytest
test_scatter_ops.test_masked_scatter[2d_masked_scatter]❌ failure

Copy link

github-actions bot commented Feb 8, 2025

TestsPassed ☑️Skipped ⚠️Failed ❌️
TT-Forge-FE Tests590 ran464 passed124 skipped2 failed
TestResult
TT-Forge-FE Tests
pytest
test_scatter_ops.test_masked_scatter[1d_masked_scatter]❌ failure
test_mobilenet_v2.test_mobilenetv2_basic❌ failure

ashokkumarkannan1 added a commit that referenced this pull request Feb 8, 2025
### Ticket
Fix #1177

### What's changed
Add Model tests for Llava Model

### Logs

[test_llava.log](https://github.com/user-attachments/files/18687248/test_llava.log)

### Current Issue
```
E           NotImplementedError: The following operators are not implemented: ['aten::masked_scatter']
```

And this will be solved in this PR -
#1188
@ashokkumarkannan1 ashokkumarkannan1 force-pushed the akannan/op_support_maskedscatter branch from 177d664 to 6cc38c1 Compare February 8, 2025 09:31
@ashokkumarkannan1 ashokkumarkannan1 force-pushed the akannan/op_support_maskedscatter branch from d828ed5 to 1b55360 Compare February 8, 2025 09:33
Copy link

github-actions bot commented Feb 8, 2025

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests650 ran509 passed141 skipped0 failed
TestResult
No test annotations available

Copy link

github-actions bot commented Feb 8, 2025

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests592 ran466 passed126 skipped0 failed
TestResult
No test annotations available

1 similar comment
Copy link

github-actions bot commented Feb 8, 2025

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests592 ran466 passed126 skipped0 failed
TestResult
No test annotations available

Copy link

github-actions bot commented Feb 8, 2025

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests650 ran509 passed141 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests592 ran466 passed126 skipped0 failed
TestResult
No test annotations available

1 similar comment
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests592 ran466 passed126 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests650 ran509 passed141 skipped0 failed
TestResult
No test annotations available

1 similar comment
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests650 ran509 passed141 skipped0 failed
TestResult
No test annotations available

@vkovinicTT
Copy link
Member

Let's first finish the change on the tvm side, so we can get to this later. Also please change problem description and What's changed paragraphs so that they reflect actual change, since now it is a bit confusion as we are not actually adding mapping here, but only changing the tests :))

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.

NotImplementedError: The following operators are not implemented: ['aten::masked_scatter']
3 participants