-
Notifications
You must be signed in to change notification settings - Fork 108
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
Use calls to cblas_daxpy to calculate the derivative of functions with cblas_ddot #226
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wsmoses
reviewed
Jul 9, 2021
wsmoses
reviewed
Jul 9, 2021
wsmoses
reviewed
Jul 9, 2021
reikdas
force-pushed
the
reikdas/ddot-adjoint
branch
3 times, most recently
from
July 22, 2021 17:44
75b7733
to
50ea0d2
Compare
wsmoses
reviewed
Jul 22, 2021
wsmoses
reviewed
Jul 22, 2021
wsmoses
reviewed
Jul 22, 2021
reikdas
force-pushed
the
reikdas/ddot-adjoint
branch
2 times, most recently
from
July 27, 2021 08:35
bdf9430
to
9c82ab0
Compare
wsmoses
reviewed
Jul 27, 2021
wsmoses
reviewed
Jul 27, 2021
wsmoses
reviewed
Jul 27, 2021
wsmoses
reviewed
Jul 27, 2021
wsmoses
reviewed
Jul 28, 2021
wsmoses
reviewed
Jul 28, 2021
wsmoses
reviewed
Jul 28, 2021
wsmoses
reviewed
Jul 28, 2021
wsmoses
reviewed
Jul 28, 2021
Since you’re passing it as an argument I don’t think it needs to be unique?
Perhaps you need to unique it based off of the type of the stride var?
…On Wed, Jul 28, 2021 at 1:29 AM Pratyush Das ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In enzyme/Enzyme/Utils.cpp
<#226 (comment)>:
> @@ -158,6 +158,98 @@ Function *getOrInsertDifferentialFloatMemcpy(Module &M, PointerType *T,
return F;
}
+Function *getOrInsertMemcpyStrided(Module &M, PointerType *T, unsigned dstalign,
+ unsigned srcalign, Value *stride) {
+ Type *elementType = T->getElementType();
+ assert(elementType->isFloatingPointTy());
+ std::string name = "__enzyme_memcpy_" + tofltstr(elementType) + "da" +
+ std::to_string(dstalign) + "sa" +
+ std::to_string(srcalign) + "stride" +
+ std::to_string(cast<ConstantInt>(stride)->getSExtValue());
Could you please help me figure out an alternate way to make the name of
the function unique for that particular stride number?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#226 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJTUXG7ZXUTTKTSF4G2YSDTZ6IR3ANCNFSM5ABEVQEQ>
.
|
wsmoses
reviewed
Jul 28, 2021
wsmoses
approved these changes
Jul 28, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excluding minor comments (see the lookup, and stride), LGTM.
Derivative of cblas_ddot can be calculated with calls to cblas_daxpy. Similarly for cblas_sdot.
reikdas
force-pushed
the
reikdas/ddot-adjoint
branch
from
July 28, 2021 20:05
03cc599
to
b4d91aa
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.