Fix agent node id + randomize offset id (#625)
* Fix agent node id + randomize offset id - fixes the node_id value - randomizes a constant offset for the id.handle values - switch to using node ids in rocprofiler-sdk-tool library - update tests related to agents * Logical node id - sequential node id values from 0 to (N-1) where N is the number of agents
This commit is contained in:
committed by
GitHub
parent
2f9b1767e9
commit
1addfed9f6
@@ -487,6 +487,7 @@ save(ArchiveT& ar, const rocprofiler_agent_t& data)
|
||||
SAVE_DATA_CSTR(model_name);
|
||||
SAVE_DATA_FIELD(num_pc_sampling_configs);
|
||||
SAVE_DATA_FIELD(node_id);
|
||||
SAVE_DATA_FIELD(logical_node_id);
|
||||
|
||||
auto generate = [&](auto name, const auto* value, uint64_t size) {
|
||||
using value_type = std::remove_const_t<std::remove_pointer_t<decltype(value)>>;
|
||||
|
||||
@@ -68,13 +68,13 @@ def test_memory_copy_trace(memory_copy_input_data):
|
||||
row = memory_copy_input_data[0]
|
||||
assert row["Direction"] == "HOST_TO_DEVICE"
|
||||
assert int(row["Source_Agent_Id"]) == 0
|
||||
assert int(row["Destination_Agent_Id"]) == 1
|
||||
assert int(row["Destination_Agent_Id"]) >= 1
|
||||
assert int(row["Correlation_Id"]) > 0
|
||||
assert int(row["End_Timestamp"]) >= int(row["Start_Timestamp"])
|
||||
|
||||
row = memory_copy_input_data[1]
|
||||
assert row["Direction"] == "DEVICE_TO_HOST"
|
||||
assert int(row["Source_Agent_Id"]) == 1
|
||||
assert int(row["Source_Agent_Id"]) >= 1
|
||||
assert int(row["Destination_Agent_Id"]) == 0
|
||||
assert int(row["Correlation_Id"]) > 0
|
||||
assert int(row["End_Timestamp"]) >= int(row["Start_Timestamp"])
|
||||
|
||||
Reference in New Issue
Block a user