Skip to content

Commit

Permalink
Initialize variables (#18682)
Browse files Browse the repository at this point in the history
### Ticket
N/A

### Problem description
Need to initialize variables to ensure consistent behaviour

### What's changed
Set them to false as the kernels haven't been found yet from
dynamic_cast

### Checklist
- [ ] [All post
commit](https://github.com/tenstorrent/tt-metal/actions/workflows/all-post-commit-workflows.yaml)
CI passes
- [ ] [Blackhole Post
commit](https://github.com/tenstorrent/tt-metal/actions/workflows/blackhole-post-commit.yaml)
CI passes (if applicable)
- [ ] [Model
regression](https://github.com/tenstorrent/tt-metal/actions/workflows/perf-models.yaml)
CI passes (if applicable)
- [ ] [Device performance
regression](https://github.com/tenstorrent/tt-metal/actions/workflows/perf-device-models.yaml)
CI passes (if applicable)
- [ ] **(For models and ops writers)** Full [new models
tests](https://github.com/tenstorrent/tt-metal/actions/workflows/full-new-models-suite.yaml)
CI passes (if applicable)
- [ ] New/Existing tests provide coverage for changes
  • Loading branch information
nhuang-tt authored Mar 6, 2025
1 parent f3eebc5 commit dff4675
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tt_metal/impl/dispatch/kernel_config/dispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ void DispatchKernel::GenerateDependentConfigs() {
auto dispatch_s_kernel = dynamic_cast<DispatchSKernel*>(downstream_kernels_[0]);
auto mux_kernel = dynamic_cast<MuxKernel*>(downstream_kernels_[0]);

bool found_dispatch_s;
bool found_mux;
bool found_dispatch_h;
bool found_dispatch_s = false;
bool found_mux = false;
bool found_dispatch_h = false;
for (auto ds_kernel : downstream_kernels_) {
if (auto dispatch_s_kernel = dynamic_cast<DispatchSKernel*>(ds_kernel)) {
dependent_config_.downstream_s_logical_core = dispatch_s_kernel->GetLogicalCore();
Expand Down

0 comments on commit dff4675

Please sign in to comment.