Skip to content

Conversation

@DN6
Copy link
Collaborator

@DN6 DN6 commented Oct 9, 2023

What does this PR do?

xformers breaks cuDNN drivers with torch 2.1. This PR

  1. Creates a separate runner for xformer related tests with a pinned torch version
  2. Updates a few tests that had entangled xformers tests

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@DN6 DN6 changed the title New xformer runner New xformers test runner Oct 9, 2023
@DN6 DN6 requested a review from patrickvonplaten October 10, 2023 09:10
env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
run: |
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "xformers" --make-reports=tests_torch_xformers_cuda tests/
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "xformers" --make-reports=tests_torch_xformers_cuda tests/
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile -s -v -k "xformers" --make-reports=tests_torch_xformers_cuda tests/

ok for now, but I'm not a huge fan of using the -k "xformers" option in our runners as this is quite brittle. I'd prefer to start marking the tests like we do in Transformers: https://github.com/huggingface/transformers/blob/1e3c9ddacc7fc4142253bc9ddcba85c4d5b977e7/tests/test_modeling_common.py#L2746 so that we can then run:

pytest -m xformers tests/....

omegaconf \
pytorch-lightning \
xformers
pytorch-lightning
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually why do we have pytorch-lightning in here? We never use this library IMO. Can we remove it from all places in the dockers?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good. I'll make the change.

@DN6 DN6 merged commit 4d2c981 into main Oct 12, 2023
@kashif kashif deleted the new-xformer-runner branch November 1, 2023 17:23
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* move xformers to dedicated runner

* fix

* remove ptl from test runner images
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