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

Refactor code duplications in dense_kernels tests #1423

Merged
merged 3 commits into from
Oct 17, 2023

Conversation

upsj
Copy link
Member

@upsj upsj commented Oct 13, 2023

Pulled out of #1415, this refactors the dense reference tests to get instantiated for all index types automatically.

@upsj upsj added the 1:ST:ready-for-review This PR is ready for review label Oct 13, 2023
@upsj upsj requested a review from a team October 13, 2023 10:07
@upsj upsj self-assigned this Oct 13, 2023
@ginkgo-bot ginkgo-bot added reg:testing This is related to testing. mod:reference This is related to the reference module. type:matrix-format This is related to the Matrix formats labels Oct 13, 2023
@upsj upsj added the 1:ST:no-changelog-entry Skip the wiki check for changelog update label Oct 13, 2023
@upsj upsj changed the title Refactor code duplications in dense_kernels Refactor code duplications in dense_kernels tests Oct 16, 2023
@upsj upsj force-pushed the dense_ref_test_refactor branch from f2a6807 to ed4c387 Compare October 16, 2023 08:47
@upsj upsj requested review from yhmtsai and a team October 16, 2023 08:48
@MarcelKoch MarcelKoch self-requested a review October 16, 2023 08:55
Copy link
Member

@MarcelKoch MarcelKoch left a comment

Choose a reason for hiding this comment

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

I think this is still too complex to review thoroughly. But I think it might be generally impossible to get this into an easy-to-review state due to the reordering. The only way I can think of is to split this into many more smaller PRs (probably 10 each with 200 LOC changes). But that is unreasonable in our workflow.

So I would be fine merging this, as long as the tests pass.
LGTM, reviewing the commits individually in VSCode makes it bearable.

reference/test/matrix/dense_kernels.cpp Show resolved Hide resolved
reference/test/matrix/dense_kernels.cpp Outdated Show resolved Hide resolved
reference/test/matrix/dense_kernels.cpp Outdated Show resolved Hide resolved
@tcojean tcojean added this to the Release 1.7.0 milestone Oct 16, 2023
Copy link
Member

@pratikvn pratikvn left a comment

Choose a reason for hiding this comment

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

LGTM. Only concern is that the tests that used stride=num_cols were updated to use non-standard stride instead, for example for ELL and Hybrid. But in general, it is probably okay as that is the more general case.

Copy link
Member

@yhmtsai yhmtsai left a comment

Choose a reason for hiding this comment

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

The tests with DenseWithIndexType are in the middle of the test with Dense.
one more commit to reorder them again?

class Dense{};

TYPED_TEST(Dense, ...)

class DenseWithIndexType{};

TYPED_TEST(DenseWithIndexType)

class DenseComplex{};

TYPED_TEST(DenseComplex)

Also make the fixture close to the testing
Ignore this comment. I review the code in the reversed order

upsj and others added 3 commits October 17, 2023 09:25
- Remove unused declarations
- Consistent variable naming

Co-authored-by: Marcel Koch <[email protected]>
@upsj upsj force-pushed the dense_ref_test_refactor branch from ed4c387 to 4cc9692 Compare October 17, 2023 07:52
@upsj upsj added 1:ST:ready-to-merge This PR is ready to merge. and removed 1:ST:ready-for-review This PR is ready for review labels Oct 17, 2023
@upsj upsj merged commit 67dbf57 into develop Oct 17, 2023
13 checks passed
@upsj upsj deleted the dense_ref_test_refactor branch October 17, 2023 11:18
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

warning The version of Java (11.0.3) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:no-changelog-entry Skip the wiki check for changelog update 1:ST:ready-to-merge This PR is ready to merge. mod:reference This is related to the reference module. reg:testing This is related to testing. type:matrix-format This is related to the Matrix formats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants