-
Notifications
You must be signed in to change notification settings - Fork 65
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] Convert static MMHelper class to instance Class in DecoderContext. #225
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.
Guess the performance and accuracy not impacted, but let's confirm it before merge.
float sumVal[batchSize * numBeams] = {0}; | ||
float sumVal[batchSize * numBeams]; | ||
for (int i = 0; i < batchSize * numBeams; ++i) { | ||
sumVal[i] = 0.0f; |
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.
Original float "sumVal[batchSize * numBeams] = {0};" should work.
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, original code could work, but this is c++20 standard. If we want to build w/ ICX, it should be c++17 standard.
float maxVal[batchSize * numBeams] = {std::numeric_limits<float>::lowest()}; | ||
float maxVal[batchSize * numBeams]; | ||
for (int i = 0; i < batchSize * numBeams; ++i) { | ||
maxVal[i] = std::numeric_limits<float>::lowest(); |
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 guess the author intended to set all values to lowest float. good 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.
Yes, original code could work, but this is c++20 standard. If we want to build w/ ICX, it should be c++17 standard.
No description provided.