Skip to content
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

Optimize FC layer using TBB, update layer API to choose perf/reference implementation #143

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

NeiroYT
Copy link
Collaborator

@NeiroYT NeiroYT commented May 26, 2024

Closes #125
Work in progress
By the way, on Windows TBB build itself in another directory, so run_test.exe can't find dlls
image

github-actions[bot]

This comment was marked as resolved.

Copy link

codecov bot commented May 26, 2024

Codecov Report

Attention: Patch coverage is 79.77528% with 36 lines in your changes missing coverage. Please review.

Project coverage is 85.51%. Comparing base (ba0b9e5) to head (ac9260f).

Files Patch % Lines
include/layers/PoolingLayer.hpp 54.92% 3 Missing and 29 partials ⚠️
include/layers/FCLayer.hpp 92.45% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #143      +/-   ##
==========================================
- Coverage   87.71%   85.51%   -2.21%     
==========================================
  Files          18       18              
  Lines         700      842     +142     
  Branches      372      448      +76     
==========================================
+ Hits          614      720     +106     
- Misses         48       52       +4     
- Partials       38       70      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@github-actions github-actions bot left a 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

include/layers/FCLayer.hpp Outdated Show resolved Hide resolved
include/layers/FCLayer.hpp Outdated Show resolved Hide resolved
include/layers/FCLayer.hpp Outdated Show resolved Hide resolved
include/layers/FCLayer.hpp Show resolved Hide resolved
include/layers/FCLayer.hpp Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a 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

include/layers/FCLayer.hpp Outdated Show resolved Hide resolved
include/layers/FCLayer.hpp Outdated Show resolved Hide resolved
@@ -18,9 +19,11 @@ enum LayerType {
kElementWise,
kConvolution,
kFullyConnected,
kOutput,
kOutput
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kOutput
kOutput,

Comment on lines 57 to 61
std::cerr << "Normal:" << count1 << std::endl;
double count2 =
elapsed_time<double, std::milli>(test_func, p2, input, output);
std::cerr << "Tbb:" << count2 << std::endl;
// EXPECT_GE(count1, count2);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clean up debug output and return back text check

std::cerr << tmp1[i] << ' ' << tmp2[i] << ' ' << i << std::endl;
}
}
// EXPECT_GE(count1, count2);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, please, enable the check and clean up debug output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize FC layer using TBB, update layer API to choose perf/reference implementation
2 participants