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>
このコミットが含まれているのは:
+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"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする