-
Notifications
You must be signed in to change notification settings - Fork 98
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
#3764: Device side opID support #9830
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -76,10 +76,12 @@ struct dyn_mem_map_t { | |
volatile uint16_t crta_offset; | ||
}; | ||
|
||
struct launch_msg_t { // must be cacheline aligned | ||
struct kernel_config_msg_t { | ||
volatile uint16_t watcher_kernel_ids[DISPATCH_CLASS_MAX]; | ||
volatile uint16_t ncrisc_kernel_size16; // size in 16 byte units | ||
|
||
volatile uint16_t host_assigned_op_id; | ||
|
||
// Ring buffer of kernel configuration data | ||
volatile uint32_t kernel_config_base; | ||
dyn_mem_map_t mem_map[DISPATCH_CLASS_MAX]; | ||
|
@@ -91,7 +93,17 @@ struct launch_msg_t { // must be cacheline aligned | |
volatile uint8_t dispatch_core_x; | ||
volatile uint8_t dispatch_core_y; | ||
volatile uint8_t exit_erisc_kernel; | ||
volatile uint8_t run; // must be in last cacheline of this msg | ||
volatile uint8_t pad1; | ||
volatile uint16_t pad2; | ||
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. why do we need this 2 byte padding? 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 need to be 32-bit aligned on this struct, cache aligned. |
||
} __attribute__((packed)); | ||
|
||
struct go_msg_t { | ||
volatile uint32_t run; // must be in last cacheline of this msg | ||
} __attribute__((packed)); | ||
|
||
struct launch_msg_t { // must be cacheline aligned | ||
kernel_config_msg_t kernel_config; | ||
go_msg_t go; | ||
} __attribute__((packed)); | ||
|
||
struct slave_sync_msg_t { | ||
|
@@ -194,7 +206,7 @@ struct mailboxes_t { | |
struct debug_insert_delays_msg_t debug_insert_delays; | ||
}; | ||
|
||
static_assert(sizeof(launch_msg_t) % sizeof(uint32_t) == 0); | ||
static_assert(sizeof(kernel_config_msg_t) % sizeof(uint32_t) == 0); | ||
|
||
#ifndef TENSIX_FIRMWARE | ||
// Validate assumptions on mailbox layout on host compile | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pgkeller was changing
launch_msg_t
in his PR here: https://github.com/tenstorrent/tt-metal/pull/9781/files#diff-d606266ae23fd80f4fa4f80ea161f8b17ff937bbf94cce50cfd731755d0a491bHe suspects that moving
run
field around is causing some issues.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm interesting, I did not see any hangs on CI with the addition of the two bytes. I will coordinate before merging this in.