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

make more cuda-only tests device-agnostic #2876

Merged
merged 7 commits into from
Jul 3, 2024

Conversation

faaany
Copy link
Contributor

@faaany faaany commented Jun 20, 2024

What does this PR do?

Below is the test results on XPU:

====================================== test session starts ======================================
platform linux -- Python 3.9.0, pytest-8.0.0, pluggy-1.5.0
rootdir: /home/fanli/workspace/tmp/accelerate
plugins: subtests-0.12.1, xdist-3.6.1
collected 9 items                                                                               

tests/test_big_modeling.py .                                                              [ 12%]
tests/test_examples.py .                                                                                        [ 25%]
tests/test_modeling_utils.py ......                                                                             [100%]

================================================== warnings summary ===================================================
../../../miniforge3/envs/acc-upstream/lib/python3.9/site-packages/intel_extension_for_pytorch/nn/utils/_weight_prepack.py:5
  /home/fanli/miniforge3/envs/acc-upstream/lib/python3.9/site-packages/intel_extension_for_pytorch/nn/utils/_weight_prepack.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================= PASSES ========================================================
=============================================== short test summary info ===============================================
PASSED tests/test_big_modeling.py::BigModelingTester::test_dispatch_model_move_model_warning
PASSED tests/test_examples.py::FeatureExamplesTests::test_ddp_comm_hook
PASSED tests/test_modeling_utils.py::ModelingUtilsTester::test_load_checkpoint_in_model_disk_offload
PASSED tests/test_modeling_utils.py::ModelingUtilsTester::test_load_checkpoint_in_model_one_gpu
PASSED tests/test_modeling_utils.py::ModelingUtilsTester::test_load_checkpoint_in_model_two_gpu
PASSED tests/test_modeling_utils.py::ModelingUtilsTester::test_set_module_tensor_to_cpu_and_gpu
PASSED tests/test_modeling_utils.py::ModelingUtilsTester::test_set_module_tensor_between_gpus
PASSED tests/test_modeling_utils.py::ModelingUtilsTester::test_set_module_tensor_to_meta_and_gpu
============================================ 8 passed, 1 warning in 16.90s ============================================
PASSED tests/test_examples.py::FeatureExamplesTests::test_distributed_inference_examples_phi2
PASSED tests/test_examples.py::FeatureExamplesTests::test_distributed_inference_examples_stable_diffusion
PASSED tests/test_accelerator.py::AcceleratorTester::test_get_state_dict_from_offload_use_pytorch
PASSED tests/test_accelerator.py::AcceleratorTester::test_get_state_dict_from_offload_use_safetensors

@yao-matrix
Copy link

OK for me.

@faaany faaany marked this pull request as ready for review June 21, 2024 03:56
@faaany
Copy link
Contributor Author

faaany commented Jun 26, 2024

@SunMarc as well as this one. Thx!

@faaany
Copy link
Contributor Author

faaany commented Jun 27, 2024

@BenjaminBossan

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

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

LGTM ! Thanks for updating !

Copy link
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

In general, this change LGTM, thanks. Do we know if the affected tests would actually pass on all these devices?

@HuggingFaceDocBuilderDev

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.

@faaany
Copy link
Contributor Author

faaany commented Jul 2, 2024

In general, this change LGTM, thanks. Do we know if the affected tests would actually pass on all these devices?

Yes, all of them passed on XPU.

@SunMarc SunMarc requested a review from muellerzr July 2, 2024 10:24
Copy link
Collaborator

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

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

Thanks! Can you adjust the merge conflict then I can land this? :)

@faaany
Copy link
Contributor Author

faaany commented Jul 3, 2024

Thanks! Can you adjust the merge conflict then I can land this? :)

sure, merge conflict is resolved.

@muellerzr muellerzr merged commit eac206f into huggingface:main Jul 3, 2024
25 checks passed
@faaany faaany deleted the enable-xpu branch November 4, 2024 06:09
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.

6 participants