bef14ad1b2
* Support for binary temporary files * clang formatting * formating ring buffer.hpp * Update source/lib/common/container/ring_buffer.hpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fixing bugs * fix loop range * Fix for v3 test failures * bug fix * fix bug * fix memory leaks * destructing agent_info * Update CMakeLists.txt * clang-tidy fixes * Fix data race on destructor of rocprofiler_agent_t map in rocprofiler-sdk-tool library * Create lib/rocproifler-sdk-tool/tmp_file.* - move tmp_file class into separate header/implementation * Agent Info CSV in rocprofiler-sdk-tool - update tests to use agent_info.csv instead of rocminfo * Update lib/rocprofiler-sdk-tool/tool.cpp - use logical_node_id instead of node_id * Adding stats file * Adding tests for stats * Update scratch memory support - convert scratch memory support to use binary output * Tool Update: scratch memory stats + extended statistics - replace generate_*_csv with generate_csv overloads - added generate_csv for scratch memory - enable stats for scratch memory - replace ROCPROF_*_STATS env variables with ROCPROF_STATS env variable * rocprofv3 update - simple --stats option - add scratch memory trace to --sys-trace * Update tests/rocprofv3/tracing-hip-in-libraries - extend validate.py to test stats data - fix conftest.py for memory_copy_stats_data * Code coverage fixes - invoke __gcov_dump to ensure that code coverage is flushed after finalization --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com> Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
110 строки
2.4 KiB
Python
110 строки
2.4 KiB
Python
#!/usr/bin/env python3
|
|
|
|
import csv
|
|
import pytest
|
|
|
|
|
|
def pytest_addoption(parser):
|
|
parser.addoption(
|
|
"--agent-input",
|
|
action="store",
|
|
help="Path to agent info CSV file.",
|
|
)
|
|
parser.addoption(
|
|
"--hsa-input",
|
|
action="store",
|
|
help="Path to HSA API tracing CSV file.",
|
|
)
|
|
parser.addoption(
|
|
"--kernel-input",
|
|
action="store",
|
|
help="Path to kernel tracing CSV file.",
|
|
)
|
|
parser.addoption(
|
|
"--memory-copy-input",
|
|
action="store",
|
|
help="Path to memory-copy tracing CSV file.",
|
|
)
|
|
parser.addoption(
|
|
"--marker-input",
|
|
action="store",
|
|
help="Path to marker API tracing CSV file.",
|
|
)
|
|
parser.addoption(
|
|
"--hip-input",
|
|
action="store",
|
|
help="Path to HIP runtime and compiler API tracing CSV file.",
|
|
)
|
|
|
|
|
|
@pytest.fixture
|
|
def agent_info_input_data(request):
|
|
filename = request.config.getoption("--agent-input")
|
|
data = []
|
|
with open(filename, "r") as inp:
|
|
reader = csv.DictReader(inp)
|
|
for row in reader:
|
|
data.append(row)
|
|
|
|
return data
|
|
|
|
|
|
@pytest.fixture
|
|
def hsa_input_data(request):
|
|
filename = request.config.getoption("--hsa-input")
|
|
data = []
|
|
with open(filename, "r") as inp:
|
|
reader = csv.DictReader(inp)
|
|
for row in reader:
|
|
data.append(row)
|
|
|
|
return data
|
|
|
|
|
|
@pytest.fixture
|
|
def kernel_input_data(request):
|
|
filename = request.config.getoption("--kernel-input")
|
|
data = []
|
|
with open(filename, "r") as inp:
|
|
reader = csv.DictReader(inp)
|
|
for row in reader:
|
|
data.append(row)
|
|
|
|
return data
|
|
|
|
|
|
@pytest.fixture
|
|
def memory_copy_input_data(request):
|
|
filename = request.config.getoption("--memory-copy-input")
|
|
data = []
|
|
with open(filename, "r") as inp:
|
|
reader = csv.DictReader(inp)
|
|
for row in reader:
|
|
data.append(row)
|
|
|
|
return data
|
|
|
|
|
|
@pytest.fixture
|
|
def marker_input_data(request):
|
|
filename = request.config.getoption("--marker-input")
|
|
data = []
|
|
with open(filename, "r") as inp:
|
|
reader = csv.DictReader(inp)
|
|
for row in reader:
|
|
data.append(row)
|
|
|
|
return data
|
|
|
|
|
|
@pytest.fixture
|
|
def hip_input_data(request):
|
|
filename = request.config.getoption("--hip-input")
|
|
data = []
|
|
with open(filename, "r") as inp:
|
|
reader = csv.DictReader(inp)
|
|
for row in reader:
|
|
data.append(row)
|
|
|
|
return data
|