-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#16541 - device profiler noc tracing feature
- Loading branch information
Showing
22 changed files
with
977 additions
and
63 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
CompileFlags: | ||
Add: | ||
- "std=c++20" | ||
- "-DPROFILE_NOC_EVENTS=1" | ||
- "-DPROFILE_KERNEL=1" | ||
- "-DCOMPILE_FOR_BRISC=1" |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-FileCopyrightText: © 2025 Tenstorrent Inc. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include "map" | ||
|
||
class ProfilerOptionalMetadata { | ||
using DeviceID = uint32_t; | ||
using RuntimeID = uint32_t; | ||
|
||
public: | ||
ProfilerOptionalMetadata(std::map<std::pair<DeviceID, RuntimeID>, std::string>&& runtime_map) : | ||
runtime_id_to_opname(std::move(runtime_map)) {} | ||
|
||
const std::string& getOpName(DeviceID device_id, RuntimeID runtime_id) const { | ||
static const std::string empty_string; | ||
auto key = std::make_pair(device_id, runtime_id); | ||
auto it = runtime_id_to_opname.find(key); | ||
if (it != runtime_id_to_opname.end()) { | ||
return it->second; | ||
} | ||
return empty_string; | ||
} | ||
|
||
private: | ||
std::map<std::pair<DeviceID, RuntimeID>, std::string> runtime_id_to_opname; | ||
}; |
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
Oops, something went wrong.