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

reader_bmm_tile_layout_in1_sender_dram_sharded.cpp uses sparse CB ids #16954

Open
jbaumanTT opened this issue Jan 22, 2025 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@jbaumanTT
Copy link
Contributor

reader_bmm_tile_layout_in1_sender_dram_sharded.cpp has

constexpr uint32_t cb_id_in1 = 1;
constexpr uint32_t cb_id_out = 16;
constexpr uint32_t cb_id_out_reshard = 17;

but as far as I can tell, most CBs between 1 and 16 are unused. The causes the dispatcher to waste timing initializing many unneeded CBs, so it would be better to pack them starting at 0.

@jbaumanTT jbaumanTT added the bug Something isn't working label Jan 22, 2025
@jbaumanTT
Copy link
Contributor Author

I've also seen this in other matmul kernels (new log I'm adding):

                  Metal | WARNING  | Circular buffer indices are not contiguous. Non-contiguous indices: 16,24. First unused index is 2. Kernels: reader_bmm_tile_layout_in1_receiver_writer_padding, reader_bmm_tile_layout_in0_receiver, bmm_large_block_zm_fused_bias_activation
                  Metal | WARNING  | Circular buffer indices are not contiguous. Non-contiguous indices: 16,24. First unused index is 2. Kernels: reader_bmm_tile_layout_in1_receiver_writer_padding, reader_bmm_tile_layout_in0_sender_padding, bmm_large_block_zm_fused_bias_activation
                  Metal | WARNING  | Circular buffer indices are not contiguous. Non-contiguous indices: 16,24. First unused index is 2. Kernels: reader_bmm_tile_layout_in1_sender_writer_padding, reader_bmm_tile_layout_in0_receiver, bmm_large_block_zm_fused_bias_activation
                  Metal | WARNING  | Circular buffer indices are not contiguous. Non-contiguous indices: 16,24. First unused index is 2. Kernels: reader_bmm_tile_layout_in1_sender_writer_padding, reader_bmm_tile_layout_in0_sender_padding, bmm_large_block_zm_fused_bias_activation
                  Metal | WARNING  | Circular buffer indices are not contiguous. Non-contiguous indices: 16,17,24. First unused index is 3. Kernels: reader_bmm_tile_layout_in1_sender_dram_sharded, reader_bmm_tile_layout_in0_sender_dram_sharded, bmm_large_block_zm_fused_bias_activation

yugaoTT added a commit that referenced this issue Jan 24, 2025
### Ticket
[Link to Github
Issue](#16954)

### Problem description
Most CBs between 1 and 16 are unused. The causes the dispatcher to waste
timing initializing many unneeded CBs, so it would be better to pack
them starting at 0.


### Checklist
- [x] Post commit CI passes
- [x] Blackhole Post commit (if applicable)
- [ ] Model regression CI testing passes (if applicable)
- [ ] Device performance regression CI testing passes (if applicable)
- [ ] **(For models and ops writers)** Full [new
models](https://github.com/tenstorrent/tt-metal/actions/workflows/full-new-models-suite.yaml)
tests passes
- [ ] New/Existing tests provide coverage for changes
@yugaoTT
Copy link
Contributor

yugaoTT commented Jan 24, 2025

I merged in, so the CB index being used is 0 (in0), 1, (in1), 2( sharded in0), 3 (bias), 4 (out), 5 (interm), 6 (l1 config). sometimes when no bias, 2 won't be used, but I think we can afford that since that's just one extra cb intialized without being used

patrickroberts pushed a commit that referenced this issue Jan 25, 2025
### Ticket
[Link to Github
Issue](#16954)

### Problem description
Most CBs between 1 and 16 are unused. The causes the dispatcher to waste
timing initializing many unneeded CBs, so it would be better to pack
them starting at 0.


### Checklist
- [x] Post commit CI passes
- [x] Blackhole Post commit (if applicable)
- [ ] Model regression CI testing passes (if applicable)
- [ ] Device performance regression CI testing passes (if applicable)
- [ ] **(For models and ops writers)** Full [new
models](https://github.com/tenstorrent/tt-metal/actions/workflows/full-new-models-suite.yaml)
tests passes
- [ ] New/Existing tests provide coverage for changes
yieldthought pushed a commit that referenced this issue Jan 31, 2025
### Ticket
[Link to Github
Issue](#16954)

### Problem description
Most CBs between 1 and 16 are unused. The causes the dispatcher to waste
timing initializing many unneeded CBs, so it would be better to pack
them starting at 0.


### Checklist
- [x] Post commit CI passes
- [x] Blackhole Post commit (if applicable)
- [ ] Model regression CI testing passes (if applicable)
- [ ] Device performance regression CI testing passes (if applicable)
- [ ] **(For models and ops writers)** Full [new
models](https://github.com/tenstorrent/tt-metal/actions/workflows/full-new-models-suite.yaml)
tests passes
- [ ] New/Existing tests provide coverage for changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants