counter collection multi-kernel test (#492)

* counter collection multi-kernel test

* Adding counter collection in rocprofv3 script
Этот коммит содержится в:
Gopesh Bhardwaj authored and GitHub committed 2024-02-28 17:08:28 -06:00
1 родитель bd81e6a5f8
Коммит 31dcfabe23
3 files changed
+24 -5

No files matched your search

+2 -2
Просмотреть файл
@@ -20,8 +20,8 @@ add_test(
NAME rocprofv3-test-counter-collection-pmc1-execute
COMMAND
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
${CMAKE_CURRENT_BINARY_DIR}/input.txt -d ${CMAKE_CURRENT_BINARY_DIR}/out_cc_1 -o
pmc1 $<TARGET_FILE:simple-transpose>)
${CMAKE_CURRENT_BINARY_DIR}/input.txt -T -d ${CMAKE_CURRENT_BINARY_DIR}/out_cc_1
-o pmc1 $<TARGET_FILE:vector-ops>)
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
+16 -2
Просмотреть файл
@@ -2,15 +2,29 @@ import pandas as pd
import sys
import pytest
kernel_list = ["addition_kernel", "subtract_kernel", "multiply_kernel", "divide_kernel"]
def test_validate_counter_collection_pmc1(input_data: pd.DataFrame):
df = input_data
assert df.empty == False
assert df["Agent_Id"].map(type).eq(int).all()
assert (df["Agent_Id"].astype(int).values > 0).all()
assert (df["Queue_Id"].astype(int).values > 0).all()
assert (df["Process_Id"].astype(int).values > 0).all()
assert len(df["Kernel-Name"]) > 0
assert df["Kernel-Name"].str.contains("matrixTranspose").any()
df_list = df["Kernel-Name"].values.flatten().tolist()
# Check if each string in kernel_list is present at least once
missing_kernels = []
for kernel in kernel_list:
if kernel not in df_list:
missing_kernels.append(kernel)
assert (
not missing_kernels
), f"The following kernel names are missing from the out file: {missing_kernels}"
assert df["Counter_Name"].str.contains("SQ_WAVES").all()
assert len(df["Counter_Value"]) > 0
if __name__ == "__main__":