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

[CPU] Skip CPU support unimplemented error #3633

Merged
merged 21 commits into from
Jul 19, 2023

Conversation

Yejing-Lai
Copy link
Contributor

This PR aims to add CPU inference UT support. We skip CPU support unimplemented errors and update cpu inference workflow.
Skip logic:

  1. Builder name does not exist or is not implemented, then skip.
  2. Add an API to get the supported data types by accelerator, which can help us skip GPU fp16 UT.

@Yejing-Lai Yejing-Lai force-pushed the lyj/cpu_infer_workflow branch 2 times, most recently from 5838577 to 7e534ab Compare June 6, 2023 09:03
@Yejing-Lai
Copy link
Contributor Author

I found that if no tests were collected, pytest will return exit code 5 (the correct exit code should be 0). I updated the cmd of running ut to ensure that pytest can exit correctly.

@Yejing-Lai Yejing-Lai force-pushed the lyj/cpu_infer_workflow branch from 7e534ab to 7ea1c8b Compare June 6, 2023 09:12
@@ -147,6 +147,9 @@ def is_fp16_supported(self):
else:
return False

def supported_dtypes(self):
return [torch.float, torch.half]
Copy link
Contributor

Choose a reason for hiding this comment

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

Cuda support torch.bfloat16 as well, right?

Copy link
Contributor

@tjruwase tjruwase Jun 30, 2023

Choose a reason for hiding this comment

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

Is there any reason we cannot use the data types defined here
https://pytorch.org/docs/stable/tensors.html#data-types

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi tjruwase, I am sorry for the late reply. Cuda support torch.bfloat16 as well. I will update my PR later, Thanks~

@tjruwase
Copy link
Contributor

@Yejing-Lai, is this PR ready for review? Thanks!

@Yejing-Lai
Copy link
Contributor Author

@Yejing-Lai, is this PR ready for review? Thanks!

It's ready. The ut can work correctly on my local env. Please review. Thanks~

@tjruwase
Copy link
Contributor

@Yejing-Lai, PR looks good. Please resolve conflict to enable merge. Thanks.

@Yejing-Lai
Copy link
Contributor Author

@Yejing-Lai, PR looks good. Please resolve conflict to enable merge. Thanks.

Hi @tjruwase , can I run the CI again? I think the reason for the failure of both checks is a network issue.

@tjruwase tjruwase added this pull request to the merge queue Jul 17, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 17, 2023
Yejing-Lai and others added 4 commits July 18, 2023 09:26
Revert "remove skip FusedAdamBuilder; add suported_dtypes"

Revert "remove unused parameters"

Revert "enable zero stage 1 and 2 for synchronized accelerator (a.k.a. CPU)"

Revert "use cpu adam to implement fused adam"

Revert "fused adam can build"
@Yejing-Lai
Copy link
Contributor Author

Hi @tjruwase, I am sorry to revert the commit about fusedadam. Our fusedadam needs to be further modified, and we will submit another PR about fusedadam after this PR merge. Thanks for your review/merge~

@tjruwase
Copy link
Contributor

@Yejing-Lai, no worries. Thanks for the update. Please ping me when you are ready to move forward with this PR. Thanks!

@Yejing-Lai
Copy link
Contributor Author

@Yejing-Lai, no worries. Thanks for the update. Please ping me when you are ready to move forward with this PR. Thanks!

Hi @tjruwase. this PR is ready for merge. Please review. Thanks~

@tjruwase tjruwase added this pull request to the merge queue Jul 19, 2023
Merged via the queue into microsoft:master with commit 7290aac Jul 19, 2023
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.

4 participants