-
Notifications
You must be signed in to change notification settings - Fork 4
Add option to load reports directly from TT_METAL_HOME directory #746
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
Conversation
…ctly with TT_METAL_HOME directory
src/routes/Home.tsx
Outdated
@@ -15,6 +15,7 @@ function Home() { | |||
useClearSelectedBuffer(); | |||
|
|||
const isServerMode = !!getServerConfig()?.SERVER_MODE; | |||
const isTtMetalMode = !!getServerConfig()?.TT_METAL_HOME; |
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.
nit: inOnDeviceMode
? i dont think ttmetal mode is representative
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.
How about isLocalTtMetal
@aidemsined ?
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 went ahead and renamed isTtMetalMode
to isLocalTtMetal
, frontend and backend.
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.
as per comments
|
||
generated_dir = tt_metal_base / "generated" | ||
if not generated_dir.exists(): | ||
return False, f"TT-Metal generated directory not found: {generated_dir}" |
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.
Should this be a fatal error? It's true it might not exist, but then there are no reports so the visualizer isn't useful anyway.
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 would say it should not be fatal if the tt-metal/generated
directory does not exist, because the visualizer could be running on the machine before any reports have been generated.
The direction we are going is that ideally the visualizer would be available in the containers automatically when the container is brought up. In the case that ttnn-visualizer is automatically installed when creating the container, the tt-metal directory may not exist yet. Additionally, the tt-metal/generated
directory does not exist until pytest has actually been run. But the idea is we are making this tool an option when the containers are created so we should make sure the UI still comes up.
It's a good point though.
This PR adds a new way of loading the report data into ttnn-visualizer, by loading the data directly from the TT-Metal
generated
directory.The ordinary use case is for the Visualizer to run locally, say on a developer's laptop. The reports are typically being generated on remote machines or docker containers, that are running on Tenstorrent hardware. The main way of getting data into
ttnn-visualizer
has been to runttnn-visualizer
locally on the dev's local machine, and have them upload reports that they have downloaded from the remote machine/container, or to sync the reports from the remote machine/container using the remote sync feature, which downloads them to the machine wherettnn-visualizer
is running.This PR enables a new way of running
ttnn-visualizer
, which is directly on the remote machine/container TT-Metal is being used. If--tt-metal-home
CLI arg is passed, orTT_METAL_HOME
env var is set whenttnn-visualizer
runs, then it switches to "TT Metal Mode", in which it loads the reports directly from the$TT_METAL_HOME/generated/ttnn/reports
and$TT_METAL_HOME/generated/profiler/reports
directories, as opposed to the Visualizer's owndata/local
anddata/remote
directories.When "TT Metal Mode" is enabled, the upload report and remote sync features are disabled, and the Visualizer with only show the reports from
$TT_METAL_HOME
.This is intended to be used when running the Visualizer on the Tenstorrent machines directly, and should not be used when running the Visualizer on local dev machines, such as Macbooks.
User's will need to make sure that they are able to access the Visualizer on the remote machine, such as by mapping ports from the dev containers to host ports and can access the remote machines from their local machine where they are running their browser.
[Closes #747]