Enable some simple ROCpd testing (#834)
* Add for rocpd testing and output validation Add for transpose, video-decode, jpeg-decode, roctx, and openmp-target Add JSON check to pre-commit-config Co-authored-by: Marjan Antic <Marjan.Antic@amd.com> * Remove redundant environment variable * Fix spelling typo * Fix typo in error message * Fix memory_allocation query * Incorperate feedback from review. Handle case where there are multiple matching "name_prefix" tables. * Fix environment settings in `rocprof-sys-testing.cmake` Accidently removed in previous refactoring. * Formatting python file --------- Co-authored-by: Marjan Antic <Marjan.Antic@amd.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
35b07e041f
Коммит
32f9fa6ca5
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"name": "kernel_summary",
|
||||
"required_columns": [
|
||||
"name",
|
||||
"calls",
|
||||
"DURATION (nsec)"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for null function names",
|
||||
"error_message": "Found API calls with null function names",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernel_summary WHERE name IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check that we have some kernel calls",
|
||||
"error_message": "No kernel calls found in summary",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernel_summary"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "kernels",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"category",
|
||||
"name",
|
||||
"start",
|
||||
"end",
|
||||
"queue",
|
||||
"stream"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for null function names",
|
||||
"error_message": "Found kernels with null function names",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE name IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check that we have kernel entries",
|
||||
"error_message": "No kernel entries found",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for kernels with no active time",
|
||||
"error_message": "Kernels with no active execution times found",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE (end - start) = 0"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"min_rows": 0,
|
||||
"name": "threads",
|
||||
"required_columns": [
|
||||
"tid",
|
||||
"start",
|
||||
"end",
|
||||
"name"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"min_rows": 1,
|
||||
"name_prefix": "rocpd_info_pmc_",
|
||||
"required_columns": [
|
||||
"agent_id",
|
||||
"target_arch",
|
||||
"name",
|
||||
"symbol",
|
||||
"description",
|
||||
"units",
|
||||
"value_type"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for jpeg_activity amd-smi metrics",
|
||||
"error_message": "Did not find jpeg_activity in amd-smi metrics",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} WHERE symbol LIKE 'JpegAct%'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"min_rows": 500,
|
||||
"name_prefix": "rocpd_pmc_event_",
|
||||
"required_columns": [
|
||||
"event_id",
|
||||
"pmc_id",
|
||||
"value"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring busy times",
|
||||
"error_message": "Less than expected number of captured amd-smi mm-busy samples!",
|
||||
"expected_result": 50,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name = 'device_busy_mm'"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring GPU memory usage",
|
||||
"error_message": "Less than expected number of captured amd-smi memory-usage samples!",
|
||||
"expected_result": 50,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name = 'device_memory_usage'"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring JPEG activity",
|
||||
"error_message": "Less than expected activity in amd-smi jpeg-activity samples!",
|
||||
"expected_result": 50,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name LIKE 'device_jpeg_activity_%' and event.value > 0"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"commit": "Validation rules for rocm_rocjpeg_api",
|
||||
"name": "regions",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"category",
|
||||
"name"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_rocjpeg_api' appears in category at least 500 times in table regions",
|
||||
"error_message": "'rocm_rocjpeg_api' category entries are fewer than expected in regions",
|
||||
"expected_result": 100,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_rocjpeg_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Ensure there are no HIP API calls that last 0 seconds",
|
||||
"error_message": "Found rocJPEG API captures where duration is 0",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_rocjpeg_api' AND duration = 0;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for any NULL values in the 'name' column of regions",
|
||||
"error_message": "NULL entries found in the name column of regions",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE name IS NULL;"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for rocm_rocjpeg_api",
|
||||
"name": "rocpd_string",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"string"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_rocjpeg_api' string is present in the table",
|
||||
"error_message": "'rocm_rocjpeg_api' string not found in the table rocpd_string",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_rocjpeg_api%';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for hip_api",
|
||||
"name": "events_args",
|
||||
"required_columns": [
|
||||
"event_id",
|
||||
"category",
|
||||
"stack_id",
|
||||
"parent_stack_id",
|
||||
"correlation_id"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_hip_api' appears in category at least 1500 times in table events_args",
|
||||
"error_message": "'rocm_hip_api' category entries are fewer than expected in events_args",
|
||||
"expected_result": 100,
|
||||
"query": "SELECT COUNT(*) FROM events_args WHERE category = 'rocm_hip_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for missing category entries",
|
||||
"error_message": "Empty or NULL category entries found in events_args",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM events_args WHERE category IS NULL OR TRIM(category) = '';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for hip_api",
|
||||
"name": "regions",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"category",
|
||||
"name"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_hip_api' appears in category at least 50 times in table regions",
|
||||
"error_message": "'rocm_hip_api' category entries are fewer than expected in regions",
|
||||
"expected_result": 50,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_hip_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Ensure there are no HIP API calls that last 0 seconds",
|
||||
"error_message": "Found HIP API captures where duration is 0",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_hip_api' AND duration = 0;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for any NULL values in the 'name' column of regions",
|
||||
"error_message": "NULL entries found in the name column of regions",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE name IS NULL;"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rule for hip_api",
|
||||
"name": "rocpd_string",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"string"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than_or_equal",
|
||||
"description": "Verify that 'rocm_hip_api' string is present in the table",
|
||||
"error_message": "'rocm_hip_api' string not found in the table rocpd_string",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_hip_api%';"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"name": "kernel_summary",
|
||||
"required_columns": [
|
||||
"name",
|
||||
"calls",
|
||||
"DURATION (nsec)"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for null function names",
|
||||
"error_message": "Found API calls with null function names",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernel_summary WHERE name IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check that we have some kernel calls",
|
||||
"error_message": "No kernel calls found in summary",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernel_summary"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"min_rows": 50,
|
||||
"name": "kernels",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"category",
|
||||
"name",
|
||||
"start",
|
||||
"end",
|
||||
"queue",
|
||||
"stream"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for null function names",
|
||||
"error_message": "Found kernels with null function names",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE name IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check that we have kernel entries",
|
||||
"error_message": "No kernel entries found",
|
||||
"expected_result": 50,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for kernels with no active time",
|
||||
"error_message": "Kernels with no active execution times found",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE (end - start) = 0"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"min_rows": 3,
|
||||
"name": "threads",
|
||||
"required_columns": [
|
||||
"tid",
|
||||
"start",
|
||||
"end",
|
||||
"name"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"name": "kernel_summary",
|
||||
"required_columns": [
|
||||
"name",
|
||||
"calls",
|
||||
"DURATION (nsec)"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for null function names",
|
||||
"error_message": "Found API calls with null function names",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernel_summary WHERE name IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for 3 unique kernels",
|
||||
"error_message": "Expecting 3 unique kernels",
|
||||
"expected_result": 3,
|
||||
"query": "SELECT COUNT(*) as count FROM kernel_summary"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"min_rows": 12,
|
||||
"name": "kernels",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"category",
|
||||
"name",
|
||||
"start",
|
||||
"end",
|
||||
"queue",
|
||||
"stream"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for null function names",
|
||||
"error_message": "Found kernels with null function names",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE name IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check that we have 12 kernel dispatches",
|
||||
"error_message": "Expecting 12 kernel dispatches",
|
||||
"expected_result": 12,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for kernels with no active time",
|
||||
"error_message": "Kernels with no active execution times found",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE (end - start) = 0"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check we have 4 kernels named %Z4vmulIiEvPT_S1_S1_i_l51.kd",
|
||||
"error_message": "Unexpected %Z4vmulIiEvPT_S1_S1_i_l51.kd kernel dispatches",
|
||||
"expected_result": 4,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE name LIKE '__omp_offloading_%Z4vmulIiEvPT_S1_S1_i_l51.kd'"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check we have 4 kernels named %Z4vmulIfEvPT_S1_S1_i_l51.kd",
|
||||
"error_message": "Unexpected %Z4vmulIfEvPT_S1_S1_i_l51.kd kernel dispatches",
|
||||
"expected_result": 4,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE name LIKE '__omp_offloading_%Z4vmulIfEvPT_S1_S1_i_l51.kd'"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check we have 4 kernels named %Z4vmulIdEvPT_S1_S1_i_l51.kd",
|
||||
"error_message": "Unexpected %Z4vmulIdEvPT_S1_S1_i_l51.kd kernel dispatches",
|
||||
"expected_result": 4,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE name LIKE '__omp_offloading_%Z4vmulIdEvPT_S1_S1_i_l51.kd'"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"commit": "Validation rules for rocm_ompt_api",
|
||||
"name": "regions",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"category",
|
||||
"name"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_ompt_api' appears in category at least 100 times in table regions",
|
||||
"error_message": "'rocm_ompt_api' category entries are fewer than expected in regions",
|
||||
"expected_result": 100,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_ompt_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for any NULL values in the 'name' column of regions",
|
||||
"error_message": "NULL entries found in the name column of regions",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE name IS NULL;"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for rocm_ompt_api",
|
||||
"name": "rocpd_string",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"string"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than_or_equal",
|
||||
"description": "Verify that 'rocm_ompt_api' string is present in the table",
|
||||
"error_message": "'rocm_ompt_api' string not found in the table rocpd_string",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_ompt_api%';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for hsa_api",
|
||||
"name": "regions",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"category",
|
||||
"name"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_hsa_api' appears in category at least 500 times in table regions",
|
||||
"error_message": "'rocm_hsa_api' category entries are fewer than expected in regions",
|
||||
"expected_result": 500,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_hsa_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Ensure there are no HSA API calls that last 0 seconds",
|
||||
"error_message": "Found HSA API captures where duration is 0",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_hsa_api' AND duration = 0;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for any NULL values in the 'name' column of regions",
|
||||
"error_message": "NULL entries found in the name column of regions",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE name IS NULL;"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rule for hsa_api",
|
||||
"name": "rocpd_string",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"string"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than_or_equal",
|
||||
"description": "Verify that 'rocm_hsa_api' string is present in the table",
|
||||
"error_message": "'rocm_hsa_api' string not found in the table rocpd_string",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_hsa_api%';"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"min_rows": 4,
|
||||
"name_prefix": "rocpd_info_pmc_",
|
||||
"required_columns": [
|
||||
"agent_id",
|
||||
"target_arch",
|
||||
"name",
|
||||
"symbol",
|
||||
"description",
|
||||
"units",
|
||||
"value_type"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring categories",
|
||||
"error_message": "Found none of the amd-smi categories",
|
||||
"expected_result": 4,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} WHERE target_arch is 'GPU'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"min_rows": 100,
|
||||
"name_prefix": "rocpd_pmc_event_",
|
||||
"required_columns": [
|
||||
"event_id",
|
||||
"pmc_id",
|
||||
"value"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring busy times",
|
||||
"error_message": "Less than expected number of captured amd-smi-busy samples!",
|
||||
"expected_result": 10,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name = 'device_busy_mm'"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring GPU temperature",
|
||||
"error_message": "Less than expected number of captured amd-smi-temperature samples!",
|
||||
"expected_result": 10,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name = 'device_temp'"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring GPU power consumption",
|
||||
"error_message": "Less than expected number of captured amd-smi-power samples!",
|
||||
"expected_result": 10,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name = 'device_power'"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring GPU memory usage",
|
||||
"error_message": "Less than expected number of captured amd-smi-memory-usage samples!",
|
||||
"expected_result": 10,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name = 'device_memory_usage'"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"commit": "Validation rules for rocm_marker_api",
|
||||
"name": "events_args",
|
||||
"required_columns": [
|
||||
"event_id",
|
||||
"category",
|
||||
"stack_id",
|
||||
"parent_stack_id",
|
||||
"correlation_id"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_marker_api' appears in category at least 5 times in table events_args",
|
||||
"error_message": "'rocm_marker_api' category entries are fewer than expected in events_args",
|
||||
"expected_result": 5,
|
||||
"query": "SELECT COUNT(*) FROM events_args WHERE category = 'rocm_marker_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for missing category entries",
|
||||
"error_message": "Empty or NULL category entries found in events_args",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM events_args WHERE category IS NULL OR TRIM(category) = '';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for rocm_marker_api",
|
||||
"name": "regions",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"category",
|
||||
"name"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Verify that 'rocm_marker_api' appears in category 11 times in 'regions' table",
|
||||
"error_message": "Expected 11 'rocm_marker_api' entries in the 'regions' table",
|
||||
"expected_result": 11,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_marker_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Ensure there are no rocTX API calls that last 0 seconds",
|
||||
"error_message": "Found rocTX API captures where duration is 0",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_marker_api' AND duration = 0;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for any NULL values in the 'name' column of regions",
|
||||
"error_message": "NULL entries found in the name column of regions",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE name IS NULL;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Verify that 'roctxMarkA' appears at 5 times in table 'regions'",
|
||||
"error_message": "Expected 5 'roctxMarkA' entries in `regions` table",
|
||||
"expected_result": 5,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_marker_api' AND name = 'roctxMarkA';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Verify that 'roctxRangePop' appears at 3 times in table 'regions'",
|
||||
"error_message": "Expected 3 'roctxRangePop' entries in `regions` table",
|
||||
"expected_result": 3,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_marker_api' AND name = 'roctxRangePop';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Verify that 'roctxRangeStop' appears at 2 times in table 'regions'",
|
||||
"error_message": "Expected 2 'roctxRangeStop' entries in `regions` table",
|
||||
"expected_result": 2,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_marker_api' AND name = 'roctxRangeStop';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rule for rocm_marker_api",
|
||||
"name": "rocpd_string",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"string"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than_or_equal",
|
||||
"description": "Verify that 'rocm_marker_api' string is present in the table",
|
||||
"error_message": "'rocm_marker_api' string not found in the table rocpd_string",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_marker_api%';"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'roctx' string is present in the table",
|
||||
"error_message": "'roctx' string not found in the table rocpd_string",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%roctx%';"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"name": "kernel_summary",
|
||||
"required_columns": [
|
||||
"name",
|
||||
"calls",
|
||||
"DURATION (nsec)"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for null function names",
|
||||
"error_message": "Found API calls with null function names",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernel_summary WHERE name IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check that we have some kernel calls",
|
||||
"error_message": "No kernel calls found in summary",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernel_summary"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check that we have 'hipKernelLaunch' kernel captured",
|
||||
"error_message": "No kernel calls found in summary",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) as count FROM kernel_summary WHERE name LIKE 'hipKernelLaunch%'"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check that we have predefined number of kernel calls",
|
||||
"error_message": "No kernel calls found in summary",
|
||||
"expected_result": 2,
|
||||
"query": "SELECT calls as num_calls FROM kernel_summary WHERE name LIKE 'hipKernelLaunch%'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"min_rows": 2,
|
||||
"name": "kernels",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"category",
|
||||
"name",
|
||||
"start",
|
||||
"end",
|
||||
"queue",
|
||||
"stream"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for null function names",
|
||||
"error_message": "Found kernels with null function names",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE name IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check that we have kernel entries",
|
||||
"error_message": "No kernel entries found",
|
||||
"expected_result": 2,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for kernels with no active time",
|
||||
"error_message": "Kernels with no active execution times found",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE (end - start) = 0"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check that we have number of kernel entries as expected number of calls",
|
||||
"error_message": "Mismatch in expected numbers of kernels entries",
|
||||
"expected_result": 2,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE name LIKE 'hipKernelLaunch%'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"min_rows": 3,
|
||||
"name": "threads",
|
||||
"required_columns": [
|
||||
"tid",
|
||||
"start",
|
||||
"end",
|
||||
"name"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"min_rows": 4,
|
||||
"name_prefix": "rocpd_info_pmc_",
|
||||
"required_columns": [
|
||||
"agent_id",
|
||||
"target_arch",
|
||||
"name",
|
||||
"symbol",
|
||||
"description",
|
||||
"units",
|
||||
"value_type"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring categories",
|
||||
"error_message": "Found none of the amd-smi categories",
|
||||
"expected_result": 4,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} WHERE target_arch is 'GPU'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"min_rows": 2000,
|
||||
"name_prefix": "rocpd_pmc_event_",
|
||||
"required_columns": [
|
||||
"event_id",
|
||||
"pmc_id",
|
||||
"value"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring busy times",
|
||||
"error_message": "Less than expected number of captured amd-smi-busy samples!",
|
||||
"expected_result": 150,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name = 'device_busy_mm'"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring GPU temperature",
|
||||
"error_message": "Less than expected number of captured amd-smi-temperature samples!",
|
||||
"expected_result": 150,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name = 'device_temp'"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring GPU power consumption",
|
||||
"error_message": "Less than expected number of captured amd-smi-power samples!",
|
||||
"expected_result": 150,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name = 'device_power'"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring GPU memory usage",
|
||||
"error_message": "Less than expected number of captured amd-smi-memory-usage samples!",
|
||||
"expected_result": 150,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name = 'device_memory_usage'"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"name": "pmc_info",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"nid",
|
||||
"pid",
|
||||
"agent_abs_index",
|
||||
"is_constant",
|
||||
"is_derived",
|
||||
"name",
|
||||
"description",
|
||||
"block",
|
||||
"expression"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for missing PMC names",
|
||||
"error_message": "PMC entries are missing a name",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_info_pmc WHERE name IS NULL OR name = ''"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Validate agent absolute index is non-negative",
|
||||
"error_message": "Negative absolute_index found in agent metadata",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_info_agent WHERE absolute_index < 0"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check derived PMCs have expressions",
|
||||
"error_message": "Derived PMC missing valid expression",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_info_pmc WHERE is_derived = 1 AND (expression IS NULL OR expression = '')"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Validate description presence",
|
||||
"error_message": "PMC entries missing description field",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_info_pmc WHERE description IS NULL OR description = ''"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rocpd_pmc_event",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"event_id",
|
||||
"pmc_id",
|
||||
"value",
|
||||
"extdata"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for NULL values in 'id'",
|
||||
"error_message": "NULL value found in 'id' column",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_pmc_event WHERE id IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for NULL values in 'guid' where guid count > 3000",
|
||||
"error_message": "NULL 'guid' found for guid values with more than 3000 occurrences",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_pmc_event WHERE guid IS NULL AND (SELECT COUNT(*) FROM rocpd_pmc_event WHERE guid = rocpd_pmc_event.guid) > 3000"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for NULL values in 'event_id'",
|
||||
"error_message": "NULL value found in 'event_id' column",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_pmc_event WHERE event_id IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for NULL values in 'pmc_id'",
|
||||
"error_message": "NULL value found in 'pmc_id' column",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_pmc_event WHERE pmc_id IS NULL"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rocpd_sample",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"track_id",
|
||||
"timestamp",
|
||||
"event_id"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for NULL values in 'id'",
|
||||
"error_message": "NULL value found in 'id' column",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_sample WHERE id IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for NULL values in 'guid' where guid count > 3000",
|
||||
"error_message": "NULL 'guid' found for guid values with more than 3000 occurrences",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_sample WHERE guid IS NULL AND (SELECT COUNT(*) FROM rocpd_sample WHERE guid = rocpd_sample.guid) > 3000"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for NULL values in 'track_id'",
|
||||
"error_message": "NULL value found in 'track_id' column",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_sample WHERE track_id IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for NULL values in 'timestamp'",
|
||||
"error_message": "NULL value found in 'timestamp' column",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_sample WHERE timestamp IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for NULL values in 'event_id'",
|
||||
"error_message": "NULL value found in 'event_id' column",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_sample WHERE event_id IS NULL"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+327
@@ -0,0 +1,327 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"commit": "Validation rules for hip_api",
|
||||
"name": "events_args",
|
||||
"required_columns": [
|
||||
"event_id",
|
||||
"category",
|
||||
"stack_id",
|
||||
"parent_stack_id",
|
||||
"correlation_id"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_hip_api' appears in category at least 1500 times in table events_args",
|
||||
"error_message": "'rocm_hip_api' category entries are fewer than expected in events_args",
|
||||
"expected_result": 1500,
|
||||
"query": "SELECT COUNT(*) FROM events_args WHERE category = 'rocm_hip_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for missing category entries",
|
||||
"error_message": "Empty or NULL category entries found in events_args",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM events_args WHERE category IS NULL OR TRIM(category) = '';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for hip_api",
|
||||
"name": "regions",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"category",
|
||||
"name"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_hip_api' appears in category at least 500 times in table regions",
|
||||
"error_message": "'rocm_hip_api' category entries are fewer than expected in regions",
|
||||
"expected_result": 500,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_hip_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Ensure there are no HIP API calls that last 0 seconds",
|
||||
"error_message": "Found HIP API captures where duration is 0",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_hip_api' AND duration = 0;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for any NULL values in the 'name' column of regions",
|
||||
"error_message": "NULL entries found in the name column of regions",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE name IS NULL;"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rule for hip_api",
|
||||
"name": "rocpd_string",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"string"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_hip_api' string is present in the table",
|
||||
"error_message": "'rocm_hip_api' string not found in the table rocpd_string",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_hip_api%';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for hsa_api",
|
||||
"name": "events_args",
|
||||
"required_columns": [
|
||||
"event_id",
|
||||
"category",
|
||||
"stack_id",
|
||||
"parent_stack_id",
|
||||
"correlation_id"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_hsa_api' appears in category at least 1000 times in table events_args",
|
||||
"error_message": "'rocm_hsa_api' category entries are fewer than expected in events_args",
|
||||
"expected_result": 1000,
|
||||
"query": "SELECT COUNT(*) FROM events_args WHERE category = 'rocm_hsa_api';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for hsa_api",
|
||||
"name": "regions",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"category",
|
||||
"name"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that rocm_hsa_api' appears in category at least 500 times in table regions",
|
||||
"error_message": "'rocm_hsa_api' category entries are fewer than expected in regions",
|
||||
"expected_result": 500,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_hsa_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Ensure there are no HSA API calls that last 0 seconds",
|
||||
"error_message": "Found HSA API captures where duration is 0",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_hsa_api' AND duration = 0;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for any NULL values in the 'name' column of regions",
|
||||
"error_message": "NULL entries found in the name column of regions",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE name IS NULL;"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rule for hsa_api",
|
||||
"name": "rocpd_string",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"string"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_hsa_api' string is present in the table",
|
||||
"error_message": "'rocm_hsa_api' string not found in the table rocpd_string",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_hsa_api%';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for memory_allocations",
|
||||
"name": "memory_allocations",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"category",
|
||||
"nid",
|
||||
"pid",
|
||||
"tid",
|
||||
"start",
|
||||
"end",
|
||||
"duration",
|
||||
"type",
|
||||
"level",
|
||||
"agent_name"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check that all IDs are not NULL",
|
||||
"error_message": "NULL entries found in the id column of memory_allocations",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM memory_allocations WHERE id IS NULL;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check the sizes of executed memory allocate calls",
|
||||
"error_message": "Entries found where allocated size is 0 or NULL",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM memory_allocations WHERE size IS NULL or 0;"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_memory_allocate' appears more than 1 times in category",
|
||||
"error_message": "'rocm_memory_allocate' string appears fewer than 1 times in category column of memory_allocations",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) FROM memory_allocations WHERE category LIKE '%rocm_memory_allocate%';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rocpd_string",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"string"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_memory_allocate' is present in the string column",
|
||||
"error_message": "'rocm_memory_allocate' string not found in the string column of rocpd_string",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_memory_allocate%';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for memory_copies",
|
||||
"name": "rocpd_string",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"string"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_memory_copy' is present in the string column",
|
||||
"error_message": "'rocm_memory_copy' string not found in the string column of rocpd_string",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_memory_copy%';"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'MEMORY_COPY_DEVICE_TO_HOST' is present in the string column",
|
||||
"error_message": "'MEMORY_COPY_DEVICE_TO_HOST' string not found in the string column of rocpd_string",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%MEMORY_COPY_DEVICE_TO_HOST%';"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'MEMORY_COPY_HOST_TO_DEVICE' is present in the string column",
|
||||
"error_message": "'MEMORY_COPY_HOST_TO_DEVICE' string not found in the string column of rocpd_string",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%MEMORY_COPY_HOST_TO_DEVICE%';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for memory_copies",
|
||||
"name": "memory_copies",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"category",
|
||||
"nid",
|
||||
"pid",
|
||||
"tid",
|
||||
"start",
|
||||
"end"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_memory_copy' appears in category column",
|
||||
"error_message": "'rocm_memory_copy' string appears fewer than 10 times in category column of memory_copies",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM memory_copies WHERE category LIKE '%rocm_memory_copy%';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check that all IDs are not NULL",
|
||||
"error_message": "NULL entries found in the id column of memory_copies",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM memory_copies WHERE id IS NULL;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check the sizes of executed memory_copy calls",
|
||||
"error_message": "NULL entries found where copied size is 0 or non-existing field",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM memory_copies WHERE size IS NULL or 0;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check the agents executing memory_copy calls",
|
||||
"error_message": "NULL entries found where copied size is 0 or non-existing field",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM memory_copies WHERE size IS NULL or 0;"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for memory_copies - agent verification",
|
||||
"name": "memory_copies",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"dst_agent_abs_index",
|
||||
"src_agent_abs_index"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Verify that all dst_agent_abs_index values exist in rocpd_info_agent table",
|
||||
"error_message": "Found dst_agent_abs_index values in memory_copies that do not exist in rocpd_info_agent table",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM memory_copies mc LEFT JOIN rocpd_info_agent ag ON mc.dst_agent_abs_index = ag.absolute_index AND mc.guid = ag.guid WHERE mc.dst_agent_abs_index IS NOT NULL AND ag.absolute_index IS NULL;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Verify that all src_agent_abs_index values exist in rocpd_info_agent table",
|
||||
"error_message": "Found src_agent_abs_index values in memory_copies that do not exist in rocpd_info_agent table",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM memory_copies mc LEFT JOIN rocpd_info_agent ag ON mc.src_agent_abs_index = ag.absolute_index AND mc.guid = ag.guid WHERE mc.src_agent_abs_index IS NOT NULL AND ag.absolute_index IS NULL;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check that dst_agent_abs_index is not NULL for memory copy operations",
|
||||
"error_message": "NULL entries found in dst_agent_abs_index column of memory_copies",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM memory_copies WHERE dst_agent_abs_index IS NULL;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check that src_agent_abs_index is not NULL for memory copy operations",
|
||||
"error_message": "NULL entries found in src_agent_abs_index column of memory_copies",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM memory_copies WHERE src_agent_abs_index IS NULL;"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"name": "rocpd_string",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"string"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check if 'timer sampling' exists in string entries",
|
||||
"error_message": "'timer sampling' string not found in rocpd_string",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%timer_sampling%';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Verify no empty string values",
|
||||
"error_message": "Empty or NULL string entries found in view_rocpd_string",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string IS NULL OR TRIM(string) = '';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "regions",
|
||||
"required_columns": [
|
||||
"guid",
|
||||
"category",
|
||||
"id",
|
||||
"name"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check that category column contains more than 1000 'timer_sampling' entries",
|
||||
"error_message": "Less than 1001 'timer_sampling' entries found in category column of regions",
|
||||
"expected_result": 1000,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'timer_sampling';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Verify no NULL or empty values in guid column",
|
||||
"error_message": "NULL or empty guid values found in regions",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE guid IS NULL OR TRIM(guid) = '';"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"name": "kernel_summary",
|
||||
"required_columns": [
|
||||
"name",
|
||||
"calls",
|
||||
"DURATION (nsec)"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for null function names",
|
||||
"error_message": "Found API calls with null function names",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernel_summary WHERE name IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check that we have some kernel calls",
|
||||
"error_message": "No kernel calls found in summary",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernel_summary"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check that we have transpose kernel captured",
|
||||
"error_message": "No kernel calls found in summary",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) as count FROM kernel_summary WHERE name LIKE 'transpose%'"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check that we have predefined number of kernel calls",
|
||||
"error_message": "No kernel calls found in summary",
|
||||
"expected_result": 1000,
|
||||
"query": "SELECT calls as num_calls FROM kernel_summary WHERE name LIKE 'transpose%'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"min_rows": 1000,
|
||||
"name": "kernels",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"category",
|
||||
"name",
|
||||
"start",
|
||||
"end",
|
||||
"queue",
|
||||
"stream"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for null function names",
|
||||
"error_message": "Found kernels with null function names",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE name IS NULL"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check that we have kernel entries",
|
||||
"error_message": "No kernel entries found",
|
||||
"expected_result": 1000,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for kernels with no active time",
|
||||
"error_message": "Kernels with no active execution times found",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE (end - start) = 0"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check that we have number of kernel entries as expected number of calls",
|
||||
"error_message": "Mismatch in expected numbers of kernels entries",
|
||||
"expected_result": 1000,
|
||||
"query": "SELECT COUNT(*) as count FROM kernels WHERE name LIKE 'transpose%'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"min_rows": 3,
|
||||
"name": "threads",
|
||||
"required_columns": [
|
||||
"tid",
|
||||
"start",
|
||||
"end",
|
||||
"name"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"min_rows": 1,
|
||||
"name_prefix": "rocpd_info_pmc_",
|
||||
"required_columns": [
|
||||
"agent_id",
|
||||
"target_arch",
|
||||
"name",
|
||||
"symbol",
|
||||
"description",
|
||||
"units",
|
||||
"value_type"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for vcn_activity amd-smi metrics",
|
||||
"error_message": "Did not find vcn_activity in amd-smi metrics",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} WHERE symbol LIKE 'VcnAct%'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"min_rows": 500,
|
||||
"name_prefix": "rocpd_pmc_event_",
|
||||
"required_columns": [
|
||||
"event_id",
|
||||
"pmc_id",
|
||||
"value"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring busy times",
|
||||
"error_message": "Less than expected number of captured amd-smi mm-busy samples!",
|
||||
"expected_result": 150,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name = 'device_busy_mm'"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring GPU memory usage",
|
||||
"error_message": "Less than expected number of captured amd-smi memory-usage samples!",
|
||||
"expected_result": 150,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name = 'device_memory_usage'"
|
||||
},
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Check for amd-smi monitoring VCN activity",
|
||||
"error_message": "Less than expected activity in amd-smi vcn-activity samples!",
|
||||
"expected_result": 100,
|
||||
"query": "SELECT COUNT(*) as count FROM {table_name} event JOIN rocpd_info_pmc info ON event.pmc_id = info.id WHERE info.name LIKE 'device_vcn_activity_%' and event.value > 0"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"commit": "Validation rules for rocm_rocdecode_api",
|
||||
"name": "events_args",
|
||||
"required_columns": [
|
||||
"event_id",
|
||||
"category",
|
||||
"stack_id",
|
||||
"parent_stack_id",
|
||||
"correlation_id"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_rocdecode_api' appears in category at least 1500 times in table events_args",
|
||||
"error_message": "'rocm_rocdecode_api' category entries are fewer than expected in events_args",
|
||||
"expected_result": 1500,
|
||||
"query": "SELECT COUNT(*) FROM events_args WHERE category = 'rocm_rocdecode_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for missing category entries",
|
||||
"error_message": "Empty or NULL category entries found in events_args",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM events_args WHERE category IS NULL OR TRIM(category) = '';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for rocm_rocdecode_api",
|
||||
"name": "regions",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"category",
|
||||
"name"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_rocdecode_api' appears in category at least 500 times in table regions",
|
||||
"error_message": "'rocm_rocdecode_api' category entries are fewer than expected in regions",
|
||||
"expected_result": 500,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_rocdecode_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Ensure there are no HIP API calls that last 0 seconds",
|
||||
"error_message": "Found rocDecode API captures where duration is 0",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_rocdecode_api' AND duration = 0;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for any NULL values in the 'name' column of regions",
|
||||
"error_message": "NULL entries found in the name column of regions",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE name IS NULL;"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for rocm_rocdecode_api",
|
||||
"name": "rocpd_string",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"string"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_rocdecode_api' string is present in the table",
|
||||
"error_message": "'rocm_rocdecode_api' string not found in the table rocpd_string",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_rocdecode_api%';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for hip_api",
|
||||
"name": "events_args",
|
||||
"required_columns": [
|
||||
"event_id",
|
||||
"category",
|
||||
"stack_id",
|
||||
"parent_stack_id",
|
||||
"correlation_id"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_hip_api' appears in category at least 1500 times in table events_args",
|
||||
"error_message": "'rocm_hip_api' category entries are fewer than expected in events_args",
|
||||
"expected_result": 100,
|
||||
"query": "SELECT COUNT(*) FROM events_args WHERE category = 'rocm_hip_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for missing category entries",
|
||||
"error_message": "Empty or NULL category entries found in events_args",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM events_args WHERE category IS NULL OR TRIM(category) = '';"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rules for hip_api",
|
||||
"name": "regions",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"category",
|
||||
"name"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than",
|
||||
"description": "Verify that 'rocm_hip_api' appears in category at least 50 times in table regions",
|
||||
"error_message": "'rocm_hip_api' category entries are fewer than expected in regions",
|
||||
"expected_result": 50,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_hip_api';"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Ensure there are no HIP API calls that last 0 seconds",
|
||||
"error_message": "Found HIP API captures where duration is 0",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_hip_api' AND duration = 0;"
|
||||
},
|
||||
{
|
||||
"comparison": "equals",
|
||||
"description": "Check for any NULL values in the 'name' column of regions",
|
||||
"error_message": "NULL entries found in the name column of regions",
|
||||
"expected_result": 0,
|
||||
"query": "SELECT COUNT(*) FROM regions WHERE name IS NULL;"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"commit": "Validation rule for hip_api",
|
||||
"name": "rocpd_string",
|
||||
"required_columns": [
|
||||
"id",
|
||||
"guid",
|
||||
"string"
|
||||
],
|
||||
"validation_queries": [
|
||||
{
|
||||
"comparison": "greater_than_or_equal",
|
||||
"description": "Verify that 'rocm_hip_api' string is present in the table",
|
||||
"error_message": "'rocm_hip_api' string not found in the table rocpd_string",
|
||||
"expected_result": 1,
|
||||
"query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_hip_api%';"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"required_tables": [
|
||||
{
|
||||
"min_rows": 10,
|
||||
"name": "threads",
|
||||
"required_columns": [
|
||||
"tid",
|
||||
"start",
|
||||
"end",
|
||||
"name"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Ссылка в новой задаче
Block a user