Commit c664184
[tt-train] Make training profiler respect TT_METAL_DEVICE_PROFILER (#37142)
### Ticket
None
### Problem description
<img width="754" height="530" alt="image"
src="https://github.com/user-attachments/assets/e62f493f-e3ac-4dc5-bb82-3cbcdeb22085"
/>
See cache entires increasing even in release build.
This is due to a change in debug build config when tracy is now included
by default.
What matters is a runtime env flag TT_METAL_DEVICE_PROFILER.
If it is not set, it does not make sense to add `profiler_no_op` calls.
### What's changed
Initially wanted to use
`tt::tt_metal::MetalContext::instance().rtoptions().get_profiler_enabled()`
but it is not accessible - `MetalContext` is a part of metal's private
api. Raised this with Audrey. Keeping it raw for now.
### Checklist
- [ ] [](https://github.com/tenstorrent/tt-metal/actions/workflows/all-post-commit-workflows.yaml?query=branch:ay/train_profiling_tweak)
- [ ] [](https://github.com/tenstorrent/tt-metal/actions/workflows/blackhole-post-commit.yaml?query=branch:ay/train_profiling_tweak)
- [ ]
[](https://github.com/tenstorrent/tt-metal/actions/workflows/tt-metal-l2-nightly.yaml?query=branch:ay/train_profiling_tweak)
- [ ] New/Existing tests provide coverage for changes
Co-authored-by: Artem Yerofieiev <ayerofieiev@tenstorrent.com>1 parent 356605d commit c664184
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
66 | | - | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
0 commit comments