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

Distributed Index Map #1543

Merged
merged 7 commits into from
May 13, 2024
Merged

Distributed Index Map #1543

merged 7 commits into from
May 13, 2024

Conversation

MarcelKoch
Copy link
Member

@MarcelKoch MarcelKoch commented Feb 14, 2024

This PR adds an index_map to be used in our distributed components. This PR only adds the core and reference kernels. device kernels are added in #1579

I will add another PR that shows how this will be used.

PR Stack:

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.

A couple of minor things, but mostly looks okay to me.

core/distributed/index_map.cpp Outdated Show resolved Hide resolved
core/distributed/index_map_kernels.hpp Outdated Show resolved Hide resolved
core/distributed/index_map_kernels.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/distributed/index_map.hpp Show resolved Hide resolved
include/ginkgo/core/distributed/index_map.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/distributed/index_map.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/distributed/index_map.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/distributed/index_map.hpp Outdated Show resolved Hide resolved
reference/distributed/index_map_kernels.cpp Outdated Show resolved Hide resolved
reference/test/distributed/index_map_kernels.cpp Outdated Show resolved Hide resolved
@MarcelKoch MarcelKoch marked this pull request as ready for review April 2, 2024 07:37
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!

reference/distributed/index_map_kernels.cpp Show resolved Hide resolved
Copy link
Member

@upsj upsj left a comment

Choose a reason for hiding this comment

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

First look at the interface

include/ginkgo/core/distributed/index_map.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/distributed/index_map.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/distributed/index_map.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/distributed/index_map.hpp Outdated Show resolved Hide resolved
@MarcelKoch MarcelKoch force-pushed the array-collection branch 2 times, most recently from e20d10c to cf07464 Compare May 6, 2024 16:38
@MarcelKoch MarcelKoch force-pushed the index-map branch 2 times, most recently from 8cb01b4 to f7fa971 Compare May 7, 2024 12:13
@MarcelKoch MarcelKoch requested a review from upsj May 7, 2024 12:49
Copy link

sonarcloud bot commented May 8, 2024

Base automatically changed from array-collection to develop May 9, 2024 07:38
@MarcelKoch MarcelKoch force-pushed the index-map branch 2 times, most recently from 4e0efb4 to 92a2e8d Compare May 9, 2024 08:56
@MarcelKoch MarcelKoch dismissed pratikvn’s stale review May 9, 2024 08:57

added device view of segmented arrays

@MarcelKoch MarcelKoch requested a review from pratikvn May 9, 2024 08:57
Copy link
Member

@upsj upsj 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 minor point is gko::vector usage to track memory allocations

{
if (this != &other) {
partition_ = std::move(other.partition_);
rank_ = other.rank_;
Copy link
Member

Choose a reason for hiding this comment

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

nit: should the moved-from state preserve the original rank?

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 think that is sensible. We don't really have an invalid rank value that I could put here.

core/distributed/index_map_kernels.hpp Outdated Show resolved Hide resolved
core/test/distributed/index_map.cpp Show resolved Hide resolved
include/ginkgo/core/distributed/index_map.hpp Outdated Show resolved Hide resolved
reference/distributed/index_map_kernels.cpp Show resolved Hide resolved
reference/distributed/index_map_kernels.cpp Outdated Show resolved Hide resolved
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!

core/distributed/index_map.cpp Show resolved Hide resolved
@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 May 13, 2024
MarcelKoch and others added 7 commits May 13, 2024 09:43
- documentation
- renaming
- use gko::vector
- test move-out state

Co-authored-by: Pratik Nayak <pratik.nayak@kit.edu>
Co-authored-by: Tobias Ribizel <mail@ribizel.de>
Co-authored-by: Gregor Olenik <gregor.olenik@kit.edu>
@MarcelKoch MarcelKoch merged commit 5e584b5 into develop May 13, 2024
10 of 15 checks passed
@MarcelKoch MarcelKoch deleted the index-map branch May 13, 2024 20:48
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. 1:ST:run-full-test mod:all This touches all Ginkgo modules. reg:build This is related to the build system. reg:testing This is related to testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants