Skip to content

Conversation

@mvafin
Copy link
Contributor

@mvafin mvafin commented Nov 18, 2025

Details:

  • Support axis=None for aten::mean operation

Tickets:

@mvafin mvafin requested a review from bumbosiepsak November 18, 2025 14:14
@mvafin mvafin requested a review from a team as a code owner November 18, 2025 14:14
@github-actions github-actions bot added the category: PyTorch FE OpenVINO PyTorch Frontend label Nov 18, 2025
Copy link
Contributor

Copilot AI left a comment

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 support for axis=None in the aten::mean operation for PyTorch frontend, allowing the mean to be computed over all dimensions when no axis is specified.

Key changes:

  • Modified the C++ mean operation handler to default to all axes when axis parameter is None
  • Updated test cases to validate the new axis=None behavior and fixed test function naming
  • Improved code readability with better formatting and removal of redundant logic

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/frontends/pytorch/src/op/mean.cpp Added default initialization of axes to cover all dimensions and conditional handling for None axis input
tests/layer_tests/pytorch_tests/test_mean.py Fixed test function name from test_sum to test_mean, added axis=None test case, improved code formatting, and fixed parameter handling logic

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

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

Labels

category: PyTorch FE OpenVINO PyTorch Frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant