diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

make `pipelines` tests device-agnostic (part1)

Open faaany opened this issue 1 year ago • 16 comments

What does this PR do?

Below are some evidences:

PASSED tests/pipelines/animatediff/test_animatediff.py::AnimateDiffPipelineFastTests::test_to_device
PASSED tests/pipelines/amused/test_amused.py::AmusedPipelineFastTests::test_model_cpu_offload_forward_pass
PASSED tests/pipelines/amused/test_amused.py::AmusedPipelineFastTests::test_cpu_offload_
forward_pass_twice
PASSED tests/pipelines/amused/test_amused_inpaint.py::AmusedInpaintPipelineFastTests::te
st_to_device

@yiyixuxu

faaany avatar Sep 09 '24 22:09 faaany

Could you provide some details about the machine you used to run the tests changed in this PR?

sayakpaul avatar Sep 10 '24 01:09 sayakpaul

Could you provide some details about the machine you used to run the tests changed in this PR?

yes, I am running on Intel(R) Data Center GPU Max 1550.

faaany avatar Sep 10 '24 01:09 faaany

Could you provide some details about the machine you used to run the tests changed in this PR?

xpu is the common device name for intel gpu.

faaany avatar Sep 10 '24 01:09 faaany

Hi @sayakpaul , any concern on this PR?

faaany avatar Sep 12 '24 07:09 faaany

could you pls help retrigger the CI? Thx a lot!

faaany avatar Sep 13 '24 04:09 faaany

I saw the failed CI tests. Is this because that those tests should only run on CUDA devices? @yiyixuxu

faaany avatar Sep 13 '24 07:09 faaany

I saw the failed CI tests. Is this because that those tests should only run on CUDA devices? @yiyixuxu

Correct

sayakpaul avatar Sep 13 '24 08:09 sayakpaul

Okay, updated!

faaany avatar Sep 13 '24 09:09 faaany

There are 1705 cuda-only UTs. Besides this PR, I have more PRs coming related to device-agnostic tests, e.g. (9401, 9400). Could you pls take a look at this one, so I can proceed with the rest? Thanks a lot!

faaany avatar Sep 14 '24 01:09 faaany

Hi @yiyixuxu, could you let me know your thoughts on this PR?

faaany avatar Sep 18 '24 08:09 faaany

Hi folks, 2 weeks already, any feedback? I am waiting to enable more cases on XPU... If this is not the right approach, pls let me know as well. Thanks a lot!

@sayakpaul @yiyixuxu

faaany avatar Sep 20 '24 07:09 faaany

Please be a little more respectful towards the maintainers' time. It will be reviewed soon.

sayakpaul avatar Sep 20 '24 07:09 sayakpaul

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Please be a little more respectful towards the maintainers' time. It will be reviewed soon.

oh, if my expression sounds impolite, sorry for that. And thanks for letting me know!

No hurries, I am just a bit worried that I might not be on the right track. Thanks for your understanding.

faaany avatar Sep 20 '24 07:09 faaany

Please be a little more respectful towards the maintainers' time. It will be reviewed soon.

@sayakpaul , could you pls take a review on this? This PR and following PRs are part of efforts to integrate intel gpu into hugging face ecosystems and making CIs can run as expected, thx.

yao-matrix avatar Oct 13 '24 23:10 yao-matrix

@yiyixuxu thanks for the comments. I went through all the changes again and updated the places when necessary. Pls have a review. Thx!

faaany avatar Oct 23 '24 07:10 faaany

Hi @yiyixuxu , can we move forward with this PR?

faaany avatar Oct 31 '24 02:10 faaany

Hi guys, any concern about this PR?

faaany avatar Nov 06 '24 06:11 faaany

Thanks for the comments. Code Update!

faaany avatar Nov 11 '24 03:11 faaany

@faaany can you please run styling on this branch and apply the same comments to part 2 PR ? (require_non_cpu is still defined and used there)

IlyasMoutawwakil avatar Nov 18 '24 09:11 IlyasMoutawwakil

@faaany can you please run styling on this branch and apply the same comments to part 2 PR ? (require_non_cpu is still defined and used there)

Thanks for the review! Style fixed and let me un-draft the part2 PR, once this one got merged

faaany avatar Nov 18 '24 10:11 faaany

@faaany your changes didn't pass the code quality check, can you do make style && make quality

IlyasMoutawwakil avatar Nov 18 '24 10:11 IlyasMoutawwakil

@faaany your changes didn't pass the code quality check, can you do make style && make quality

done

faaany avatar Nov 18 '24 10:11 faaany

Hi @DN6 , could you take a look at this PR?

faaany avatar Nov 21 '24 07:11 faaany