Skip to content

Conversation

Silv3S
Copy link
Contributor

@Silv3S Silv3S commented Sep 15, 2025

  • remove unused variables,
  • add compiler flag to prevent this in the future

@Copilot Copilot AI review requested due to automatic review settings September 15, 2025 09:22
Copy link
Contributor

@Copilot 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 removes unused variables from the codebase and adds a compiler flag to detect unused variables in the future. The changes focus on cleaning up variables that were declared but never referenced in the code.

  • Removes unused output_size variable from RoiAlign kernel
  • Removes unused dg_data and db_data variables from LayerNorm backward kernel
  • Adds -Werror=unused-variable compiler flag to catch future unused variables

Reviewed Changes

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

File Description
src/ATen/native/xpu/sycl/RoiAlignKernels.cpp Removes unused output_size variable calculation
src/ATen/native/xpu/sycl/LayerNormKernels.cpp Removes unused pointer variables dg_data and db_data
CMakeLists.txt Adds compiler flag to treat unused variables as errors

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Silv3S Silv3S requested a review from Copilot September 19, 2025 15:32
Copy link
Contributor

@Copilot 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

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


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@EikanWang EikanWang left a comment

Choose a reason for hiding this comment

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

LGTM

@EikanWang EikanWang requested a review from CuiYifeng September 19, 2025 18:07
Copy link
Contributor

@CuiYifeng CuiYifeng left a comment

Choose a reason for hiding this comment

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

LGTM.

@CuiYifeng CuiYifeng added this pull request to the merge queue Sep 25, 2025
Merged via the queue into intel:main with commit 23cd584 Sep 25, 2025
49 of 50 checks passed
@Silv3S Silv3S deleted the dev/ssiwek/unused_variables branch September 25, 2025 06:52
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.

5 participants