-
Notifications
You must be signed in to change notification settings - Fork 152
Introducing a new and versatile way to create the tensor interface. #90
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
Conversation
@amitsingh19975 Would you please sync with current development branch and resolve the conflicts. |
Sorry about that I cloned the branch before the new pull request. Now I have synced it. Thanks. |
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.
Reports by clang tidy
This Pull request Passed all of clang-tidy tests. 👍 |
Codecov Report
@@ Coverage Diff @@
## develop #90 +/- ##
===========================================
- Coverage 95.33% 94.54% -0.80%
===========================================
Files 22 19 -3
Lines 1223 1192 -31
===========================================
- Hits 1166 1127 -39
- Misses 57 65 +8
Continue to review full report at Codecov.
|
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.
Reports by clang tidy
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.
Reports by clang tidy
32e1e24
to
8afd714
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.
I still cannot approve due to rebind_storage_t
usage.
layout::first_order<c_extents_type>, | ||
layout::last_order<c_extents_type> | ||
>, | ||
rebind_storage_t<c_extents_type,array_type,value_type> |
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.
Let me phrase it differently. With rebind_storage_t
the resulting storage type depends on the input storage type. In this case, the user of the library needs to look into type_traits_tensor.hpp
for understanding the output type. Moreover, if the user wants to only have statically allocated containers, this rule forces him/her to not use the prod
function or to change the implementation of rebind_storage_t
.
Therefore, we should not to have that feature (at least for now) and at most use tag dispatching. Again the prod
function with that signature should only be implemented for containers with dynamic extents and strides.
…ts_functions.hpp with function implementation
ba351d5
to
da91a80
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.
Reports by clang tidy
83521c0
to
75bae8f
Compare
75bae8f
to
9ffd554
Compare
11d159a
to
80e161a
Compare
09fae55
to
e2680d3
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.
Great enhancements!
Only two comments which you can find in the corresponding files.
Please change the valid
function to is_valid
to be consistent with the naming.
Changed |
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 think I have three remaining comments. Please look at them and see if there is something you would like to change. Otherwise I approve this.
b91a78d
to
580bae1
Compare
Previously the tensor was constraints to three type of tensors
which were predefined and were written in stone or has a rigid interface and the user cannot change the storage type or permute the settings.
With the new tensor interface, we can easily new tensor type even custom storage by the user with proper configuration and easily interact with the current tensor environment without any hassle. This makes the new tensor interface very flexible.
There are few downsides right now
How to Use the New Interface
Other than these there are a few minor tweaks to improve the consistency of the code and bug fixes.