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

Fix model breakages #53

Merged
merged 32 commits into from
Aug 15, 2024
Merged

Fix model breakages #53

merged 32 commits into from
Aug 15, 2024

Conversation

kevinwuTT
Copy link
Contributor

@kevinwuTT kevinwuTT commented Aug 9, 2024

Model status for this PR:

Screenshot 2024-08-12 at 6 07 26 PM

⚠️ GPT-2 fixes

Unmark gpt2 and mnist test models to expect passing
Disable conversion from aten._to_copy
Pass device for all from_torch ops Reverted because this conflicts with unsqueeze conversion
Replace aten.full op to a literal scalar for certain cases
Compare only Tensor types for dictionary outputs
Fails because:

  • Explicit casting of dtype to ttnn.bfloat16 for from_torch op makes GPT-2 fail. Removing it causes, Bloom, Llama, and Yolos to fail.
Failed to generate binaries for embeddings_tilize TT_THROW @ ../tt_metal/jit_build/build.cpp:396: tt::exception
info:
ncrisc build failed

MNIST fixes:

Replace aten.view with aten.reshape

⚠️ Falcon-7B status:

Fails because:

  • layer_norm conversion
TT_THROW @ ../tt_metal/impl/program/program.cpp:489: tt::exception
info:
Statically allocated circular buffers on core range [(x=0,y=0) - (x=0,y=0)] grow to 1611072 B which is beyond max L1 size of 1048576 B

Bloom and Llama fixes:

Add conversion for aten.min
Add exception to aten.eq conversion
Fix reusing ttnn data movement op if mixed with aten ops
Convert all inputs to ttnn.bfloat16 when moving data in
Skip unsqueeze transformation if last dim of input is not the same as…
Add exception to aten.expand conversion when last dimension of input …
Support list type arguments
Check layout change for ttnn reshape and embedding op
Freeze encoder for llama model

Yolos fixes

Add workaround for ttnn.permute when dim 0 is 1 for rank 3
Reconvert int64 types from metadata when mixing ttnn and aten ops
Check for valid page size for ops that decompose to ttnn.full
Delete aten.expand op if output has the exact same shape

General fixes:

Consolidate metadata during op conversion
Fix output type of aten.arange unit test to match output of original
Disable to_copy unit test to re-evaluate conversion
Lower pcc for addmm slightly
Change input shapes of some unit test to match exceptions in current …

@kevinwuTT kevinwuTT force-pushed the fix_model_breakages branch 2 times, most recently from b02d3cc to 08898b3 Compare August 12, 2024 22:12
@kevinwuTT kevinwuTT force-pushed the fix_model_breakages branch from e7f1936 to 02bc9b4 Compare August 12, 2024 23:46
@kevinwuTT kevinwuTT marked this pull request as ready for review August 12, 2024 23:49
@kevinwuTT kevinwuTT added this pull request to the merge queue Aug 15, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Aug 15, 2024
@kevinwuTT kevinwuTT added this pull request to the merge queue Aug 15, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Aug 15, 2024
@kevinwuTT kevinwuTT added this pull request to the merge queue Aug 15, 2024
Merged via the queue into main with commit 68a590d Aug 15, 2024
1 check passed
@kevinwuTT kevinwuTT deleted the fix_model_breakages branch August 15, 2024 15:37
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