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

MST Preprocessing for symbolic Cholesky #1765

Merged
merged 26 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e62b52f
add ani4 to symbolic cholesky test set
upsj Dec 18, 2024
016d0ea
fix sparsity pattern output
upsj Dec 18, 2024
91f5b97
fix incorrect include
upsj Dec 18, 2024
50924ca
add Cholesky skeleton tree computation kernel
upsj Dec 18, 2024
0bf134d
add more precise atomic operations
upsj Dec 5, 2024
9caaa2d
fix matrix symmetry
upsj Dec 19, 2024
f2d970c
fix reference MST algorithm
upsj Dec 19, 2024
0af05e2
add GPU MST algorithm for Cholesky preprocessing
upsj Dec 19, 2024
7158492
add AMD support
upsj Dec 19, 2024
7d96d1d
add benchmark for MST-enhanced symbolic Cholesky
upsj Dec 19, 2024
ef4b6f1
extract elimination forest kernels into separate file
upsj Dec 20, 2024
213ced6
update copyright years
upsj Jan 11, 2025
7bb00ab
rename compute_elim_forest to compute_elimination_forest
upsj Dec 31, 2024
6bff427
consider only lower triangular entries for skeleton tree input
upsj Jan 15, 2025
5aa16c8
fix memory script
upsj Jan 15, 2025
941ceb7
remove unnecessary tabs/newlines from generation script
upsj Jan 15, 2025
418714b
rebuild memory.nvidia.hpp.inc
upsj Jan 15, 2025
bfd2598
review updates
upsj Jan 15, 2025
8656cdf
remove unnecessary host_exec
upsj Jan 15, 2025
aca0fdc
clarify sortedness in MST algorithm
upsj Jan 15, 2025
dbbdd5e
remove unnecessary type alias
upsj Jan 15, 2025
5c7c565
remove dependency on core for disjoint_sets
upsj Jan 15, 2025
fb344a4
add literature reference
upsj Jan 15, 2025
706d584
fix dpcpp compilation
upsj Jan 15, 2025
0debdc6
use atomic wrappers
upsj Jan 16, 2025
7ff5f59
improve atomic usage to avoid casts
upsj Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 25 additions & 6 deletions benchmark/sparse_blas/operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,9 @@ class SymbolicLuNearSymmOperation : public BenchmarkOperation {

class SymbolicCholeskyOperation : public BenchmarkOperation {
public:
explicit SymbolicCholeskyOperation(const Mtx* mtx, bool symmetric)
: mtx_{mtx}, symmetric_{symmetric}, result_{}
explicit SymbolicCholeskyOperation(const Mtx* mtx, bool device,
bool symmetric)
: mtx_{mtx}, device_{device}, symmetric_{symmetric}, result_{}
{}

std::pair<bool, double> validate() const override
Expand Down Expand Up @@ -643,8 +644,13 @@ class SymbolicCholeskyOperation : public BenchmarkOperation {

void run() override
{
gko::factorization::symbolic_cholesky(mtx_, symmetric_, result_,
forest_);
if (device_) {
gko::factorization::symbolic_cholesky_device(mtx_, symmetric_,
result_, forest_);
} else {
gko::factorization::symbolic_cholesky(mtx_, symmetric_, result_,
forest_);
}
}

void write_stats(json& object) override
Expand All @@ -654,6 +660,7 @@ class SymbolicCholeskyOperation : public BenchmarkOperation {

private:
const Mtx* mtx_;
bool device_;
bool symmetric_;
std::unique_ptr<Mtx> result_;
std::unique_ptr<gko::factorization::elimination_forest<itype>> forest_;
Expand Down Expand Up @@ -791,13 +798,25 @@ const std::map<std::string,
[](const Mtx* mtx) {
return std::make_unique<SymbolicLuNearSymmOperation>(mtx);
}},
{"symbolic_cholesky_device",
[](const Mtx* mtx) {
return std::make_unique<SymbolicCholeskyOperation>(mtx, true,
false);
}},
{"symbolic_cholesky_device_symmetric",
[](const Mtx* mtx) {
return std::make_unique<SymbolicCholeskyOperation>(mtx, true,
true);
}},
{"symbolic_cholesky",
[](const Mtx* mtx) {
return std::make_unique<SymbolicCholeskyOperation>(mtx, false);
return std::make_unique<SymbolicCholeskyOperation>(mtx, false,
false);
}},
{"symbolic_cholesky_symmetric",
[](const Mtx* mtx) {
return std::make_unique<SymbolicCholeskyOperation>(mtx, true);
return std::make_unique<SymbolicCholeskyOperation>(mtx, false,
true);
}},
{"reorder_rcm",
[](const Mtx* mtx) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/test/reference/sparse_blas.reordered.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"bandwidth": 1.0,
"repetitions": 10,
"components": {
"compute_elim_forest": 1.0,
"compute_elimination_forest": 1.0,
"allocate": 1.0,
"free": 1.0,
"components::fill_array": 1.0,
Expand Down
1 change: 1 addition & 0 deletions common/cuda_hip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set(CUDA_HIP_SOURCES
distributed/vector_kernels.cpp
factorization/cholesky_kernels.cpp
factorization/factorization_kernels.cpp
factorization/elimination_forest_kernels.cpp
factorization/ic_kernels.cpp
factorization/ilu_kernels.cpp
factorization/lu_kernels.cpp
Expand Down
Loading
Loading