-
Notifications
You must be signed in to change notification settings - Fork 347
Fix trace_region_size
#35271
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
Open
hschoi4448
wants to merge
10
commits into
main
Choose a base branch
from
hschoi/fix_trace_region_size
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+17
−7
Open
Fix trace_region_size
#35271
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7257934
fix trace_region_size
hschoi4448 b65c073
fix dram_bank_size
hschoi4448 012dc4e
fix trace_region_size alignemnt
hschoi4448 416306f
fix lint
hschoi4448 c983dbb
change var name
hschoi4448 c133357
add assert
hschoi4448 a38c517
fix trace_region_size
hschoi4448 ecd8970
fix trace_region_size
hschoi4448 7bc134e
resolve conflict
hschoi4448 962460f
revert unet trace region size
hschoi4448 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,13 @@ void AllocatorImpl::validate_bank_assignments() const { | |
|
|
||
| void AllocatorImpl::init_one_bank_per_channel() { | ||
| // DRAM bank is between unreserved start and trace_region start: UNRESERVED | DRAM BANK | TRACE REGION | ||
| DeviceAddr dram_bank_size = config_->dram_bank_size - config_->dram_unreserved_base - config_->trace_region_size; | ||
| TT_FATAL( | ||
| config_->trace_region_size % config_->num_dram_channels == 0, | ||
| "config_->trace_region_size {} should be multiple of config_->num_dram_channels {}", | ||
| config_->trace_region_size, | ||
| config_->num_dram_channels); | ||
| auto trace_region_size_per_bank = config_->trace_region_size / config_->num_dram_channels; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should assert that config_->trace_region_size % config_->num_dram_channels == 0.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TT_FATAL(
config_->trace_region_size % config_->num_dram_channels == 0,
"config_->trace_region_size {} should be multiple of config_->num_dram_channels {}",
config_->trace_region_size,
config_->num_dram_channels);I added assert |
||
| DeviceAddr dram_bank_size = config_->dram_bank_size - config_->dram_unreserved_base - trace_region_size_per_bank; | ||
| std::vector<int64_t> bank_offsets(config_->num_dram_channels); | ||
| for (uint32_t channel_id = 0; channel_id < config_->num_dram_channels; channel_id++) { | ||
| bank_offsets.at(channel_id) = static_cast<int32_t>(config_->dram_bank_offsets.at(channel_id)); | ||
|
|
@@ -57,7 +63,7 @@ void AllocatorImpl::init_one_bank_per_channel() { | |
| trace_buffer_manager_ = std::make_unique<BankManager>( | ||
| BufferType::TRACE, | ||
| bank_offsets, | ||
| config_->trace_region_size, | ||
| trace_region_size_per_bank, | ||
| config_->dram_alignment, | ||
| dram_bank_size + config_->dram_unreserved_base, | ||
| config_->disable_interleaved); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.