-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add CUDA demos #1139
Add CUDA demos #1139
Conversation
clang-tidy review says "All clean, LGTM! 👍" |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1139 +/- ##
=======================================
Coverage 94.56% 94.56%
=======================================
Files 51 51
Lines 8941 8941
=======================================
Hits 8455 8455
Misses 486 486
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
ceb6a75
to
4cba305
Compare
clang-tidy review says "All clean, LGTM! 👍" |
|
||
/* | ||
* DISCLAIMER: The following file has been modified slightly to make it | ||
* compatible with Clad. The original file can be found at NVIDIA's cuda-samples |
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.
Can we describe what the modifications are on a high-level?
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.
Hmm I can mention that these changes refer to the original main
function whose parts have been moved to a separate function to use clad::gradient
on. There's also the loss of the original print statements and the addition of helper functions to verify the results. Would this do as a whole?
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.
How about now?
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.
Yes, or just make a diff and put it in comment if it’s not big.
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.
I think that would be confusing, because I kind of restructured the file
clang-tidy review says "All clean, LGTM! 👍" |
77b3960
to
89b7996
Compare
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
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.
clang-tidy made some suggestions
0e5b349
to
952cb77
Compare
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.
clang-tidy made some suggestions
@@ -1893,6 +1893,10 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context, | |||
const Expr* arg = CE->getArg(i); | |||
const auto* PVD = FD->getParamDecl( | |||
i - static_cast<unsigned long>(isMethodOperatorCall)); | |||
if (PVD->getType()->isRValueReferenceType()) { | |||
IdentifierInfo* RValueName = CreateUniqueIdentifier("_r"); | |||
const_cast<ParmVarDecl*>(PVD)->setDeclName(RValueName); |
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.
warning: do not use const_cast [cppcoreguidelines-pro-type-const-cast]
const_cast<ParmVarDecl*>(PVD)->setDeclName(RValueName);
^
I added as many parts as possible from the original demo to minimize the diff. You're free to have a look in case you have any suggestions! |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
022e3c7
to
05ac10f
Compare
@vgvassilev Let's postpone this merge till the r value PR is fixed and merged, as this functionality is needed to run the demo |
8543e65
to
4d19839
Compare
clang-tidy review says "All clean, LGTM! 👍" |
2 similar comments
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
f6aab34
to
52cfa16
Compare
52cfa16
to
b8d7c1c
Compare
clang-tidy review says "All clean, LGTM! 👍" |
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.
LGTM!
This PR adds the following demos: