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

Add Sor kernels #1634

Merged
merged 7 commits into from
Oct 31, 2024
Merged

Add Sor kernels #1634

merged 7 commits into from
Oct 31, 2024

Conversation

MarcelKoch
Copy link
Member

This PR adds the device kernels for #1633.

@MarcelKoch MarcelKoch self-assigned this Jun 27, 2024
@ginkgo-bot ginkgo-bot added reg:build This is related to the build system. mod:cuda This is related to the CUDA module. mod:openmp This is related to the OpenMP module. reg:benchmarking This is related to benchmarking. type:preconditioner This is related to the preconditioners mod:hip This is related to the HIP module. type:factorization This is related to the Factorizations mod:dpcpp This is related to the DPC++ module. labels Jun 27, 2024
@MarcelKoch MarcelKoch force-pushed the sor-kernels branch 2 times, most recently from 0d29fae to 1f1ef07 Compare June 28, 2024 15:09
@MarcelKoch MarcelKoch force-pushed the sor-kernels branch 2 times, most recently from a94cab2 to 7c59123 Compare July 10, 2024 08:00
@MarcelKoch MarcelKoch force-pushed the sor-kernels branch 3 times, most recently from a30fee7 to 79ed6d7 Compare July 11, 2024 07:26
@MarcelKoch MarcelKoch added the 1:ST:ready-for-review This PR is ready for review label Aug 15, 2024
namespace factorization {
namespace helpers {

using namespace ::gko::factorization;
Copy link
Member

Choose a reason for hiding this comment

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

it does not help anything below, so I would rather remove it.

Copy link
Member Author

Choose a reason for hiding this comment

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

To make this more reasonable, I also removed the factorization namespace in the core file. Otherwise I would have had to use ::gko::factorization:: everywhere instead of just helpers::.

Copy link
Member

Choose a reason for hiding this comment

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

sorry, I thought they are in the same namespace, but one is under kernel namespace and the other is under gko directly.
then the original one is better as it does not give any ambiguous function.
although it can only declare the two class you need, it's a bit annoying with the template.

namespace helpers {


using namespace ::gko::factorization;
Copy link
Member

Choose a reason for hiding this comment

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

same here and for the others.

@@ -0,0 +1,67 @@
// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors
Copy link
Member

Choose a reason for hiding this comment

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

I think the file can go into unified one but you need to do dispatch on the header of factorization_helpers.hpp

Copy link
Member

Choose a reason for hiding this comment

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

you may need to use GKO_KERNEL for the lambda function.
Maybe also for the actual kernel?

Copy link
Member Author

Choose a reason for hiding this comment

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

I feel like this complicates our unified setup again, and it's not using the unified kernels as intended.
We use the unified kernels, when the kernel implementation are identical, which is not the case here. I think it's close, but it would require some adjustments of the factorization kernels. If that's feasible, I would prefer to do it in another PR.

} // namespace factorization
} // namespace GKO_DEVICE_NAMESPACE
} // namespace kernels
} // namespace gko
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
} // namespace gko
} // namespace gko

nit

namespace factorization {
namespace helpers {

using namespace ::gko::factorization;
Copy link
Member

Choose a reason for hiding this comment

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

sorry, I thought they are in the same namespace, but one is under kernel namespace and the other is under gko directly.
then the original one is better as it does not give any ambiguous function.
although it can only declare the two class you need, it's a bit annoying with the template.

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.

LGTM. I need to take my previous comment about the using namespace back because I thought they are in the same namespace, which is wrong.

@MarcelKoch MarcelKoch added this to the Ginkgo 1.9.0 milestone Aug 26, 2024
Copy link
Collaborator

@fritzgoebel fritzgoebel left a comment

Choose a reason for hiding this comment

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

LGTM!

@MarcelKoch MarcelKoch 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 30, 2024
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 97.87234% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.09%. Comparing base (53c9fac) to head (c2aad74).
Report is 8 commits behind head on develop.

Files with missing lines Patch % Lines
omp/factorization/factorization_kernels.cpp 71.42% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1634      +/-   ##
===========================================
- Coverage    90.55%   90.09%   -0.47%     
===========================================
  Files          776      779       +3     
  Lines        63205    63336     +131     
===========================================
- Hits         57237    57061     -176     
- Misses        5968     6275     +307     

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

Copy link

sonarcloud bot commented Oct 30, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
28.6% Duplication on New Code (required ≤ 20%)

See analysis details on SonarCloud

@MarcelKoch MarcelKoch merged commit ba15dcd into develop Oct 31, 2024
10 of 14 checks passed
@MarcelKoch MarcelKoch deleted the sor-kernels branch October 31, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:ready-to-merge This PR is ready to merge. mod:cuda This is related to the CUDA module. mod:dpcpp This is related to the DPC++ module. mod:hip This is related to the HIP module. mod:openmp This is related to the OpenMP module. reg:benchmarking This is related to benchmarking. reg:build This is related to the build system. type:factorization This is related to the Factorizations type:preconditioner This is related to the preconditioners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants