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

Support CPU Adam and Adagrad on Windows #1634

Merged
merged 3 commits into from
Jan 5, 2022
Merged

Conversation

lostmsu
Copy link
Contributor

@lostmsu lostmsu commented Dec 11, 2021

Ensures, that CPU Adagrad and Adam can be build with MSVC++

Unit tests for them appear to pass on my machine, but I am hoping to add a CI build in the future too to ensure they don't break.

@lostmsu
Copy link
Contributor Author

lostmsu commented Jan 4, 2022

@jeffra @RezaYazdaniAminabadi the CI tests seem to be passing. Is there anything I need to do for this PR to be merged? It is blocking further work, as GitHub does not allow to submit more PRs on top of existing PRs.

BTW, if you want, I can instead make one huge PR with many Windows-related changes, but they won't be as siloed as this one.

Comment on lines -97 to +99
size_t H = layout.size(0);
size_t M = layout.size(1);
size_t N = layout.size(2);
int64_t H = layout.size(0);
int64_t M = layout.size(1);
int64_t N = layout.size(2);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Was this change required for CPU Adam+Adagrad support on windows?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I, honestly, forgot what the compile error was, but torch's C++ size explicitly returns int64_t.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use uint64_t instead, because if I remember correctly size_t is unsigned long int?

@jeffra jeffra enabled auto-merge (squash) January 5, 2022 18:44
@jeffra jeffra merged commit 74493b2 into microsoft:master Jan 5, 2022
@lostmsu lostmsu deleted the Win/CPU-Opt branch January 5, 2022 22:44
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