Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpplint & Eager mode: refactor and add comments to empty_* functions, general lint cleanup in ort_aten #12238

Merged
merged 6 commits into from
Jul 20, 2022

Conversation

msftlincoln
Copy link
Contributor

@msftlincoln msftlincoln commented Jul 19, 2022

Description: Minor updates to clarify and simplify implementations of empty_* eager functions.
Cleanup cpplint errors in ort_aten.cpp.
Add cpplint vscode settings.

@jamill
Copy link
Member

jamill commented Jul 19, 2022

Just a couple of things to consider on the PR / commit message:

empty* comments and code reuse

I would consider tweaking commit message - If I was just looking through commit history, I am not sure this would know what empty* comments referred to. Maybe something along the lines of:

Eager mode: refactor and add comments to empty_* functions

or

Refactor and add comments to empty_* eager mode functions

Also - maybe remove boilerplate PR description for "Motivation and Context" when committing change / creating merge commit?

@msftlincoln msftlincoln requested a review from WilBrady July 19, 2022 16:48
@msftlincoln msftlincoln changed the title empty* comments and code reuse Eager mode: refactor and add comments to empty_* functions Jul 19, 2022
@msftlincoln msftlincoln changed the title Eager mode: refactor and add comments to empty_* functions cpplint & Eager mode: refactor and add comments to empty_* functions, general lint cleanup in ort_aten Jul 19, 2022
@msftlincoln msftlincoln requested a review from jamill July 19, 2022 18:26
@@ -34,5 +34,10 @@
"python.linting.pydocstyleArgs": [
"--convention=google"
],
"python.linting.banditEnabled": true
"python.linting.banditEnabled": true,
"cpplint.lineLength": 120,
Copy link
Member

Choose a reason for hiding this comment

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

Is there documentation for the cpplint settings? Does this apply to a particular extension?

onnxruntime::TensorShape(tensor.sizes().vec()),
tensor.data_ptr(),
*mem_info, ort_tensor,
0L, // offset = 0 - because tensor.data_ptr() includes the underyling offset
Copy link
Member

Choose a reason for hiding this comment

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

nit: should we fix up spelling here while we are tidying this file?

Copy link
Member

@jamill jamill left a comment

Choose a reason for hiding this comment

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

In the PR description / merge commit, consider including details about why you added these specific cpplint values, and maybe what these specific filters control.

Thank you for making it easier to match the style rules applied during the CI build locally, and cleaning up the style issues to remove warnings!

@msftlincoln msftlincoln merged commit 424120d into master Jul 20, 2022
@msftlincoln msftlincoln deleted the users/msftlincoln/orteager/empty branch July 20, 2022 15:47
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.

3 participants