-
Notifications
You must be signed in to change notification settings - Fork 39
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
[Layer] Add Self-Attention, RMSNorm benchmark #140
base: main
Are you sure you want to change the base?
Conversation
|
||
bool areArraysEqual(float array1[], float array2[], int size) { | ||
for (int i = 0; i < size; ++i) { | ||
if (array1[i] != array2[i]) { |
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.
The result of this benchmark is "Pass," indicating that the calculation result is correct. However, directly using the equality operator (==
) to compare floating-point numbers may not be the best practice. This is because floating-point calculations can introduce tiny precision errors.
To more reliably compare floating-point numbers, it's advised to use a small error margin, for instance: MobileNetV3 example
|
||
bool areArraysEqual(float array1[], float array2[], int size) { | ||
for (int i = 0; i < size; ++i) { | ||
if (array1[i] != array2[i]) { |
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.
This place is the same as above.
46e69c1
to
c15514a
Compare
@ShiHaoGao The corresponding issue has been fixed. |
@@ -0,0 +1,149 @@ | |||
//===- GoogleBenchmarkMain.cpp---------------------------------------------===// |
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.
Recommand to centralize this title and keep the number of characters per line to 80.
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.
fixed
@@ -0,0 +1,147 @@ | |||
//===- GoogleBenchmarkMain.cpp---------------------------------------------===// |
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.
Recommand to centralize this title and keep the number of characters per line to 80.
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.
fixed
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.
In this version of the code standard, the title remains not centered, otherwise it will be too troublesome to check each file and centralize the tiles. Please help me change it back. Thanks~
benchmarks/DeepLearning/Layers/SelfAttention/buddy_selfattention_import.py
Show resolved
Hide resolved
All errors have been fixed. Ready to merge. |
Thanks! Just resolve the conflicts and make changes according to the code standards. |
Add