Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def annotate_papi_condition(rocprof_config) -> bool:
def annotate_env(annotate_papi_condition) -> dict[str, str]:
"""Environment variables for Annotate tests."""
env = {
"ROCPROFSYS_TRACE_LEGACY": "ON",
"ROCPROFSYS_USE_SAMPLING": "OFF",
}
if annotate_papi_condition:
Expand Down
1 change: 0 additions & 1 deletion projects/rocprofiler-systems/tests/pytest/test_hpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ class TestJacobi(RocprofsysTest):
def test_usm(self, mode, hpc_openmp_environment, gpu_info, kfd_rules):
env = hpc_openmp_environment.copy()
env["ROCPROFSYS_ROCM_DOMAINS"] = "hip_api,kernel_dispatch,memory_copy"
env["ROCPROFSYS_TRACE_LEGACY"] = "ON"
env["HSA_XNACK"] = "1"
env["ROCPROFSYS_USE_AMD_SMI"] = "OFF"
if "apu" not in gpu_info.categories:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
def nic_perf_env(rocprof_config) -> dict[str, str]:
"""Environment variables for NIC performance tests."""
return {
"ROCPROFSYS_TRACE_LEGACY": "ON",
"ROCPROFSYS_USE_PID": "OFF",
"ROCPROFSYS_LOG_LEVEL": "trace",
"ROCPROFSYS_USE_PROCESS_SAMPLING": "OFF",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def pthread_timemory_env(lock_env) -> dict[str, str]:
env = lock_env
env["ROCPROFSYS_FLAT_PROFILE"] = "ON"
env["ROCPROFSYS_PROFILE"] = "ON"
env["ROCPROFSYS_TRACE_LEGACY"] = "OFF"
env["ROCPROFSYS_SAMPLING_KEEP_INTERNAL"] = "OFF"
return env

Expand Down
2 changes: 0 additions & 2 deletions projects/rocprofiler-systems/tests/pytest/test_rccl.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
def rccl_env() -> dict[str, str]:
"""Environment variables for RCCL tests."""
return {
"ROCPROFSYS_TRACE_LEGACY": "OFF",
"ROCPROFSYS_TRACE_CACHED": "ON",
"ROCPROFSYS_PROFILE": "ON",
"ROCPROFSYS_USE_SAMPLING": "OFF",
"ROCPROFSYS_USE_PROCESS_SAMPLING": "ON",
Expand Down
43 changes: 7 additions & 36 deletions projects/rocprofiler-systems/tests/pytest/test_roctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
def roctx_env() -> dict[str, str]:
"""Environment variables for rocTX tests."""
return {
"ROCPROFSYS_TRACE_LEGACY": "ON",
"ROCPROFSYS_ROCM_DOMAINS": "hip_runtime_api,marker_api,kernel_dispatch",
"ROCPROFSYS_AMD_SMI_METRICS": "busy,temp,power,mem_usage,gfx_clock,mem_clock",
"ROCPROFSYS_PROCESS_SAMPLING_FREQ": "1000",
Expand All @@ -51,16 +50,11 @@ def roctx_rules(validation_rules_dir: Path) -> list[Path]:
class TestROCTx(RocprofsysTest):
"""Tests for rocTX marker API."""

def roctx_legacy_labels(self) -> list[str]:
def roctx_expected_labels(self) -> list[str]:
# The validate-perfetto-proto.py script aggregates (name, depth) pairs from
# the Perfetto slice table in dict-insertion order. Because roctxRangeStart
# and roctxRangePush are each called on BOTH the main thread and the worker
# thread, both depths for a given name accumulate into the same outer dict
# entry (name → {depth: count}). The flat list therefore groups all depths
# of the same name together, in the order those depths were first seen:
# the Perfetto slice table in dict-insertion order. Ex:
# roctxRangeStart_GPU_Compute d=2 (main, first call) then d=0 (worker)
# roctxRangePush_HIP_Kernel d=3 (main) then d=1 (worker)
# The per-thread marks appear after those, in thread-call order.
return [
"roctxMark_GPU_workload",
"roctxRangePush_run_profiling",
Expand All @@ -74,30 +68,12 @@ def roctx_legacy_labels(self) -> list[str]:
"roctxMark_Finished_GPU",
]

def roctx_legacy_count(self) -> list[int]:
def roctx_expected_count(self) -> list[int]:
return [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

def roctx_legacy_depth(self) -> list[int]:
def roctx_expected_depth(self) -> list[int]:
return [1, 1, 2, 0, 3, 1, 0, 0, 2, 1]

def roctx_cached_labels(self) -> list[str]:
return [
"roctxMark_GPU_workload",
"roctxRangePush_HIP_Kernel",
"roctxRangeStart_GPU_Compute",
"roctxMark_Thread_Start",
"roctxMark_Thread_End",
"roctxGetThreadId",
"roctxRangePush_run_profiling",
"roctxMark_Finished_GPU",
]

def roctx_cached_count(self) -> list[int]:
return [1, 2, 2, 1, 1, 1, 1, 1]

def roctx_cached_depth(self) -> list[int]:
return [1, 1, 1, 0, 0, 1, 1, 1]

BINARY_REWRITE_ARGS = ["-e", "-v", "2", "--instrument-loops"]
RUNTIME_INSTRUMENT_ARGS = ["-v", "2"]

Expand Down Expand Up @@ -130,14 +106,9 @@ def test_sampling(
):
env = roctx_env.copy()
categories = ["rocm_marker_api"]
if env["ROCPROFSYS_TRACE_LEGACY"] == "ON":
labels = self.roctx_legacy_labels()
counts = self.roctx_legacy_count()
depths = self.roctx_legacy_depth()
else:
labels = self.roctx_cached_labels()
counts = self.roctx_cached_count()
depths = self.roctx_cached_depth()
labels = self.roctx_expected_labels()
counts = self.roctx_expected_count()
depths = self.roctx_expected_depth()

result = self.run_test(
"sampling", target="roctx", env=env, check_target_arch=True
Expand Down
2 changes: 1 addition & 1 deletion projects/rocprofiler-systems/tests/pytest/test_sdma.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

@pytest.fixture
def sdma_env() -> dict[str, str]:
"""Environment variables for SDMA tests (sdma_usage metric only, legacy trace)."""
"""Environment variables for SDMA tests (sdma_usage metric only)."""
return {
"ROCPROFSYS_ROCM_DOMAINS": "hip_runtime_api",
"ROCPROFSYS_AMD_SMI_METRICS": "sdma_usage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def gpu_connect_env() -> dict[str, str]:
"""Environment variables for GPU connectivity tests."""
return {
"ROCPROFSYS_TRACE": "ON",
"ROCPROFSYS_TRACE_LEGACY": "ON",
"ROCPROFSYS_ROCM_DOMAINS": "hip_runtime_api",
"ROCPROFSYS_AMD_SMI_METRICS": "busy,temp,power,xgmi,pcie,gfx_clock,mem_clock",
"ROCPROFSYS_SAMPLING_CPUS": "none",
Expand Down
Loading