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

Move accelerator-specific parsing functions with their accelerators #14753

Merged
merged 20 commits into from
Sep 18, 2022

Conversation

carmocca
Copy link
Contributor

@carmocca carmocca commented Sep 16, 2022

What does this PR do?

Reduces circular dependencies by improving code locality

This will help with #14550 which had to move many of these into local imports

Does your PR introduce any breaking changes? If yes, please list them.

None

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • [n/a] Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

cc @Borda @justusschock @awaelchli @rohitgr7 @tchaton @akihironitta

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Sep 16, 2022
@mergify mergify bot removed the has conflicts label Sep 16, 2022
@mergify mergify bot added the ready PRs ready to be merged label Sep 16, 2022
@Borda Borda enabled auto-merge (squash) September 16, 2022 17:28
@mergify mergify bot added ready PRs ready to be merged and removed has conflicts ready PRs ready to be merged labels Sep 17, 2022
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

Sorry, need to block merge as this is undoing most work done in #14708. I'll have to re-apply the adjustments.

@mergify mergify bot removed the ready PRs ready to be merged label Sep 17, 2022
@awaelchli awaelchli disabled auto-merge September 17, 2022 01:05
@mergify mergify bot added the ready PRs ready to be merged label Sep 18, 2022
@mergify mergify bot added has conflicts and removed ready PRs ready to be merged labels Sep 18, 2022
@mergify mergify bot added ready PRs ready to be merged and removed has conflicts ready PRs ready to be merged labels Sep 18, 2022
mock_cuda_count(monkeypatch, 4)


def mock_mps_count(monkeypatch, n: int) -> None:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@awaelchli You added these to Lite conftest but they are unused. I suggest removing them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Introducing these inconsistencies in the two code bases generates a lot of new work when moving/rewriting tests to Lite.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can add them to Lite too if it reduces the boilerplate. Just saying that either we add them and use them or not add them. When I made the comment above, they were added but not used.

I see now you have removed them. We can add them and refactor the lite tests in a different PR if you would like.

tests/tests_lite/conftest.py Outdated Show resolved Hide resolved
tests/tests_lite/conftest.py Outdated Show resolved Hide resolved
tests/tests_lite/test_connector.py Outdated Show resolved Hide resolved
@carmocca carmocca enabled auto-merge (squash) September 18, 2022 22:43
@carmocca carmocca merged commit e9c571d into master Sep 18, 2022
@carmocca carmocca deleted the refactor/move-parsing-utils branch September 18, 2022 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Includes a deprecation pl Generic label for PyTorch Lightning package ready PRs ready to be merged refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants