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

[Tests] Fix CI for deprecated attention block when used with device_map #9442

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

sayakpaul
Copy link
Member

@sayakpaul sayakpaul commented Sep 16, 2024

What does this PR do?

Ran a round of fast GPU tests (from push_tests.yml). They are all passing except for the deprecated attention block.

I think the change is okay because it doesn't introduce any performance regressions in the CI, either.

The failure: https://github.com/huggingface/diffusers/actions/runs/10734214122/job/29768965396#step:6:4275

@sayakpaul sayakpaul requested a review from yiyixuxu September 16, 2024 08:08
@@ -140,7 +140,15 @@ jobs:
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
CUBLAS_WORKSPACE_CONFIG: :16:8
run: |
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
# DeprecatedAttentionBlockTests::test_conversion_when_using_device_map fails
Copy link
Collaborator

@yiyixuxu yiyixuxu Sep 20, 2024

Choose a reason for hiding this comment

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

do you know why this test would fail with -n 1 --dist=loadfile option? also did you tested it anywhere that it would work without this option?

I tried both

pytest -n 1 --dist=loadfile tests/models/test_attention_processor.py::DeprecatedAttentionBlockTests::test_conversion_when_using_device_map

and

pytest tests/models/test_attention_processor.py::DeprecatedAttentionBlockTests::test_conversion_when_using_device_map

both were passing on my machine; but I can see it failed on CI so just wondering

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah same. I tested on DGX and audace and both passed. So, no idea. Didn’t dig deeper because the blocks are deprecated anyway.

Copy link
Collaborator

Choose a reason for hiding this comment

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

so the test would pass if we remove this line "-n 1 --dist=loadfile" ?

Copy link
Member Author

Choose a reason for hiding this comment

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

On our CI, yes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok! I'm ok with the change then
what do you think @DN6 ?

@sayakpaul sayakpaul requested a review from yiyixuxu September 26, 2024 13:17
Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Oct 20, 2024
@a-r-r-o-w a-r-r-o-w removed the stale Issues that haven't received updates label Oct 20, 2024
@sayakpaul sayakpaul requested a review from DN6 October 21, 2024 04:33
@@ -140,7 +140,15 @@ jobs:
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
CUBLAS_WORKSPACE_CONFIG: :16:8
run: |
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
# DeprecatedAttentionBlockTests::test_conversion_when_using_device_map fails
Copy link
Collaborator

Choose a reason for hiding this comment

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

ok! I'm ok with the change then
what do you think @DN6 ?

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Nov 17, 2024
@yiyixuxu yiyixuxu removed the stale Issues that haven't received updates label Nov 17, 2024
@yiyixuxu
Copy link
Collaborator

cc @DN6 is this ok to merge?

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Dec 12, 2024
@sayakpaul sayakpaul removed the stale Issues that haven't received updates label Dec 13, 2024
@sayakpaul
Copy link
Member Author

@DN6 okay to merge?

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