Skip to content

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

Merged
msftlincoln merged 6 commits into
masterfrom
users/msftlincoln/orteager/empty
Jul 20, 2022
Merged

cpplint & Eager mode: refactor and add comments to empty_* functions, general lint cleanup in ort_aten#12238
msftlincoln merged 6 commits into
masterfrom
users/msftlincoln/orteager/empty

Conversation

@msftlincoln

@msftlincoln msftlincoln commented Jul 19, 2022

Copy link
Copy Markdown
Contributor

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

@jamill

jamill commented Jul 19, 2022

Copy link
Copy Markdown
Member

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
Comment thread orttraining/orttraining/eager/ort_aten.cpp
Comment thread orttraining/orttraining/eager/ort_aten.cpp
@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
Comment thread orttraining/orttraining/eager/ort_aten.cpp
Comment thread .vscode/settings.json
],
"python.linting.banditEnabled": true
"python.linting.banditEnabled": true,
"cpplint.lineLength": 120,

Copy link
Copy Markdown
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
Copy Markdown
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?

@jamill jamill left a comment

Copy link
Copy Markdown
Member

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