Skip to content

TT-XLA op by op parser - #143

Merged
nsumrakTT merged 5 commits into
mainfrom
nsumrak/xla_op_by_op
Jul 9, 2026
Merged

nsumrakTT merged 5 commits into
mainfrom
nsumrak/xla_op_by_op

Conversation

@nsumrakTT

@nsumrakTT nsumrakTT commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings July 9, 2026 13:06
@nsumrakTT
nsumrakTT requested a review from a team as a code owner July 9, 2026 13:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds initial support in the collect_data GitHub Action for parsing TT-XLA “op-by-op” pytest report artifacts into OpTest records, along with test fixtures to validate parsing behavior.

Changes:

  • Introduces a new TTXlaOpByOpParser to extract per-op OpTest entries from TT-XLA op-by-op JSON reports.
  • Wires the new parser into the optest report generation flow.
  • Adds a pytest test plus sample op-by-op report JSON fixtures under test/data/.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
.github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py New parser for extracting OpTest entries from TT-XLA op-by-op reports.
.github/actions/collect_data/src/optests.py Adds parser selection logic to route relevant reports to TTXlaOpByOpParser.
.github/actions/collect_data/test/test_xla_pytest_parser.py Adds a unit test covering op-by-op parsing using fixture reports.
.github/actions/collect_data/test/data/xla_op_by_op_reports/op-by-op-report-1-86083933787/op_by_op_report-86083933787.json Sample op-by-op report fixture (passed case).
.github/actions/collect_data/test/data/xla_op_by_op_reports/op-by-op-report-2-86083933790/op_by_op_report-86083933790.json Sample op-by-op report fixture (failed case).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/actions/collect_data/src/optests.py Outdated
Comment thread .github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py
Comment thread .github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py
Comment thread .github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py Outdated
Comment thread .github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py
Comment thread .github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py
Comment thread .github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py
Comment thread .github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py
Comment thread .github/actions/collect_data/test/test_xla_pytest_parser.py Outdated
Comment on lines 61 to 63
def create_optest_reports(pipeline, workflow_outputs_dir):
reports = []

vmilosevic
vmilosevic previously approved these changes Jul 9, 2026
Copilot AI review requested due to automatic review settings July 9, 2026 14:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 7 changed files in this pull request and generated 7 comments.

Comment thread .github/actions/collect_data/test/test_xla_pytest_parser.py Outdated
Comment thread .github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py
Comment thread .github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py
Comment thread .github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py Outdated
Comment thread .github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py
Comment thread .github/actions/collect_data/src/parsers/tt_xla_op_by_op_parser.py
Comment thread .github/actions/collect_data/src/cicd.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 9, 2026 14:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 7 changed files in this pull request and generated 4 comments.

Comment on lines +105 to +123
return OpTest(
github_job_id=github_job_id,
full_test_name=full_test_name,
test_start_ts=test_start_ts,
test_end_ts=test_end_ts,
test_case_name=name,
success=success,
skipped=skipped,
message=error_message,
config=config,
frontend=project,
model_name=model_name,
op_kind=test.get("op_kind", "") if test.get("op_kind") != "None" else "",
op_name=test.get("op_name", "").strip('"') if test.get("op_name") != "None" else "",
framework_op_name=test.get("framework_op_name", "") if test.get("framework_op_name") != "None" else "",
inputs=inputs,
outputs=outputs,
op_params=None,
)
Comment on lines +68 to +75
for prop in user_properties:
# Look for entries with "OpTest model for: *" as the key
for key, test_data in prop.items():
if key.startswith("OpTest model for:"):
# Extract op name from the key
op_name = key.replace("OpTest model for:", "").strip()
yield _get_pydantic_test(filepath, op_name, test_data, project, github_job_id)

Comment on lines +77 to +79
def _get_pydantic_test(filepath, name, test, project, github_job_id, default_timestamp=datetime.now()):
# Parse timestamps from test data
test_start_ts = (

:param test_report: Filename of the test report
"""
return "op_by_op" in str(test_report) and str(test_report).endswith(".json")
Copilot AI review requested due to automatic review settings July 9, 2026 14:22
@nsumrakTT
nsumrakTT removed the request for review from Copilot July 9, 2026 14:22
Copilot AI review requested due to automatic review settings July 9, 2026 14:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 7 changed files in this pull request and generated 5 comments.



class TTXlaOpByOpParser(Parser):
"""Parser for python unittest report files."""
Comment on lines +70 to +71
def _get_pydantic_test(filepath, name, test, project, github_job_id, default_timestamp=datetime.now()):
# Parse timestamps from test data
Comment on lines +168 to +171
try:
value = ast.literal_eval(value_str)
except:
value = None
Comment on lines +124 to +128
def _map_tensor_desc(tensors):
if not tensors:
return []
for tensor in tensors:
yield TensorDesc(

:param test_report: Filename of the test report
"""
return "op_by_op" in str(test_report) and str(test_report).endswith(".json")
@nsumrakTT
nsumrakTT merged commit 0d64651 into main Jul 9, 2026
6 checks passed
@nsumrakTT
nsumrakTT deleted the nsumrak/xla_op_by_op branch July 9, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants