Skip to content

Conversation

bsergean
Copy link

@bsergean bsergean commented Dec 23, 2022

@bsergean bsergean requested a review from kulinseth as a code owner December 23, 2022 00:42
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 23, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/91342

Note: Links to docs will display an error until the docs builds have been completed.

❌ 30 Failures

As of commit 7431216:

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added ciflow/mps Run MPS tests (subset of trunk) release notes: mps Release notes category labels Dec 23, 2022
@linux-foundation-easycla
Copy link

CLA Not Signed

@bdhirsh
Copy link
Contributor

bdhirsh commented Dec 27, 2022

Looks ok to me! Can you sign the CLA?

@bsergean
Copy link
Author

bsergean commented Dec 28, 2022 via email

Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

Sounds good.
Could you also add a lint entry for this to make sure we don't add new ones.
It can be similar to the one below I think:

pytorch/.lintrunner.toml

Lines 766 to 785 in dfb6514

[[linter]]
code = 'ONCE_FLAG'
include_patterns = [
'c10/**',
'aten/**',
'torch/csrc/**',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=std::once_flag',
'--linter-name=ONCE_FLAG',
'--error-name=invalid once_flag',
'--replace-pattern=s/std::once_flag/c10::once_flag/',
"""--error-description=\
Use of std::once_flag is forbidden and should be replaced with c10::once_flag\
""",
'--',
'@{{PATHSFILE}}'
]

@zou3519 zou3519 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jan 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2023

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Mar 5, 2023
@github-actions github-actions bot closed this Apr 4, 2023
@bsergean
Copy link
Author

Hi there, would it be OK to bring this in without the linter as a start ? And make adding the linter rule a follow-up ?

I can make a new PR with the latest state of the master branch.

pytorchmergebot pushed a commit that referenced this pull request Jul 7, 2023
…4364)

Fixes #91338

Follow up from #91342

> 🚀 The feature, motivation and pitch
> We have an existing DeviceType class all over the place in our code base, and it conflicts with the one that is used in torch. > Thankfully the pytorch DeciceType enum class is under the c10 namespace.

```
In file included from /xxx/build/_deps/torch-src/../../aten/src/ATen/ops/view.h:5:
/xxx/_deps/torch-src/aten/src/ATen/Context.h:265:14: error: reference to 'DeviceType' is ambiguous
    if (p == DeviceType::HIP) {
             ^
/xxx/include/Common_types.h:178:8: note: candidate found by name lookup is 'DeviceType'
struct DeviceType {
       ^
/xxx/build/_deps/torch-src/c10/../c10/core/DeviceType.h:32:12: note: candidate found by name lookup is 'c10::DeviceType'
enum class DeviceType : int8_t {
```

Pull Request resolved: #104364
Approved by: https://github.com/albanD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/mps Run MPS tests (subset of trunk) module: amp (automated mixed precision) autocast open source release notes: mps Release notes category Stale triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use c10 namespace in public headers for classes like DeviceType (and Device ?)

5 participants