-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[ROCM] update fluid operators for rocm (part3), test=develop #31213
Conversation
Thanks for your contribution! |
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 for op benchmark
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 For const_cast
@@ -41,7 +41,7 @@ HOSTDEVICE inline int64_t BinarySearch(const T *x, int64_t num, const T &val) { | |||
|
|||
template <typename T> | |||
HOSTDEVICE inline size_t LowerBound(const T *x, size_t num, const T &val) { | |||
#ifdef __CUDA_ARCH__ | |||
#if defined(__CUDA_ARCH__) || defined(__HIPCC__) |
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.
全局宏 if, elif, else 比较多,中间间隔的代码也比较长,阅读起来比较碎片化
建议加一些注释来让代码片段区间更清晰些,比如
#if defined(__CUDA_ARCH__) || defined(__HIPCC__) // @ {
...
// @ }
#else // @ {
// @ }
这样跨了多行的宏读起来能对应起来
参考 https://www.doxygen.nl/manual/grouping.html#memgroup ,不确定有没有更好的方式
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.
Done, 给跨度比较大的被宏包围的代码添加了注释
af63fa5
to
720bcdc
Compare
720bcdc
to
670de55
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.
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 for op benchmark
… rocm_operators_part3
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
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 for op benchamrk ci
PR types
New features
PR changes
OPs
Describe
[ROCM] update fluid operators for rocm (part3)