Skip to content

Conversation

@lajagapp
Copy link
Contributor

Utilities with automated system detection, results collection with API integration, and performance tracking with LKG comparison for ROCm libraries.

Motivation

Add reusable test utilities for ROCm benchmark automation (ROCfft, ROCrand, and more) with standardized system detection, results collection, and LKG performance tracking.

Technical Details

Modular utility package:

  • Core: TestClient API, logging, constants, exceptions
  • Config: YAML parser, environment variables, schema validation
  • System: Hardware/OS/ROCm detection
  • Results: Local JSON storage, API client with retry, LKG comparison

Test Plan

Tested benchmark execution, system detection, API submission, and LKG comparison.

Test Result

Benchmarks execute successfully
System detection, API upload, and LKG comparison working correctly

Submission Checklist

Utilities with automated system detection, results collection with API
integration, and performance tracking with LKG comparison for ROCm libraries.

Features:
- Benchmark execution with system auto-detection
- Local JSON storage and API submission for results
- LKG (Last Known Good) comparison
- Modular utilities: config, system detection, and results handling
- Comprehensive logging with file rotation
- Environment variable support for configuration

Signed-off-by: Lenine Ajagappane <[email protected]>
Signed-off-by: Lenine Ajagappane <[email protected]>
@lajagapp lajagapp changed the title Initial commit: Add ROCm libraries benchmark tests Add ROCm libraries benchmark tests Nov 22, 2025
Signed-off-by: Lenine Ajagappane <[email protected]>
Signed-off-by: Lenine Ajagappane <[email protected]>
Copy link
Contributor

@geomin12 geomin12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial round of comments, there's a lot of code here that may be needed before, but may not be needed now?

also, a few architecture questions i have as well. happy to chat about this via teams or here!

Comment on lines +65 to +73
"hipblaslt_bench": {
"job_name": "hipblaslt_bench",
"fetch_artifact_args": "--blas --tests",
"timeout_minutes": 60,
"test_script": f"python {_get_script_path('test_hipblaslt_benchmark.py')}",
# TODO(lajagapp): Add windows test
"platform": ["linux"],
"total_shards": 1,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this may be an issue as this will get run during each PR, push to main and scheduled run, probably resulting in long queue times and machine shortages

I would imagine we want to add benchmark tests as a separate (perhaps nightly) run on separate machines? is this the case? how frequent do we want to run these and how long do these take?

"fetch_artifact_args": "--blas --tests",
"timeout_minutes": 60,
"test_script": f"python {_get_script_path('test_hipblaslt_benchmark.py')}",
# TODO(lajagapp): Add windows test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for add windows tests, can we open a Github issue and link it here? so we can keep track?

ACTIVATION_TYPE = "none"

# Load benchmark configuration
config_file = SCRIPT_DIR.parent / 'configs/benchmarks/hipblaslt.json'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
config_file = SCRIPT_DIR.parent / 'configs/benchmarks/hipblaslt.json'
config_file = SCRIPT_DIR.parent / 'configs' / 'benchmarks' / 'hipblaslt.json'

this will make it compatible with windows machines

# Compare with LKG
log.info("Comparing results with LKG")
final_table = client.compare_results(test_name=BENCHMARK_NAME, table=table)
log.info(f"\n{final_table}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also use gha_append_step_summary too to append to the workflow run

NUM_ITERATIONS = 20 # Number of benchmark iterations

# Load benchmark configuration
config_file = SCRIPT_DIR.parent / 'configs/benchmarks/rocfft.json'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here regarding path comment

"""
self.api_url = api_url.rstrip('/')
self.fallback_url = fallback_url.rstrip('/') if fallback_url else None
self.api_key = api_key
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

secrets in github actions are a bit tricky, particularly for forked PRs (as forked PRs cannot pull data from secrets)

I personally think this should be run a nightly basis as i would imagine it takes quite a while to run (and here, it can pull secrets)

happy to chat about arch here

"""
status_code = response.status_code

if status_code == 401:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of these elongated error messages, could we just print out the error message given by API? and status code?

Returns:
Complete results payload for API submission
"""
# Build BM config
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we clarify what BM is?

return payload


def validate_payload(payload: Dict[str, Any]) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may be able to use some python libraries to validate payload :)

Comment on lines +7 to +10
prettytable>=3.0.0
requests>=2.28.0
jsonschema>=4.0.0
packaging>=21.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make the version exact?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

3 participants