-
Notifications
You must be signed in to change notification settings - Fork 122
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 llvm 18 osx ci #1025
base: master
Are you sure you want to change the base?
Add llvm 18 osx ci #1025
Conversation
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
@@ -135,6 +135,11 @@ CUDA_HOST_DEVICE inline void __builtin_powf_pullback(float x, float exponent, | |||
*d_exponent += t.pushforward * d_y; | |||
} | |||
|
|||
CUDA_HOST_DEVICE ValueAndPushforward<double, double> | |||
inline __builtin_exp_pushforward(double x, double d_x) { |
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: declaration uses identifier '__builtin_exp_pushforward', which is a reserved identifier [bugprone-reserved-identifier]
inline __builtin_exp_pushforward(double x, double d_x) {
^
this fix will not be applied because it overlaps with another fix
@@ -135,6 +135,11 @@ | |||
*d_exponent += t.pushforward * d_y; | |||
} | |||
|
|||
CUDA_HOST_DEVICE ValueAndPushforward<double, double> | |||
inline __builtin_exp_pushforward(double x, double d_x) { |
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: invalid case style for function '__builtin_exp_pushforward' [readability-identifier-naming]
inline __builtin_exp_pushforward(double x, double d_x) {
^
this fix will not be applied because it overlaps with another fix
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
// Silence diag outputs in nested derivation process. | ||
pullbackRequest.VerboseDiags = false; | ||
// Silence diag outputs in nested derivation process unless we are going | ||
// through a builtin function which we know we cannot differentiate. |
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: argument comment missing for literal argument 'val' [bugprone-argument-comment]
// through a builtin function which we know we cannot differentiate. | |
DerivedCallArgs.front()->getType(), m_Context, /*val=*/1)); |
297f428
to
53e1ddf
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1025 +/- ##
==========================================
+ Coverage 94.24% 94.25% +0.01%
==========================================
Files 55 55
Lines 8445 8445
==========================================
+ Hits 7959 7960 +1
+ Misses 486 485 -1
... and 2 files with indirect coverage changes
|
53e1ddf
to
e9450fe
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
There were too many comments to post at once. Showing the first 10 out of 11. Check the log or trigger a new build to see more.
@@ -43,7 +43,7 @@ struct DiffRequest { | |||
unsigned RequestedDerivativeOrder = 1; | |||
/// Context in which the function is being called, or a call to | |||
/// clad::gradient/differentiate, where function is the first arg. | |||
clang::CallExpr* CallContext = nullptr; | |||
const clang::CallExpr* CallContext = nullptr; |
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: member variable 'CallContext' has public visibility [cppcoreguidelines-non-private-member-variables-in-classes]
const clang::CallExpr* CallContext = nullptr;
^
"have a " | ||
"definition", | ||
{FD->getNameAsString()}); | ||
if (true || request.VerboseDiags) { |
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: redundant boolean literal supplied to boolean operator [readability-simplify-boolean-expr]
if (true || request.VerboseDiags) { | |
if (true) { |
lib/Differentiator/DiffPlanner.cpp
Outdated
@@ -176,7 +176,7 @@ namespace clad { | |||
|
|||
void DiffRequest::updateCall(FunctionDecl* FD, FunctionDecl* OverloadedFD, | |||
Sema& SemaRef) { | |||
CallExpr* call = this->CallContext; | |||
CallExpr* call = const_cast<CallExpr*>(this->CallContext); |
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]
CallExpr* call = const_cast<CallExpr*>(this->CallContext);
^
1fa5a86
to
89454b6
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
lib/Differentiator/DiffPlanner.cpp
Outdated
@@ -176,7 +176,7 @@ namespace clad { | |||
|
|||
void DiffRequest::updateCall(FunctionDecl* FD, FunctionDecl* OverloadedFD, | |||
Sema& SemaRef) { | |||
CallExpr* call = this->CallContext; | |||
CallExpr* call = const_cast<CallExpr*>(this->CallContext); |
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: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
CallExpr* call = const_cast<CallExpr*>(this->CallContext); | |
auto* call = const_cast<CallExpr*>(this->CallContext); |
89454b6
to
7bba2aa
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
@@ -77,6 +77,9 @@ ValueAndPushforward<int, int> cudaDeviceSynchronize_pushforward() | |||
} | |||
#endif | |||
|
|||
// NOLINTBEGIN(readability-identifier-naming) |
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: unmatched 'NOLINTBEGIN' comment without a subsequent 'NOLINTEND' comment [clang-tidy-nolint]
// NOLINTBEGIN(readability-identifier-naming)
^
// FIXME: Add the rest of the __builtin_ routines for log, sqrt, abs, etc. | ||
|
||
// NOLINTEND(readability-identifier-naming) |
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: unmatched 'NOLINTEND' comment without a previous 'NOLINTBEGIN' comment [clang-tidy-nolint]
// NOLINTEND(readability-identifier-naming)
^
7bba2aa
to
7621c9c
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.
clang-tidy made some suggestions
|
||
CUDA_HOST_DEVICE inline ValueAndPushforward<float, float> | ||
__builtin_sqrtf_pushforward(float x, float d_x) { | ||
return {builtin_sqrtf(x), (((T)1) / (((T)2) * builtin_sqrtf(x))) * d_x}; |
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: use of undeclared identifier 'T' [clang-diagnostic-error]
return {builtin_sqrtf(x), (((T)1) / (((T)2) * builtin_sqrtf(x))) * d_x};
^
|
||
CUDA_HOST_DEVICE inline ValueAndPushforward<float, float> | ||
__builtin_sqrtf_pushforward(float x, float d_x) { | ||
return {builtin_sqrtf(x), (((T)1) / (((T)2) * builtin_sqrtf(x))) * d_x}; |
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: use of undeclared identifier 'T' [clang-diagnostic-error]
return {builtin_sqrtf(x), (((T)1) / (((T)2) * builtin_sqrtf(x))) * d_x};
^
|
||
CUDA_HOST_DEVICE inline ValueAndPushforward<float, float> | ||
__builtin_sqrtf_pushforward(float x, float d_x) { | ||
return {builtin_sqrtf(x), (((T)1) / (((T)2) * builtin_sqrtf(x))) * d_x}; |
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: use of undeclared identifier 'builtin_sqrtf'; did you mean '__builtin_sqrtf'? [clang-diagnostic-error]
return {builtin_sqrtf(x), (((T)1) / (((T)2) * builtin_sqrtf(x))) * d_x}; | |
return {__builtin_sqrtf(x), (((T)1) / (((T)2) * builtin_sqrtf(x))) * d_x}; |
Additional context
/usr/include/c++/12/cmath:463: '__builtin_sqrtf' declared here
{ return __builtin_sqrtf(__x); }
^
|
||
CUDA_HOST_DEVICE inline ValueAndPushforward<float, float> | ||
__builtin_sqrtf_pushforward(float x, float d_x) { | ||
return {builtin_sqrtf(x), (((T)1) / (((T)2) * builtin_sqrtf(x))) * d_x}; |
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: use of undeclared identifier 'builtin_sqrtf'; did you mean '__builtin_sqrtf'? [clang-diagnostic-error]
return {builtin_sqrtf(x), (((T)1) / (((T)2) * builtin_sqrtf(x))) * d_x}; | |
return {builtin_sqrtf(x), (((T)1) / (((T)2) * __builtin_sqrtf(x))) * d_x}; |
Additional context
/usr/include/c++/12/cmath:463: '__builtin_sqrtf' declared here
{ return __builtin_sqrtf(__x); }
^
|
||
CUDA_HOST_DEVICE inline ValueAndPushforward<double, double> | ||
__builtin_sqrt_pushforward(double x, double d_x) { | ||
return {builtin_sqrt(x), (((T)1) / (((T)2) * builtin_sqrt(x))) * d_x}; |
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: use of undeclared identifier 'T' [clang-diagnostic-error]
return {builtin_sqrt(x), (((T)1) / (((T)2) * builtin_sqrt(x))) * d_x};
^
|
||
CUDA_HOST_DEVICE inline ValueAndPushforward<double, double> | ||
__builtin_sqrt_pushforward(double x, double d_x) { | ||
return {builtin_sqrt(x), (((T)1) / (((T)2) * builtin_sqrt(x))) * d_x}; |
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: use of undeclared identifier 'T' [clang-diagnostic-error]
return {builtin_sqrt(x), (((T)1) / (((T)2) * builtin_sqrt(x))) * d_x};
^
|
||
CUDA_HOST_DEVICE inline ValueAndPushforward<double, double> | ||
__builtin_sqrt_pushforward(double x, double d_x) { | ||
return {builtin_sqrt(x), (((T)1) / (((T)2) * builtin_sqrt(x))) * d_x}; |
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: use of undeclared identifier 'builtin_sqrt'; did you mean '__builtin_sqrt'? [clang-diagnostic-error]
return {builtin_sqrt(x), (((T)1) / (((T)2) * builtin_sqrt(x))) * d_x}; | |
return {__builtin_sqrt(x), (((T)1) / (((T)2) * builtin_sqrt(x))) * d_x}; |
Additional context
/usr/include/c++/12/cmath:475: '__builtin_sqrt' declared here
{ return __builtin_sqrt(__x); }
^
|
||
CUDA_HOST_DEVICE inline ValueAndPushforward<double, double> | ||
__builtin_sqrt_pushforward(double x, double d_x) { | ||
return {builtin_sqrt(x), (((T)1) / (((T)2) * builtin_sqrt(x))) * d_x}; |
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: use of undeclared identifier 'builtin_sqrt'; did you mean '__builtin_sqrt'? [clang-diagnostic-error]
return {builtin_sqrt(x), (((T)1) / (((T)2) * builtin_sqrt(x))) * d_x}; | |
return {builtin_sqrt(x), (((T)1) / (((T)2) * __builtin_sqrt(x))) * d_x}; |
Additional context
/usr/include/c++/12/cmath:475: '__builtin_sqrt' declared here
{ return __builtin_sqrt(__x); }
^
e6cd81c
to
315d4ab
Compare
clang-tidy review says "All clean, LGTM! 👍" |
315d4ab
to
03b35a1
Compare
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
3f80bc2
to
04a5d4c
Compare
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
137133b
to
b85c9ce
Compare
clang-tidy review says "All clean, LGTM! 👍" |
b85c9ce
to
e65827d
Compare
clang-tidy review says "All clean, LGTM! 👍" |
e65827d
to
fe4d8a0
Compare
clang-tidy review says "All clean, LGTM! 👍" |
@vgvassilev If we can work out how to get this PR passing then I'll look at adding llvm 19 compatibility. |
On my todo list... I have everything set up, don't have the time to look at it just yet. |
This is the same as #889 but I cannot login to the bots. Let's try if this will let me use tmate...