-
Notifications
You must be signed in to change notification settings - Fork 74
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
Conversation
e903018
to
812c78f
Compare
812c78f
to
c4366b9
Compare
for (int i = GUARANTEED_MARKER_1_H; i < CUSTOM_MARKERS; i ++) | ||
{ | ||
//TODO(MO): Clean up magic numbers | ||
//TODO(MO): Clean up magic numbers |
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.
where are these numbers getting used? Is there risk that device already holds these values on start, and FW jumps ahead of init?
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.
I am referring to the 0x80000000
. They are pretty settled at this point. I will clean them up in another PR
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.
We are in init, so we are flushing out anything that might be there from the previous run.
@@ -65,6 +65,8 @@ struct launch_msg_t { // must be cacheline aligned | |||
volatile uint16_t watcher_kernel_ids[DISPATCH_CLASS_MAX_PROC]; | |||
volatile uint16_t ncrisc_kernel_size16; // size in 16 byte units | |||
|
|||
volatile uint16_t host_assigned_op_id; |
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-d606266ae23fd80f4fa4f80ea161f8b17ff937bbf94cce50cfd731755d0a491b
He 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.
@@ -77,11 +77,13 @@ class Program { | |||
Program(Program &&other) = default; | |||
Program& operator=(Program &&other) = default; | |||
|
|||
void set_global_id(uint64_t id); |
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.
Is this only called by ttnn and tteager? So other programs (i.e. generated from our backend) don't have a global id?
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.
Right, this is for use by higher levels. Making direct tt_metal calls can ignore this and op id field will show up as zero ...
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.
i.e. this is for assigning unique ids for op_report
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.
Where is it initialized to 0?
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.
Good find, I thought I added it. Will add to initializer list for program
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.
Added
72f7d76
to
d30c33d
Compare
2583943
to
e642070
Compare
Change default MMIO TLB ordering from posted to strict (will have a negative perf impact) Split launch message into kernel_config and go Write these separately from host w/ an sfence between
e642070
to
0cead39
Compare
fcc1bca
to
d9c42ea
Compare
d9c42ea
to
374d29e
Compare
@@ -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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
We need to be 32-bit aligned on this struct, cache aligned.
Ticket
3764
Problem description
Device profiler data did not know which op the running kernels belonged to.
What's changed
With this:
Checklist