From 9cc67d9def3a426aa567a8032c74868254ea788c Mon Sep 17 00:00:00 2001 From: Dongxu Yang Date: Fri, 14 Apr 2023 09:33:41 +0800 Subject: [PATCH 1/9] quick fix for CUDA 12 --- wholegraph/whole_memory_embedding.cu | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wholegraph/whole_memory_embedding.cu b/wholegraph/whole_memory_embedding.cu index 95632a6e4..5a25fd6a1 100644 --- a/wholegraph/whole_memory_embedding.cu +++ b/wholegraph/whole_memory_embedding.cu @@ -17,6 +17,9 @@ #include #include +#include +#include +#include #include #include @@ -1561,4 +1564,4 @@ void WholeMemoryEmbeddingLocalApplyGradients(WMType grad_t, stream); } -}// namespace whole_graph \ No newline at end of file +}// namespace whole_graph From d30bd8f5ba170080ede86eb67edaca815333fce5 Mon Sep 17 00:00:00 2001 From: Dongxu Yang Date: Wed, 10 May 2023 11:15:28 +0800 Subject: [PATCH 2/9] wholegraph code refactor first PR and RAPIDS CI --- .clang-format | 155 + .clang-tidy | 412 +++ .flake8 | 25 + .github/ops-bot.yaml | 9 + .github/workflows/build.yaml | 67 + .github/workflows/pr.yaml | 72 + .github/workflows/test.yaml | 34 + .gitignore | 90 +- .gitlab-ci.yml | 103 + .pre-commit-config.yaml | 42 + CMakeLists.txt | 151 - Dockerfile | 30 - README.md | 43 +- build_component.sh | 199 ++ ci/build_cpp.sh | 16 + ci/build_docs.sh | 49 + ci/build_python.sh | 30 + ci/check_style.sh | 18 + ci/test_clang_tidy.sh | 39 + ci/test_cpp.sh | 58 + ci/test_python.sh | 56 + cmake/CodeChecker.cmake | 56 + cmake/doxygen.cmake | 55 + cmake/thirdparty/get_gtest.cmake | 24 + cmake/thirdparty/get_nccl.cmake | 15 +- cmake/thirdparty/get_raft.cmake | 66 + cmake/thirdparty/nanobind.cmake | 58 + conda/recipes/libwholegraph/build.sh | 4 + .../libwholegraph/conda_build_config.yaml | 14 + .../libwholegraph/install_libwholegraph.sh | 4 + .../install_libwholegraph_tests.sh | 4 + conda/recipes/libwholegraph/meta.yaml | 96 + conda/recipes/pylibwholegraph/build.sh | 6 + .../pylibwholegraph/conda_build_config.yaml | 17 + conda/recipes/pylibwholegraph/meta.yaml | 66 + cpp/CMakeLists.txt | 284 ++ cpp/Doxyfile | 2526 +++++++++++++++++ cpp/Doxyfile.in | 2526 +++++++++++++++++ cpp/include/wholememory/device_reference.cuh | 48 + cpp/include/wholememory/embedding.h | 211 ++ cpp/include/wholememory/env_func_ptrs.h | 79 + cpp/include/wholememory/global_reference.h | 43 + cpp/include/wholememory/graph_op.h | 207 ++ cpp/include/wholememory/tensor_description.h | 242 ++ cpp/include/wholememory/wholegraph_op.h | 88 + cpp/include/wholememory/wholememory.h | 158 ++ cpp/include/wholememory/wholememory_op.h | 79 + cpp/include/wholememory/wholememory_tensor.h | 162 ++ cpp/src/cuda_macros.cpp | 69 + cpp/src/cuda_macros.hpp | 164 ++ cpp/src/error.hpp | 147 + cpp/src/graph_ops/append_unique.cpp | 89 + cpp/src/graph_ops/append_unique_func.cuh | 353 +++ cpp/src/graph_ops/append_unique_impl.cu | 59 + cpp/src/graph_ops/append_unique_impl.h | 30 + cpp/src/graph_ops/csr_add_self_loop.cpp | 102 + cpp/src/graph_ops/csr_add_self_loop_func.cuh | 60 + cpp/src/graph_ops/csr_add_self_loop_impl.cu | 55 + cpp/src/graph_ops/csr_add_self_loop_impl.h | 33 + cpp/src/graph_ops/edge_weight_softmax.cpp | 205 ++ .../graph_ops/edge_weight_softmax_func.cuh | 149 + cpp/src/graph_ops/edge_weight_softmax_impl.cu | 89 + cpp/src/graph_ops/edge_weight_softmax_impl.h | 41 + cpp/src/graph_ops/gspmm_csr_weighted.cpp | 287 ++ cpp/src/graph_ops/gspmm_csr_weighted_func.cuh | 285 ++ cpp/src/graph_ops/gspmm_csr_weighted_impl.cu | 111 + cpp/src/graph_ops/gspmm_csr_weighted_impl.h | 52 + cpp/src/graph_ops/spadd_gat_csr.cpp | 272 ++ cpp/src/graph_ops/spadd_gat_csr_func.cuh | 142 + cpp/src/graph_ops/spadd_gat_csr_impl.cu | 103 + cpp/src/graph_ops/spadd_gat_csr_impl.h | 48 + cpp/src/graph_ops/spmm_csr_no_weight.cpp | 161 ++ cpp/src/graph_ops/spmm_csr_no_weight_func.cuh | 238 ++ cpp/src/graph_ops/spmm_csr_no_weight_impl.cu | 103 + cpp/src/graph_ops/spmm_csr_no_weight_impl.h | 45 + cpp/src/logger.cpp | 34 + cpp/src/logger.hpp | 95 + cpp/src/parallel_utils.cpp | 125 + .../src/parallel_utils.hpp | 73 +- .../src/wholegraph_ops}/block_radix_topk.cuh | 213 +- cpp/src/wholegraph_ops/sample_comm.cuh | 60 + .../unweighted_sample_without_replacement.cpp | 133 + ...ighted_sample_without_replacement_func.cuh | 472 +++ ...weighted_sample_without_replacement_impl.h | 40 + ..._sample_without_replacement_impl_mapped.cu | 79 + .../weighted_sample_without_replacement.cpp | 156 + ...ighted_sample_without_replacement_func.cuh | 606 ++++ ...weighted_sample_without_replacement_impl.h | 44 + ..._sample_without_replacement_impl_mapped.cu | 85 + cpp/src/wholememory/communicator.cpp | 710 +++++ cpp/src/wholememory/communicator.hpp | 276 ++ cpp/src/wholememory/embedding.cpp | 981 +++++++ cpp/src/wholememory/embedding.hpp | 105 + cpp/src/wholememory/embedding_cache.cpp | 409 +++ cpp/src/wholememory/embedding_cache.hpp | 145 + cpp/src/wholememory/embedding_optimizer.cpp | 538 ++++ cpp/src/wholememory/embedding_optimizer.hpp | 147 + cpp/src/wholememory/env_func_ptrs.cpp | 138 + cpp/src/wholememory/env_func_ptrs.hpp | 53 + cpp/src/wholememory/file_io.cpp | 389 +++ cpp/src/wholememory/file_io.h | 35 + .../src/wholememory/global_reference.cpp | 29 +- cpp/src/wholememory/initialize.cpp | 91 + .../src/wholememory/initialize.hpp | 29 +- cpp/src/wholememory/integer_utils.hpp | 73 + cpp/src/wholememory/memory_handle.cpp | 1402 +++++++++ cpp/src/wholememory/memory_handle.hpp | 90 + cpp/src/wholememory/nccl_comms.cpp | 515 ++++ cpp/src/wholememory/nccl_comms.hpp | 212 ++ cpp/src/wholememory/tensor_description.cpp | 237 ++ cpp/src/wholememory/wholememory.cpp | 212 ++ cpp/src/wholememory/wholememory_tensor.cpp | 393 +++ .../functions/bucket_ids_func.cu | 116 + .../functions/bucket_ids_func.h | 31 + .../functions/embedding_cache_func.cu | 735 +++++ .../functions/embedding_cache_func.cuh | 403 +++ .../functions/embedding_cache_func.h | 83 + .../functions/embedding_optimizer_func.cu | 989 +++++++ .../functions/embedding_optimizer_func.h | 88 + .../exchange_embeddings_nccl_func.cu | 208 ++ .../functions/exchange_embeddings_nccl_func.h | 66 + .../functions/exchange_ids_nccl_func.cu | 226 ++ .../functions/exchange_ids_nccl_func.h | 57 + .../functions/gather_cached_func.cu | 480 ++++ .../functions/gather_cached_func.h | 54 + .../wholememory_ops/functions/gather_func.cu | 102 + ...r_func_impl_floating_data_int32_indices.cu | 79 + ...r_func_impl_floating_data_int64_indices.cu | 79 + ...er_func_impl_integer_data_int32_indices.cu | 79 + ...er_func_impl_integer_data_int64_indices.cu | 79 + .../functions/gather_scatter_func.cuh | 464 +++ .../functions/gather_scatter_func.h | 40 + .../wholememory_ops/functions/scatter_func.cu | 107 + ...r_func_impl_floating_data_int32_indices.cu | 80 + ...r_func_impl_floating_data_int64_indices.cu | 82 + ...er_func_impl_integer_data_int32_indices.cu | 79 + ...er_func_impl_integer_data_int64_indices.cu | 79 + cpp/src/wholememory_ops/gather_op.cpp | 107 + cpp/src/wholememory_ops/gather_op_impl.h | 42 + .../wholememory_ops/gather_op_impl_mapped.cu | 42 + .../wholememory_ops/gather_op_impl_nccl.cu | 168 ++ .../wholememory_ops/output_memory_handle.hpp | 96 + cpp/src/wholememory_ops/raft_random.cuh | 143 + cpp/src/wholememory_ops/register.hpp | 361 +++ cpp/src/wholememory_ops/scatter_op.cpp | 107 + cpp/src/wholememory_ops/scatter_op_impl.h | 42 + .../wholememory_ops/scatter_op_impl_mapped.cu | 39 + .../wholememory_ops/scatter_op_impl_nccl.cu | 167 ++ .../wholememory_ops/temp_memory_handle.hpp | 89 + cpp/src/wholememory_ops/thrust_allocator.cpp | 62 + cpp/src/wholememory_ops/thrust_allocator.hpp | 39 + .../wholememory_ops/wholememory_test_op.cu | 160 ++ cpp/tests/CMakeLists.txt | 151 + .../graph_ops/append_unique_test_utils.cu | 160 ++ .../graph_ops/append_unique_test_utils.hpp | 35 + cpp/tests/graph_ops/append_unique_tests.cu | 221 ++ .../graph_ops/csr_add_self_loop_tests.cu | 208 ++ .../graph_ops/csr_add_self_loop_utils.cu | 71 + .../graph_ops/csr_add_self_loop_utils.hpp | 31 + .../edge_weight_softmax_backward_tests.cu | 223 ++ .../edge_weight_softmax_forward_tests.cu | 195 ++ .../edge_weight_softmax_test_utils.cu | 154 + .../edge_weight_softmax_test_utils.hpp | 37 + .../gspmm_csr_weighted_backward_tests.cu | 413 +++ .../gspmm_csr_weighted_forward_tests.cu | 272 ++ .../gspmm_csr_weighted_test_utils.cu | 219 ++ .../gspmm_csr_weighted_test_utils.hpp | 49 + .../graph_ops/spadd_gat_csr_backward_tests.cu | 260 ++ .../graph_ops/spadd_gat_csr_forward_tests.cu | 255 ++ cpp/tests/graph_ops/spadd_gat_csr_utils.cu | 159 ++ cpp/tests/graph_ops/spadd_gat_csr_utils.hpp | 42 + .../spmm_csr_no_weight_backward_tests.cu | 248 ++ .../spmm_csr_no_weight_forward_tests.cu | 243 ++ .../graph_ops/spmm_csr_no_weight_utils.cu | 389 +++ .../graph_ops/spmm_csr_no_weight_utils.hpp | 63 + cpp/tests/parallel_utils_tests.cpp | 102 + .../graph_sampling_test_utils.cu | 829 ++++++ .../graph_sampling_test_utils.hpp | 93 + ...ighted_sample_without_replacement_tests.cu | 405 +++ ...ighted_sample_without_replacement_tests.cu | 445 +++ .../wholememory/wholememory_comm_tests.cpp | 90 + .../wholememory/wholememory_handle_tests.cpp | 188 ++ .../wholememory/wholememory_tensor_tests.cpp | 122 + .../wholememory/wholememory_test_utils.hpp | 62 + cpp/tests/wholememory_ops/cacheset_tests.cu | 871 ++++++ .../wholememory_ops/embedding_test_utils.cu | 532 ++++ .../wholememory_ops/embedding_test_utils.hpp | 67 + ...lememory_embedding_gradient_apply_tests.cu | 802 ++++++ .../wholememory_embedding_tests.cu | 470 +++ .../wholememory_gather_tests.cu | 384 +++ .../wholememory_scatter_tests.cu | 378 +++ dependencies.yaml | 253 ++ docs/CppAPI.md | 105 - docs/GNNExample.md | 249 -- docs/Performance.md | 57 - docs/PyTorchAPI.md | 95 - docs/WholeMemoryIntroduction.md | 79 - docs/imgs/whole_graph_stack.png | Bin 933906 -> 0 bytes docs/imgs/whole_memory_atomic_perf.png | Bin 166334 -> 0 bytes docs/imgs/whole_memory_read_perf.png | Bin 251702 -> 0 bytes docs/imgs/whole_memory_write_perf.png | Bin 237669 -> 0 bytes examples/gnn/gnn_example_link_prediction.py | 675 ----- ...example_link_prediction_train_embedding.py | 662 ----- .../gnn/gnn_example_node_classification.py | 619 ---- ...ple_node_classification_train_embedding.py | 605 ---- examples/gnn/gnn_example_rgnn.py | 1219 -------- examples/gnn/gnn_homograph_data_preprocess.py | 324 --- examples/gnn/gnn_mag240m_data_preprocess.py | 213 -- fetch_rapids.cmake | 18 - format_all.sh | 6 - include/cuda_env_fns.h | 65 - include/data_type.h | 337 --- include/graph_builder.h | 60 - include/whole_chunked_memory.cuh | 63 - include/whole_chunked_memory.h | 99 - include/whole_graph_optimizers.h | 64 - include/whole_memory.h | 327 --- include/whole_memory_embedding.h | 303 -- include/whole_memory_graph.h | 420 --- include/whole_nccl_memory.h | 65 - pylibwholegraph/CMakeLists.txt | 192 ++ pylibwholegraph/cpp/pylibwholegraph_ext.cpp | 31 + pylibwholegraph/cpp/wholegraph_functions.cpp | 43 + pylibwholegraph/cpp/wholegraph_types.cpp | 58 + .../examples/node_classfication.py | 223 ++ .../pylibwholegraph}/__init__.py | 0 .../pylibwholegraph/binding/CMakeLists.txt | 11 + .../pylibwholegraph/binding}/__init__.py | 0 .../binding/wholememory_binding.pyx | 2065 ++++++++++++++ .../pylibwholegraph/test_utils/test_comm.py | 183 ++ .../pylibwholegraph/torch/__init__.py | 75 + pylibwholegraph/pylibwholegraph/torch/comm.py | 142 + .../pylibwholegraph/torch/common_options.py | 167 ++ .../torch/cugraphops/__init__.py | 0 .../torch/cugraphops/sage_conv.py | 99 + .../pylibwholegraph/torch/data_loader.py | 104 + .../torch/distributed_launch.py | 336 +++ .../pylibwholegraph/torch/dlpack_utils.py | 19 + .../pylibwholegraph/torch/embedding.py | 491 ++++ .../pylibwholegraph/torch/gnn_model.py | 249 ++ .../pylibwholegraph/torch/graph_ops.py | 375 +++ .../pylibwholegraph/torch/graph_structure.py | 149 + .../pylibwholegraph/torch/initialize.py | 75 + .../pylibwholegraph/torch/tensor.py | 216 ++ .../pylibwholegraph/torch/utils.py | 135 + .../pylibwholegraph/torch/wholegraph_env.py | 146 + .../pylibwholegraph/torch/wholegraph_ops.py | 157 + .../pylibwholegraph/torch/wholememory_ops.py | 63 + .../pylibwholegraph/utils/__init__.py | 0 .../pylibwholegraph/utils/multiprocess.py | 31 + pylibwholegraph/setup.py | 72 + .../test_wholememory_binding.py | 119 + .../pylibwholegraph/test_wholememory_io.py | 276 ++ .../test_wholememory_tensor.py | 115 + .../ops/test_graph_add_csr_self_loop.py | 80 + .../ops/test_graph_append_unique.py | 103 + ...test_graph_edge_weight_softmax_backward.py | 105 + .../test_graph_edge_weight_softmax_forward.py | 92 + .../ops/test_graph_gspmm_weighted_backward.py | 160 ++ .../ops/test_graph_gspmm_weighted_forward.py | 108 + .../ops/test_graph_spadd_gat_backward.py | 113 + .../ops/test_graph_spadd_gat_forward.py | 107 + .../ops/test_graph_spmm_no_weight_backward.py | 120 + .../ops/test_graph_spmm_no_weight_forward.py | 108 + .../ops/test_wholegraph_gather_scatter.py | 166 ++ ...h_unweighted_sample_without_replacement.py | 404 +++ ...aph_weighted_sample_without_replacement.py | 408 +++ .../ops/test_wholememory_cython_binding.py | 149 + .../wholegraph_torch/CMakeLists.txt | 70 + .../ops/gather_scatter_ops.cpp | 91 + .../ops/raft_ramdom_generator_ops.cpp | 74 + .../wholegraph_torch/ops/test_raft_random.cuh | 128 + ...eighted_sample_without_replacement_ops.cpp | 98 + ...eighted_sample_without_replacement_ops.cpp | 108 + .../wholegraph_torch/torch_env_func_ptrs.cpp | 53 + .../wholegraph_torch/torch_env_func_ptrs.h | 32 + .../wholegraph_torch/torch_utils.cpp | 240 ++ .../wholegraph_torch/torch_utils.h | 87 + python/wg_torch/comm.py | 54 - python/wg_torch/embedding_ops.py | 407 --- python/wg_torch/gnn/GATConv.py | 246 -- python/wg_torch/gnn/SAGEConv.py | 134 - python/wg_torch/gnn/rGCNConv.py | 135 - python/wg_torch/graph_ops.py | 1130 -------- python/wg_torch/wm_tensor.py | 210 -- .../__clang_cuda_additional_intrinsics.h | 406 +++ scripts/checks/clangutils.py | 121 + scripts/checks/copyright.py | 229 ++ scripts/checks/fileutils.py | 112 + scripts/checks/gitutils.py | 287 ++ scripts/checks/run-clang-format.py | 126 + scripts/checks/run-clang-tidy.py | 608 ++++ test/CMakeLists.txt | 26 - test/block_topk_test.cu | 369 --- test/bootstrap_test.cu | 129 - test/pytorch/graph_sampler_test.py | 304 -- test/pytorch/nccl_func_test.py | 319 --- test/pytorch/wholememory_chunked_test.py | 90 - .../wholememory_negative_sample_test.py | 132 - test/pytorch/wholememory_test.py | 98 - test/whole_memory_mp_test.cu | 135 - test/whole_memory_perf_scan.cu | 324 --- test/whole_memory_sp_test.cu | 123 - test/whole_memory_test_utils.cuh | 200 -- wholegraph/bootstrap_communicator.cc | 533 ---- wholegraph/cuda_env_fns.cc | 87 - wholegraph/file_utils.cc | 136 - wholegraph/file_utils.h | 31 - wholegraph/gnn_ops.cu | 1445 ---------- wholegraph/gnn_ops.h | 193 -- wholegraph/graph_builder.cu | 845 ------ wholegraph/macros.h | 56 - wholegraph/optimizer.cuh | 320 --- wholegraph/parallel_utils.cc | 100 - wholegraph/random.cuh | 78 - wholegraph/torch/CMakeLists.txt | 34 - wholegraph/torch/gather_gpu.cu | 368 --- wholegraph/torch/gnn_ops_gpu.cc | 559 ---- wholegraph/torch/graph_sampler_gpu.cc | 825 ------ wholegraph/torch/pytorch_cuda_env_fns.cc | 76 - wholegraph/torch/pytorch_cuda_env_fns.h | 44 - wholegraph/torch/pytorch_dtype.cc | 60 - .../torch/whole_chunked_pytorch_tensor.cc | 78 - .../torch/whole_chunked_pytorch_tensor.h | 191 -- .../torch/whole_graph_pytorch_wrapper.cc | 1228 -------- wholegraph/torch/whole_nccl_pytorch_tensor.cc | 78 - wholegraph/torch/whole_nccl_pytorch_tensor.h | 191 -- wholegraph/whole_graph_negative_sampler.cu | 382 --- wholegraph/whole_graph_sampler.cu | 1597 ----------- wholegraph/whole_graph_subgraph_extractor.cu | 418 --- wholegraph/whole_graph_weighted_sampler.cu | 691 ----- wholegraph/whole_memory.cc | 1484 ---------- wholegraph/whole_memory_communicator.h | 74 - wholegraph/whole_memory_embedding.cu | 1567 ---------- wholegraph/whole_memory_graph.cu | 370 --- wholegraph/whole_memory_memcpy.cu | 172 -- 336 files changed, 49541 insertions(+), 26066 deletions(-) create mode 100644 .clang-format create mode 100644 .clang-tidy create mode 100644 .flake8 create mode 100644 .github/ops-bot.yaml create mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/pr.yaml create mode 100644 .github/workflows/test.yaml create mode 100644 .gitlab-ci.yml create mode 100644 .pre-commit-config.yaml delete mode 100644 CMakeLists.txt delete mode 100644 Dockerfile create mode 100755 build_component.sh create mode 100644 ci/build_cpp.sh create mode 100644 ci/build_docs.sh create mode 100644 ci/build_python.sh create mode 100644 ci/check_style.sh create mode 100644 ci/test_clang_tidy.sh create mode 100644 ci/test_cpp.sh create mode 100644 ci/test_python.sh create mode 100644 cmake/CodeChecker.cmake create mode 100644 cmake/doxygen.cmake create mode 100644 cmake/thirdparty/get_gtest.cmake create mode 100644 cmake/thirdparty/get_raft.cmake create mode 100644 cmake/thirdparty/nanobind.cmake create mode 100644 conda/recipes/libwholegraph/build.sh create mode 100644 conda/recipes/libwholegraph/conda_build_config.yaml create mode 100644 conda/recipes/libwholegraph/install_libwholegraph.sh create mode 100644 conda/recipes/libwholegraph/install_libwholegraph_tests.sh create mode 100644 conda/recipes/libwholegraph/meta.yaml create mode 100644 conda/recipes/pylibwholegraph/build.sh create mode 100644 conda/recipes/pylibwholegraph/conda_build_config.yaml create mode 100644 conda/recipes/pylibwholegraph/meta.yaml create mode 100644 cpp/CMakeLists.txt create mode 100644 cpp/Doxyfile create mode 100644 cpp/Doxyfile.in create mode 100644 cpp/include/wholememory/device_reference.cuh create mode 100644 cpp/include/wholememory/embedding.h create mode 100644 cpp/include/wholememory/env_func_ptrs.h create mode 100644 cpp/include/wholememory/global_reference.h create mode 100644 cpp/include/wholememory/graph_op.h create mode 100644 cpp/include/wholememory/tensor_description.h create mode 100644 cpp/include/wholememory/wholegraph_op.h create mode 100644 cpp/include/wholememory/wholememory.h create mode 100644 cpp/include/wholememory/wholememory_op.h create mode 100644 cpp/include/wholememory/wholememory_tensor.h create mode 100644 cpp/src/cuda_macros.cpp create mode 100644 cpp/src/cuda_macros.hpp create mode 100644 cpp/src/error.hpp create mode 100644 cpp/src/graph_ops/append_unique.cpp create mode 100644 cpp/src/graph_ops/append_unique_func.cuh create mode 100644 cpp/src/graph_ops/append_unique_impl.cu create mode 100644 cpp/src/graph_ops/append_unique_impl.h create mode 100644 cpp/src/graph_ops/csr_add_self_loop.cpp create mode 100644 cpp/src/graph_ops/csr_add_self_loop_func.cuh create mode 100644 cpp/src/graph_ops/csr_add_self_loop_impl.cu create mode 100644 cpp/src/graph_ops/csr_add_self_loop_impl.h create mode 100644 cpp/src/graph_ops/edge_weight_softmax.cpp create mode 100644 cpp/src/graph_ops/edge_weight_softmax_func.cuh create mode 100644 cpp/src/graph_ops/edge_weight_softmax_impl.cu create mode 100644 cpp/src/graph_ops/edge_weight_softmax_impl.h create mode 100644 cpp/src/graph_ops/gspmm_csr_weighted.cpp create mode 100644 cpp/src/graph_ops/gspmm_csr_weighted_func.cuh create mode 100644 cpp/src/graph_ops/gspmm_csr_weighted_impl.cu create mode 100644 cpp/src/graph_ops/gspmm_csr_weighted_impl.h create mode 100644 cpp/src/graph_ops/spadd_gat_csr.cpp create mode 100644 cpp/src/graph_ops/spadd_gat_csr_func.cuh create mode 100644 cpp/src/graph_ops/spadd_gat_csr_impl.cu create mode 100644 cpp/src/graph_ops/spadd_gat_csr_impl.h create mode 100644 cpp/src/graph_ops/spmm_csr_no_weight.cpp create mode 100644 cpp/src/graph_ops/spmm_csr_no_weight_func.cuh create mode 100644 cpp/src/graph_ops/spmm_csr_no_weight_impl.cu create mode 100644 cpp/src/graph_ops/spmm_csr_no_weight_impl.h create mode 100644 cpp/src/logger.cpp create mode 100644 cpp/src/logger.hpp create mode 100644 cpp/src/parallel_utils.cpp rename include/parallel_utils.h => cpp/src/parallel_utils.hpp (50%) rename {wholegraph => cpp/src/wholegraph_ops}/block_radix_topk.cuh (60%) create mode 100644 cpp/src/wholegraph_ops/sample_comm.cuh create mode 100644 cpp/src/wholegraph_ops/unweighted_sample_without_replacement.cpp create mode 100644 cpp/src/wholegraph_ops/unweighted_sample_without_replacement_func.cuh create mode 100644 cpp/src/wholegraph_ops/unweighted_sample_without_replacement_impl.h create mode 100644 cpp/src/wholegraph_ops/unweighted_sample_without_replacement_impl_mapped.cu create mode 100644 cpp/src/wholegraph_ops/weighted_sample_without_replacement.cpp create mode 100644 cpp/src/wholegraph_ops/weighted_sample_without_replacement_func.cuh create mode 100644 cpp/src/wholegraph_ops/weighted_sample_without_replacement_impl.h create mode 100644 cpp/src/wholegraph_ops/weighted_sample_without_replacement_impl_mapped.cu create mode 100644 cpp/src/wholememory/communicator.cpp create mode 100644 cpp/src/wholememory/communicator.hpp create mode 100644 cpp/src/wholememory/embedding.cpp create mode 100644 cpp/src/wholememory/embedding.hpp create mode 100644 cpp/src/wholememory/embedding_cache.cpp create mode 100644 cpp/src/wholememory/embedding_cache.hpp create mode 100644 cpp/src/wholememory/embedding_optimizer.cpp create mode 100644 cpp/src/wholememory/embedding_optimizer.hpp create mode 100644 cpp/src/wholememory/env_func_ptrs.cpp create mode 100644 cpp/src/wholememory/env_func_ptrs.hpp create mode 100644 cpp/src/wholememory/file_io.cpp create mode 100644 cpp/src/wholememory/file_io.h rename wholegraph/torch/pytorch_dtype.h => cpp/src/wholememory/global_reference.cpp (63%) create mode 100644 cpp/src/wholememory/initialize.cpp rename include/whole_graph_mixed_graph.cuh => cpp/src/wholememory/initialize.hpp (51%) create mode 100644 cpp/src/wholememory/integer_utils.hpp create mode 100644 cpp/src/wholememory/memory_handle.cpp create mode 100644 cpp/src/wholememory/memory_handle.hpp create mode 100644 cpp/src/wholememory/nccl_comms.cpp create mode 100644 cpp/src/wholememory/nccl_comms.hpp create mode 100644 cpp/src/wholememory/tensor_description.cpp create mode 100644 cpp/src/wholememory/wholememory.cpp create mode 100644 cpp/src/wholememory/wholememory_tensor.cpp create mode 100644 cpp/src/wholememory_ops/functions/bucket_ids_func.cu create mode 100644 cpp/src/wholememory_ops/functions/bucket_ids_func.h create mode 100644 cpp/src/wholememory_ops/functions/embedding_cache_func.cu create mode 100644 cpp/src/wholememory_ops/functions/embedding_cache_func.cuh create mode 100644 cpp/src/wholememory_ops/functions/embedding_cache_func.h create mode 100644 cpp/src/wholememory_ops/functions/embedding_optimizer_func.cu create mode 100644 cpp/src/wholememory_ops/functions/embedding_optimizer_func.h create mode 100644 cpp/src/wholememory_ops/functions/exchange_embeddings_nccl_func.cu create mode 100644 cpp/src/wholememory_ops/functions/exchange_embeddings_nccl_func.h create mode 100644 cpp/src/wholememory_ops/functions/exchange_ids_nccl_func.cu create mode 100644 cpp/src/wholememory_ops/functions/exchange_ids_nccl_func.h create mode 100644 cpp/src/wholememory_ops/functions/gather_cached_func.cu create mode 100644 cpp/src/wholememory_ops/functions/gather_cached_func.h create mode 100644 cpp/src/wholememory_ops/functions/gather_func.cu create mode 100644 cpp/src/wholememory_ops/functions/gather_func_impl_floating_data_int32_indices.cu create mode 100644 cpp/src/wholememory_ops/functions/gather_func_impl_floating_data_int64_indices.cu create mode 100644 cpp/src/wholememory_ops/functions/gather_func_impl_integer_data_int32_indices.cu create mode 100644 cpp/src/wholememory_ops/functions/gather_func_impl_integer_data_int64_indices.cu create mode 100644 cpp/src/wholememory_ops/functions/gather_scatter_func.cuh create mode 100644 cpp/src/wholememory_ops/functions/gather_scatter_func.h create mode 100644 cpp/src/wholememory_ops/functions/scatter_func.cu create mode 100644 cpp/src/wholememory_ops/functions/scatter_func_impl_floating_data_int32_indices.cu create mode 100644 cpp/src/wholememory_ops/functions/scatter_func_impl_floating_data_int64_indices.cu create mode 100644 cpp/src/wholememory_ops/functions/scatter_func_impl_integer_data_int32_indices.cu create mode 100644 cpp/src/wholememory_ops/functions/scatter_func_impl_integer_data_int64_indices.cu create mode 100644 cpp/src/wholememory_ops/gather_op.cpp create mode 100644 cpp/src/wholememory_ops/gather_op_impl.h create mode 100644 cpp/src/wholememory_ops/gather_op_impl_mapped.cu create mode 100644 cpp/src/wholememory_ops/gather_op_impl_nccl.cu create mode 100644 cpp/src/wholememory_ops/output_memory_handle.hpp create mode 100644 cpp/src/wholememory_ops/raft_random.cuh create mode 100644 cpp/src/wholememory_ops/register.hpp create mode 100644 cpp/src/wholememory_ops/scatter_op.cpp create mode 100644 cpp/src/wholememory_ops/scatter_op_impl.h create mode 100644 cpp/src/wholememory_ops/scatter_op_impl_mapped.cu create mode 100644 cpp/src/wholememory_ops/scatter_op_impl_nccl.cu create mode 100644 cpp/src/wholememory_ops/temp_memory_handle.hpp create mode 100644 cpp/src/wholememory_ops/thrust_allocator.cpp create mode 100644 cpp/src/wholememory_ops/thrust_allocator.hpp create mode 100644 cpp/src/wholememory_ops/wholememory_test_op.cu create mode 100644 cpp/tests/CMakeLists.txt create mode 100644 cpp/tests/graph_ops/append_unique_test_utils.cu create mode 100644 cpp/tests/graph_ops/append_unique_test_utils.hpp create mode 100644 cpp/tests/graph_ops/append_unique_tests.cu create mode 100644 cpp/tests/graph_ops/csr_add_self_loop_tests.cu create mode 100644 cpp/tests/graph_ops/csr_add_self_loop_utils.cu create mode 100644 cpp/tests/graph_ops/csr_add_self_loop_utils.hpp create mode 100644 cpp/tests/graph_ops/edge_weight_softmax_backward_tests.cu create mode 100644 cpp/tests/graph_ops/edge_weight_softmax_forward_tests.cu create mode 100644 cpp/tests/graph_ops/edge_weight_softmax_test_utils.cu create mode 100644 cpp/tests/graph_ops/edge_weight_softmax_test_utils.hpp create mode 100644 cpp/tests/graph_ops/gspmm_csr_weighted_backward_tests.cu create mode 100644 cpp/tests/graph_ops/gspmm_csr_weighted_forward_tests.cu create mode 100644 cpp/tests/graph_ops/gspmm_csr_weighted_test_utils.cu create mode 100644 cpp/tests/graph_ops/gspmm_csr_weighted_test_utils.hpp create mode 100644 cpp/tests/graph_ops/spadd_gat_csr_backward_tests.cu create mode 100644 cpp/tests/graph_ops/spadd_gat_csr_forward_tests.cu create mode 100644 cpp/tests/graph_ops/spadd_gat_csr_utils.cu create mode 100644 cpp/tests/graph_ops/spadd_gat_csr_utils.hpp create mode 100644 cpp/tests/graph_ops/spmm_csr_no_weight_backward_tests.cu create mode 100644 cpp/tests/graph_ops/spmm_csr_no_weight_forward_tests.cu create mode 100644 cpp/tests/graph_ops/spmm_csr_no_weight_utils.cu create mode 100644 cpp/tests/graph_ops/spmm_csr_no_weight_utils.hpp create mode 100644 cpp/tests/parallel_utils_tests.cpp create mode 100644 cpp/tests/wholegraph_ops/graph_sampling_test_utils.cu create mode 100644 cpp/tests/wholegraph_ops/graph_sampling_test_utils.hpp create mode 100644 cpp/tests/wholegraph_ops/wholegraph_csr_unweighted_sample_without_replacement_tests.cu create mode 100644 cpp/tests/wholegraph_ops/wholegraph_csr_weighted_sample_without_replacement_tests.cu create mode 100644 cpp/tests/wholememory/wholememory_comm_tests.cpp create mode 100644 cpp/tests/wholememory/wholememory_handle_tests.cpp create mode 100644 cpp/tests/wholememory/wholememory_tensor_tests.cpp create mode 100644 cpp/tests/wholememory/wholememory_test_utils.hpp create mode 100644 cpp/tests/wholememory_ops/cacheset_tests.cu create mode 100644 cpp/tests/wholememory_ops/embedding_test_utils.cu create mode 100644 cpp/tests/wholememory_ops/embedding_test_utils.hpp create mode 100644 cpp/tests/wholememory_ops/wholememory_embedding_gradient_apply_tests.cu create mode 100644 cpp/tests/wholememory_ops/wholememory_embedding_tests.cu create mode 100644 cpp/tests/wholememory_ops/wholememory_gather_tests.cu create mode 100644 cpp/tests/wholememory_ops/wholememory_scatter_tests.cu create mode 100644 dependencies.yaml delete mode 100644 docs/CppAPI.md delete mode 100644 docs/GNNExample.md delete mode 100644 docs/Performance.md delete mode 100644 docs/PyTorchAPI.md delete mode 100644 docs/WholeMemoryIntroduction.md delete mode 100644 docs/imgs/whole_graph_stack.png delete mode 100644 docs/imgs/whole_memory_atomic_perf.png delete mode 100644 docs/imgs/whole_memory_read_perf.png delete mode 100644 docs/imgs/whole_memory_write_perf.png delete mode 100644 examples/gnn/gnn_example_link_prediction.py delete mode 100644 examples/gnn/gnn_example_link_prediction_train_embedding.py delete mode 100644 examples/gnn/gnn_example_node_classification.py delete mode 100644 examples/gnn/gnn_example_node_classification_train_embedding.py delete mode 100644 examples/gnn/gnn_example_rgnn.py delete mode 100644 examples/gnn/gnn_homograph_data_preprocess.py delete mode 100644 examples/gnn/gnn_mag240m_data_preprocess.py delete mode 100644 fetch_rapids.cmake delete mode 100644 format_all.sh delete mode 100644 include/cuda_env_fns.h delete mode 100644 include/data_type.h delete mode 100644 include/graph_builder.h delete mode 100644 include/whole_chunked_memory.cuh delete mode 100644 include/whole_chunked_memory.h delete mode 100644 include/whole_graph_optimizers.h delete mode 100644 include/whole_memory.h delete mode 100644 include/whole_memory_embedding.h delete mode 100644 include/whole_memory_graph.h delete mode 100644 include/whole_nccl_memory.h create mode 100644 pylibwholegraph/CMakeLists.txt create mode 100644 pylibwholegraph/cpp/pylibwholegraph_ext.cpp create mode 100644 pylibwholegraph/cpp/wholegraph_functions.cpp create mode 100644 pylibwholegraph/cpp/wholegraph_types.cpp create mode 100644 pylibwholegraph/examples/node_classfication.py rename {python/wg_torch => pylibwholegraph/pylibwholegraph}/__init__.py (100%) create mode 100644 pylibwholegraph/pylibwholegraph/binding/CMakeLists.txt rename {python/wg_torch/gnn => pylibwholegraph/pylibwholegraph/binding}/__init__.py (100%) create mode 100644 pylibwholegraph/pylibwholegraph/binding/wholememory_binding.pyx create mode 100644 pylibwholegraph/pylibwholegraph/test_utils/test_comm.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/__init__.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/comm.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/common_options.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/cugraphops/__init__.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/cugraphops/sage_conv.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/data_loader.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/distributed_launch.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/dlpack_utils.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/embedding.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/gnn_model.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/graph_ops.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/graph_structure.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/initialize.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/tensor.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/utils.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/wholegraph_env.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/wholegraph_ops.py create mode 100644 pylibwholegraph/pylibwholegraph/torch/wholememory_ops.py create mode 100644 pylibwholegraph/pylibwholegraph/utils/__init__.py create mode 100644 pylibwholegraph/pylibwholegraph/utils/multiprocess.py create mode 100644 pylibwholegraph/setup.py create mode 100644 pylibwholegraph/tests/pylibwholegraph/test_wholememory_binding.py create mode 100644 pylibwholegraph/tests/pylibwholegraph/test_wholememory_io.py create mode 100644 pylibwholegraph/tests/pylibwholegraph/test_wholememory_tensor.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_graph_add_csr_self_loop.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_graph_append_unique.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_graph_edge_weight_softmax_backward.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_graph_edge_weight_softmax_forward.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_graph_gspmm_weighted_backward.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_graph_gspmm_weighted_forward.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_graph_spadd_gat_backward.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_graph_spadd_gat_forward.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_graph_spmm_no_weight_backward.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_graph_spmm_no_weight_forward.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_wholegraph_gather_scatter.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_wholegraph_unweighted_sample_without_replacement.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_wholegraph_weighted_sample_without_replacement.py create mode 100644 pylibwholegraph/tests/wholegraph_torch/ops/test_wholememory_cython_binding.py create mode 100644 pylibwholegraph/wholegraph_torch/CMakeLists.txt create mode 100644 pylibwholegraph/wholegraph_torch/ops/gather_scatter_ops.cpp create mode 100644 pylibwholegraph/wholegraph_torch/ops/raft_ramdom_generator_ops.cpp create mode 100644 pylibwholegraph/wholegraph_torch/ops/test_raft_random.cuh create mode 100644 pylibwholegraph/wholegraph_torch/ops/unweighted_sample_without_replacement_ops.cpp create mode 100644 pylibwholegraph/wholegraph_torch/ops/weighted_sample_without_replacement_ops.cpp create mode 100644 pylibwholegraph/wholegraph_torch/torch_env_func_ptrs.cpp create mode 100644 pylibwholegraph/wholegraph_torch/torch_env_func_ptrs.h create mode 100644 pylibwholegraph/wholegraph_torch/torch_utils.cpp create mode 100644 pylibwholegraph/wholegraph_torch/torch_utils.h delete mode 100644 python/wg_torch/comm.py delete mode 100644 python/wg_torch/embedding_ops.py delete mode 100644 python/wg_torch/gnn/GATConv.py delete mode 100644 python/wg_torch/gnn/SAGEConv.py delete mode 100644 python/wg_torch/gnn/rGCNConv.py delete mode 100644 python/wg_torch/graph_ops.py delete mode 100644 python/wg_torch/wm_tensor.py create mode 100644 scripts/checks/__clang_cuda_additional_intrinsics.h create mode 100644 scripts/checks/clangutils.py create mode 100644 scripts/checks/copyright.py create mode 100644 scripts/checks/fileutils.py create mode 100644 scripts/checks/gitutils.py create mode 100755 scripts/checks/run-clang-format.py create mode 100644 scripts/checks/run-clang-tidy.py delete mode 100644 test/CMakeLists.txt delete mode 100644 test/block_topk_test.cu delete mode 100644 test/bootstrap_test.cu delete mode 100644 test/pytorch/graph_sampler_test.py delete mode 100644 test/pytorch/nccl_func_test.py delete mode 100644 test/pytorch/wholememory_chunked_test.py delete mode 100644 test/pytorch/wholememory_negative_sample_test.py delete mode 100644 test/pytorch/wholememory_test.py delete mode 100644 test/whole_memory_mp_test.cu delete mode 100644 test/whole_memory_perf_scan.cu delete mode 100644 test/whole_memory_sp_test.cu delete mode 100644 test/whole_memory_test_utils.cuh delete mode 100644 wholegraph/bootstrap_communicator.cc delete mode 100644 wholegraph/cuda_env_fns.cc delete mode 100644 wholegraph/file_utils.cc delete mode 100644 wholegraph/file_utils.h delete mode 100644 wholegraph/gnn_ops.cu delete mode 100644 wholegraph/gnn_ops.h delete mode 100644 wholegraph/graph_builder.cu delete mode 100644 wholegraph/macros.h delete mode 100644 wholegraph/optimizer.cuh delete mode 100644 wholegraph/parallel_utils.cc delete mode 100644 wholegraph/random.cuh delete mode 100644 wholegraph/torch/CMakeLists.txt delete mode 100644 wholegraph/torch/gather_gpu.cu delete mode 100644 wholegraph/torch/gnn_ops_gpu.cc delete mode 100644 wholegraph/torch/graph_sampler_gpu.cc delete mode 100644 wholegraph/torch/pytorch_cuda_env_fns.cc delete mode 100644 wholegraph/torch/pytorch_cuda_env_fns.h delete mode 100644 wholegraph/torch/pytorch_dtype.cc delete mode 100644 wholegraph/torch/whole_chunked_pytorch_tensor.cc delete mode 100644 wholegraph/torch/whole_chunked_pytorch_tensor.h delete mode 100644 wholegraph/torch/whole_graph_pytorch_wrapper.cc delete mode 100644 wholegraph/torch/whole_nccl_pytorch_tensor.cc delete mode 100644 wholegraph/torch/whole_nccl_pytorch_tensor.h delete mode 100644 wholegraph/whole_graph_negative_sampler.cu delete mode 100644 wholegraph/whole_graph_sampler.cu delete mode 100644 wholegraph/whole_graph_subgraph_extractor.cu delete mode 100644 wholegraph/whole_graph_weighted_sampler.cu delete mode 100644 wholegraph/whole_memory.cc delete mode 100644 wholegraph/whole_memory_communicator.h delete mode 100644 wholegraph/whole_memory_embedding.cu delete mode 100644 wholegraph/whole_memory_graph.cu delete mode 100644 wholegraph/whole_memory_memcpy.cu diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..26b9a5bf4 --- /dev/null +++ b/.clang-format @@ -0,0 +1,155 @@ +--- +# Refer to the following link for the explanation of each params: +# http://releases.llvm.org/8.0.0/tools/clang/docs/ClangFormatStyleOptions.html +Language: Cpp +# BasedOnStyle: Google +AccessModifierOffset: -1 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: true +AlignConsecutiveBitFields: true +AlignConsecutiveDeclarations: false +AlignConsecutiveMacros: true +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: true +AllowAllArgumentsOnNextLine: true +AllowAllConstructorInitializersOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: true +AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: true +AllowShortLambdasOnASingleLine: true +AllowShortLoopsOnASingleLine: false +# This is deprecated +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: true +AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: false +BinPackParameters: false +BraceWrapping: + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false + # disabling the below splits, else, they'll just add to the vertical length of source files! + SplitEmptyFunction: false + SplitEmptyRecord: false + SplitEmptyNamespace: false +BreakAfterJavaFieldAnnotations: false +BreakBeforeBinaryOperators: None +BreakBeforeBraces: WebKit +BreakBeforeInheritanceComma: false +BreakBeforeTernaryOperators: true +BreakConstructorInitializersBeforeComma: false +BreakConstructorInitializers: BeforeColon +BreakInheritanceList: BeforeColon +BreakStringLiterals: true +ColumnLimit: 100 +CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: false +ConstructorInitializerAllOnOneLineOrOnePerLine: true +# Kept the below 2 to be the same as `IndentWidth` to keep everything uniform +ConstructorInitializerIndentWidth: 2 +ContinuationIndentWidth: 2 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH +IncludeBlocks: Preserve +IncludeIsMainRegex: '([-_](test|unittest))?$' +IndentCaseLabels: true +IndentPPDirectives: None +IndentWidth: 2 +IndentWrappedFunctionNames: false +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: false +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBinPackProtocolList: Never +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 1 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 200 +PointerAlignment: Left +RawStringFormats: + - Language: Cpp + Delimiters: + - cc + - CC + - cpp + - Cpp + - CPP + - 'c++' + - 'C++' + CanonicalDelimiter: '' + - Language: TextProto + Delimiters: + - pb + - PB + - proto + - PROTO + EnclosingFunctions: + - EqualsProto + - EquivToProto + - PARSE_PARTIAL_TEXT_PROTO + - PARSE_TEST_PROTO + - PARSE_TEXT_PROTO + - ParseTextOrDie + - ParseTextProtoOrDie + CanonicalDelimiter: '' + BasedOnStyle: google +# Enabling comment reflow causes doxygen comments to be messed up in their formats! +ReflowComments: true +SortIncludes: true +SortUsingDeclarations: true +SpaceAfterCStyleCast: false +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true +SpaceBeforeSquareBrackets: false +SpaceInEmptyBlock: false +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInAngles: false +SpacesInConditionalStatement: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: c++17 +StatementMacros: + - Q_UNUSED + - QT_REQUIRE_VERSION +# Be consistent with indent-width, even for people who use tab for indentation! +TabWidth: 2 +UseTab: Never diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 000000000..e80fc8c63 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,412 @@ +--- +# Refer to the following link for the explanation of each parameter: +# https://releases.llvm.org/11.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/list.html +# +# Checks we don't consider because they are irrelevant to this project: +# abseil-*, android-*, boost-*, clang-analyzer-*, darwin-*, fuchsia-*, hicpp-*, +# linuxkernel-*, mpi-*, objc-*, openmp-*, zircon-* +# +# Add all bugprone checks, except: +# bugprone-easily-swappable-parameters: +# this seems unavailable in clang-tidy 11 but in any case, we have many +# internal and external APIs that rely on order of arguments, +# so we remove this by default. +# bugprone-misplaced-widening-cast: +# there are too many instances where we want to shorten things like +# int64_t(int32_t * int32_t) for performance if we know that int32_t * int32_t +# is small enough through asserts. +# It may be possible to introduce this rule at a later time. +# bugprone-narrowing-conversions: +# there is no way to ignore this for blockIdx/threadIdx which should be +# converted to int for optimization purposes by default. +# If at some point, we can specify special variables to ignore (such as +# blockIdx/threadIdx), or we can run it only on host code, we can add it back. +# bugprone-unhandled-self-assignment: +# removed as alias of cert-oop54-cpp (which is included and slightly more +# restrictive since WarnOnlyIfThisHasSuspiciousField=0) +# +# Add all cert checks, except: +# cert-dcl03-c: +# removed as alias of misc-static-assert (which is included) +# cert-dcl16-c: +# removed as alias of readability-uppercase-literal-suffix (which is included +# and more restrictive since it checks for more suffixes) +# cert-dcl37-c: +# removed as alias of bugprone-reserved-identifier (which is included) +# cert-dcl51-cpp: +# removed as alias of bugprone-reserved-identifier (which is included) +# cert-dcl54-cpp: +# removed as alias of misc-new-delete-overloads (which is included) +# cert-dcl59-cpp: +# removed as alias of google-build-namespaces (which is included) +# cert-err09-cpp & cert-err61-cpp: +# removed as alias of misc-throw-by-value-catch-by-reference (which is included) +# cert-fio38-c: +# removed as alias of misc-non-copyable-objects (which is included) +# cert-msc32-c: +# removed as alias of cert-msc51-cpp (which is included) +# cert-oop11-cpp: +# removed as alias of performance-move-constructor-init (which is included) +# cert-str34-c: +# removed as alias of bugprone-signed-char-misuse (which is included and +# slightly more restrictive since DiagnoseSignedUnsignedCharComparisons=1) +# +# Add all cppcoreguidelines checks, except: +# cppcoreguidelines-avoid-c-arrays: +# in general, I'd discourage use of C-style arrays, but there are simply too +# many reasonable uses in device code, for registers/shared memory, and we +# cannot easily parameterize this rule / only run it for host code. +# cppcoreguidelines-avoid-magic-numbers: +# removed as alias of readability-magic-numbers (which is included) +# cppcoreguidelines-narrowing-conversions: +# removed as alias of bugprone-narrowing-conversions (which is excluded) +# cppcoreguidelines-init-variables: +# in device code, I think the default should be not to initialize variables +# when it makes sense, since this can enable compiler optimizations relying +# on undefined behavior (similar to using signed int vs unsigned int). +# For now, this should be excluded. +# cppcoreguidelines-non-private-member-variables-in-classes: +# this warns about all protected members, which I do think have reasonable +# uses, so this is excluded +# cppcoreguidelines-pro-bounds-array-to-pointer-decay: +# this would only make sense if on host only, C-style arrays and pointer +# arithmetic make device code more readable IMO +# cppcoreguidelines-pro-bounds-constant-array-index: +# excluded for same reason as cppcoreguidelines-pro-bounds-array-to-pointer-decay +# cppcoreguidelines-pro-bounds-pointer-arithmetic: +# excluded for same reason as cppcoreguidelines-pro-bounds-array-to-pointer-decay +# cppcoreguidelines-pro-type-reinterpret-cast: +# there are many reasonable uses of reinterpret cast, as long as it's explicit +# cppcoreguidelines-pro-type-vararg: +# this may be included once we eliminate all macors using vararg, but for now +# we exclude it +# +# Add all google checks, except: +# google-readability-braces-around-statements: +# this is handled by clang-format, leave it to clang-format +# google-runtime-references: +# this is obsolete as it has been removed from Google's style guide in 2020 +# +# Add all llvm checks, except: +# llvm-else-after-return: +# removed as alias of readability-else-after-return (which is included) +# llvm-header-guard: +# we use #pragma once instead +# llvm-qualified-auto: +# removed as alias of readability-qualified-auto (which is included) +# llvm-namespace-comment: +# removed as alias of google-readability-namespace-comments (which is included) +# +# Add all misc checks, except: +# misc-non-private-member-variables-in-classes: +# removed as alias of cppcoreguidelines-non-private-member-variables-in-classes +# (which is excluded) +# +# Add all modernize checks, except: +# modernize-avoid-c-arrays: +# removed as alias of cppcoreguidelines-avoid-c-arrays (which is excluded) +# modernize-use-trailing-return-type: +# IMO, this only adds characters, and it doesn't make code look better. +# It also isn't part of Google's style guide, so we exclude this and +# encourage the C-style declaration of functions. +# +# Add all performance checks +# +# Add all readability checks, except: +# readability-braces-around-statements: +# removed as alias of google-readability-braces-around-statements (which is excluded) +# readability-function-cognitive-complexity: +# readability-function-size already does something similar +# readability-identifier-length: +# this should be up to programmers, IMO +# readability-isolate-declaration: +# this should be up to programmers, IMO +# readability-static-accessed-through-instance: +# incompatible with CUDA, since blockIdx/threadIdx are static and we cannot +# easily parameterize this rule / only run it for host code +# +# The following list checks are removed because they don't seem relevant +# to this particular project and only delay CI and development in general: +# bugprone-bad-signal-to-kill-thread +# bugprone-dynamic-static-initializers +# bugprone-no-escape +# bugprone-posix-return +# bugprone-spuriously-wake-up-functions +# cert-env33-c +# cert-err52-cpp +# cppcoreguidelines-owning-memory +# google-objc-* +# TODO(mjoux) re-enable the next 2 if we move to gtest +# google-readability-avoid-underscore-in-googletest-name +# google-upgrade-googletest-case +# llvm-prefer-isa-or-dyn-cast-in-conditionals +# llvm-prefer-register-over-unsigned +# llvm-twine-local +# modernize-avoid-bind +# modernize-deprecated-ios-base-aliases +# modernize-replace-disallow-copy-and-assign-macro +# performance-inefficient-algorithm +# +# Because we add whole check groups, future clang versions may use more +# checks. For now, only supported clang version is 11, however, it's likely +# that more recent versions work fine. +Checks: >- + -*, + altera-struct-pack-align, + bugprone-*, + -bugprone-easily-swappable-parameters, + -bugprone-misplaced-widening-cast, + -bugprone-narrowing-conversions, + -bugprone-unhandled-self-assignment, + cert-*, + -cert-dcl03-c, + -cert-dcl16-c, + -cert-dcl37-c, + -cert-dcl51-cpp, + -cert-dcl54-cpp, + -cert-dcl59-cpp, + -cert-err09-cpp, + -cert-err61-cpp, + -cert-fio38-c, + -cert-msc32-c, + -cert-oop11-cpp, + -cert-str34-c + cppcoreguidelines-*, + -cppcoreguidelines-avoid-c-arrays, + -cppcoreguidelines-avoid-magic-numbers, + -cppcoreguidelines-narrowing-conversions, + -cppcoreguidelines-init-variables, + -cppcoreguidelines-non-private-member-variables-in-classes, + -cppcoreguidelines-pro-bounds-array-to-pointer-decay, + -cppcoreguidelines-pro-bounds-constant-array-index, + -cppcoreguidelines-pro-bounds-pointer-arithmetic, + -cppcoreguidelines-pro-type-reinterpret-cast, + -cppcoreguidelines-pro-type-vararg, + google-*, + -google-readability-braces-around-statements, + -google-runtime-references, + llvm-*, + -llvm-else-after-return, + -llvm-header-guard, + -llvm-namespace-comment, + -llvm-qualified-auto, + misc-*, + -misc-non-private-member-variables-in-classes, + modernize-*, + -modernize-avoid-c-arrays, + -modernize-use-trailing-return-type, + performance-*, + readability-*, + -readability-braces-around-statements, + -readability-function-cognitive-complexity, + -readability-identifier-length, + -readability-isolate-declaration, + -readability-static-accessed-through-instance, + -bugprone-bad-signal-to-kill-thread, + -bugprone-dynamic-static-initializers, + -bugprone-no-escape, + -bugprone-posix-return, + -bugprone-spuriously-wake-up-functions, + -cert-env33-c, + -cert-err52-cpp, + -cppcoreguidelines-owning-memory, + -google-objc-*, + -google-readability-avoid-underscore-in-googletest-name, + -google-upgrade-googletest-case, + -llvm-prefer-isa-or-dyn-cast-in-conditionals, + -llvm-prefer-register-over-unsigned, + -llvm-twine-local, + -modernize-avoid-bind, + -modernize-deprecated-ios-base-aliases, + -modernize-replace-disallow-copy-and-assign-macro, + -performance-inefficient-algorithm, + +WarningsAsErrors: '' +HeaderFilterRegex: '' +AnalyzeTemporaryDtors: false +FormatStyle: none +User: wholegraph +CheckOptions: + - key: cppcoreguidelines-macro-usage.AllowedRegexp + value: WHOLEMEMORY*|WHOLEGRAPH*|ASSERT|SET_ERROR_MSG|THROW|RAFT_* + - key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions + value: true + - key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor + value: true +# in case we re-include this rule, we definitely ignore classes with public-only members (structs) + - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic + value: true +# many preceding numbers of powers of 2 added here as they are useful for bit-wise ops +# powers of 10 are typically used in tests + - key: readability-magic-numbers.IgnoredIntegerValues + value: 1;2;3;4;5;6;7;8;9;24;31;63;2147483647;4294967295;10;100;1000;10000;100000;1000000 +# any powers of 2 are typically useful for number of threads, warps, etc. + - key: readability-magic-numbers.IgnorePowersOf2IntegerValues + value: true +# useful for simple constants (sqrt(2), etc.) + - key: readability-magic-numbers.IgnoredFloatingPointValues + value: 1.0;2.0;3.0;4.0;5.0;6.0;7.0;8.0;9.0;10.0;0.5;0.25 +# only force-replace very long names with auto + - key: modernize-use-auto.MinTypeNameLength + value: 9 + - key: readability-identifier-naming.AbstractClassCase + value: lower_case + - key: readability-identifier-naming.AbstractClassPrefix + value: '' + - key: readability-identifier-naming.AbstractClassSuffix + value: '' + - key: readability-identifier-naming.ClassCase + value: lower_case + - key: readability-identifier-naming.ClassPrefix + value: '' + - key: readability-identifier-naming.ClassSuffix + value: '' + - key: readability-identifier-naming.ClassConstantCase + value: CamelCase + - key: readability-identifier-naming.ClassConstantPrefix + value: 'k' + - key: readability-identifier-naming.ClassConstantSuffix + value: '' + - key: readability-identifier-naming.ClassMemberCase + value: lower_case + - key: readability-identifier-naming.ClassMemberPrefix + value: '' + - key: readability-identifier-naming.ClassMemberSuffix + value: '' + - key: readability-identifier-naming.ClassMethodCase + value: lower_case + - key: readability-identifier-naming.ClassMethodPrefix + value: '' + - key: readability-identifier-naming.ClassMethodSuffix + value: '' + - key: readability-identifier-naming.ConstexprFunctionCase + value: lower_case + - key: readability-identifier-naming.ConstexprFunctionPrefix + value: '' + - key: readability-identifier-naming.ConstexprFunctionSuffix + value: '' + - key: readability-identifier-naming.ConstexprMethodCase + value: lower_case + - key: readability-identifier-naming.ConstexprMethodPrefix + value: '' + - key: readability-identifier-naming.ConstexprMethodSuffix + value: '' + - key: readability-identifier-naming.ConstexprVariableCase + value: UPPER_CASE + - key: readability-identifier-naming.ConstexprVariablePrefix + value: '' + - key: readability-identifier-naming.ConstexprVariableSuffix + value: '' + - key: readability-identifier-naming.EnumCase + value: CamelCase + - key: readability-identifier-naming.EnumPrefix + value: '' + - key: readability-identifier-naming.EnumSuffix + value: '' + - key: readability-identifier-naming.EnumConstantCase + value: CamelCase + - key: readability-identifier-naming.EnumConstantPrefix + value: 'k' + - key: readability-identifier-naming.EnumConstantSuffix + value: '' + - key: readability-identifier-naming.FunctionCase + value: lower_case + - key: readability-identifier-naming.FunctionPrefix + value: '' + - key: readability-identifier-naming.FunctionSuffix + value: '' + - key: readability-identifier-naming.GlobalConstantCase + value: UPPER_CASE + - key: readability-identifier-naming.GlobalConstantPrefix + value: '' + - key: readability-identifier-naming.GlobalConstantSuffix + value: '' + - key: readability-identifier-naming.LocalVariableCase + value: 'lower_case' + - key: readability-identifier-naming.LocalVariablePrefix + value: '' + - key: readability-identifier-naming.LocalVariableSuffix + value: '' + - key: readability-identifier-naming.MemberCase + value: lower_case + - key: readability-identifier-naming.MemberPrefix + value: '' + - key: readability-identifier-naming.MemberSuffix + value: '' + - key: readability-identifier-naming.NamespaceCase + value: lower_case + - key: readability-identifier-naming.NamespacePrefix + value: '' + - key: readability-identifier-naming.NamespaceSuffix + value: '' + - key: readability-identifier-naming.PrivateMemberCase + value: lower_case + - key: readability-identifier-naming.PrivateMemberPrefix + value: '' + - key: readability-identifier-naming.PrivateMemberSuffix + value: '_' + - key: readability-identifier-naming.ProtectedMemberCase + value: lower_case + - key: readability-identifier-naming.ProtectedMemberPrefix + value: '' + - key: readability-identifier-naming.ProtectedMemberSuffix + value: '_' + - key: readability-identifier-naming.StaticConstantCase + value: CamelCase + - key: readability-identifier-naming.StaticConstantPrefix + value: 'k' + - key: readability-identifier-naming.StaticConstantSuffix + value: '' + - key: readability-identifier-naming.StructCase + value: lower_case + - key: readability-identifier-naming.StructPrefix + value: '' + - key: readability-identifier-naming.StructSuffix + value: '' + - key: readability-identifier-naming.TemplateParameterCase + value: UPPER_CASE + - key: readability-identifier-naming.TemplateParameterPrefix + value: '' + - key: readability-identifier-naming.TemplateParameterSuffix + value: '' + - key: readability-identifier-naming.TypeAliasCase + value: lower_case + - key: readability-identifier-naming.TypeAliasPrefix + value: '' + - key: readability-identifier-naming.TypeAliasSuffix + value: '_t' + - key: readability-identifier-naming.TypeTemplateParameterCase + value: CamelCase + - key: readability-identifier-naming.TypeTemplateParameterPrefix + value: '' + - key: readability-identifier-naming.TypeTemplateParameterSuffix + value: 'T' + - key: readability-identifier-naming.TemplateTemplateParameterCase + value: CamelCase + - key: readability-identifier-naming.TemplateTemplateParameterPrefix + value: '' + - key: readability-identifier-naming.TemplateTemplateParameterSuffix + value: 'T' + - key: readability-identifier-naming.TypedefCase + value: lower_case + - key: readability-identifier-naming.TypedefPrefix + value: '' + - key: readability-identifier-naming.TypedefSuffix + value: '_t' + - key: readability-identifier-naming.VariableCase + value: lower_case + - key: readability-identifier-naming.VariablePrefix + value: '' + - key: readability-identifier-naming.VariableSuffix + value: '' + - key: bugprone-suspicious-include.HeaderFileExtensions + value: ';h;hh;hpp;hxx;cuh' + - key: bugprone-suspicious-include.ImplementationFileExtensions + value: 'c;cc;cpp;cxx;cu' + - key: google-build-namespaces.HeaderFileExtensions + value: ';h;hh;hpp;hxx;cuh' + - key: google-global-names-in-headers.HeaderFileExtensions + value: ';h;hh;hpp;hxx;cuh' + - key: misc-definitions-in-headers.HeaderFileExtensions + value: ';h;hh;hpp;hxx;cuh' +... diff --git a/.flake8 b/.flake8 new file mode 100644 index 000000000..a89989a55 --- /dev/null +++ b/.flake8 @@ -0,0 +1,25 @@ +# Copyright (c) 2023, NVIDIA CORPORATION. + +[flake8] +filename = *.py, *.pyx, *.pxd, *.pxi +exclude = __init__.py, *.egg, build, docs, .git +force-check = True +max-line-length = 120 +ignore = + # line break before binary operator + W503, + # whitespace before : + E203 +per-file-ignores = + # Rules ignored only in Cython: + # E211: whitespace before '(' (used in multi-line imports) + # E225: Missing whitespace around operators (breaks cython casting syntax like ) + # E226: Missing whitespace around arithmetic operators (breaks cython pointer syntax like int*) + # E227: Missing whitespace around bitwise or shift operator (Can also break casting syntax) + # E275: Missing whitespace after keyword (Doesn't work with Cython except?) + # E402: invalid syntax (works for Python, not Cython) + # E999: invalid syntax (works for Python, not Cython) + # W504: line break after binary operator (breaks lines that end with a pointer) + *.pyx: E211, E225, E226, E227, E275, E402, E999, W504 + *.pxd: E211, E225, E226, E227, E275, E402, E999, W504 + *.pxi: E211, E225, E226, E227, E275, E402, E999, W504 diff --git a/.github/ops-bot.yaml b/.github/ops-bot.yaml new file mode 100644 index 000000000..2d1444c59 --- /dev/null +++ b/.github/ops-bot.yaml @@ -0,0 +1,9 @@ +# This file controls which features from the `ops-bot` repository below are enabled. +# - https://github.com/rapidsai/ops-bot + +auto_merger: true +branch_checker: true +label_checker: true +release_drafter: true +copy_prs: true +recently_updated: true diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 000000000..24e7479bd --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,67 @@ +name: build + +on: + push: + branches: + - "branch-*" + tags: + - v[0-9][0-9].[0-9][0-9].[0-9][0-9] + workflow_dispatch: + inputs: + branch: + required: true + type: string + date: + required: true + type: string + sha: + required: true + type: string + build_type: + type: string + default: nightly + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + cpp-build: + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.06 + with: + build_type: ${{ inputs.build_type || 'branch' }} + branch: ${{ inputs.branch }} + date: ${{ inputs.date }} + sha: ${{ inputs.sha }} + build_script: ci/build_cpp.sh + python-build: + needs: [cpp-build] + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.06 + with: + build_type: ${{ inputs.build_type || 'branch' }} + branch: ${{ inputs.branch }} + date: ${{ inputs.date }} + sha: ${{ inputs.sha }} + build_script: ci/build_python.sh + docs-build: + if: ${{ startsWith(github.ref, 'refs/heads/branch-') }} + needs: [python-build] + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.06 + with: + build_type: branch + node_type: "gpu-v100-latest-1" + arch: "amd64" + container_image: "rapidsai/ci:latest" + run_script: "ci/build_docs.sh" + upload-conda: + needs: [cpp-build, python-build] + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.06 + with: + build_type: ${{ inputs.build_type || 'branch' }} + branch: ${{ inputs.branch }} + date: ${{ inputs.date }} + sha: ${{ inputs.sha }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 000000000..53f657a11 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,72 @@ +name: pr + +on: + push: + branches: + - "pull-request/[0-9]+" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + pr-builder: + needs: + - checks + - clang-tidy-check + - conda-cpp-build + - conda-cpp-tests + - conda-python-build + - docs-build + - conda-python-tests + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.06 + checks: + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.06 + clang-tidy-check: + needs: checks + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.06 + with: + build_type: pull-request + arch: "amd64" + container_image: "rapidsai/ci:latest" + run_script: "ci/test_clang_tidy.sh" + conda-cpp-build: + needs: checks + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.06 + with: + build_type: pull-request + build_script: ci/build_cpp.sh + conda-cpp-tests: + needs: conda-cpp-build + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.06 + with: + build_type: pull-request + test_script: ci/test_cpp.sh + conda-python-build: + needs: conda-cpp-build + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.06 + with: + build_type: pull-request + build_script: ci/build_python.sh + conda-python-tests: + needs: conda-python-build + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.06 + with: + build_type: pull-request + test_script: ci/test_python.sh + docs-build: + needs: conda-python-build + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.06 + with: + build_type: pull-request + arch: "amd64" + container_image: "rapidsai/ci:latest" + run_script: "ci/build_docs.sh" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 000000000..8f1f43231 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,34 @@ +name: test + +on: + workflow_dispatch: + inputs: + branch: + required: true + type: string + date: + required: true + type: string + sha: + required: true + type: string + +jobs: + conda-cpp-tests: + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.06 + with: + build_type: nightly + branch: ${{ inputs.branch }} + date: ${{ inputs.date }} + sha: ${{ inputs.sha }} + test_script: ci/test_cpp.sh + conda-pytorch-tests: + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.06 + with: + build_type: nightly + branch: ${{ inputs.branch }} + date: ${{ inputs.date }} + sha: ${{ inputs.sha }} + test_script: ci/test_python.sh diff --git a/.gitignore b/.gitignore index 9228c8f20..a5a05690b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,82 +1,16 @@ -## Common -__pycache__ +build*/ +__pycache__/ +.pytest_cache/ *.pyc -*.a -*.o *.so -*.dylib -.cache -.coverage -.vscode -.lock -*.swp -*.pytest_cache -*~ -DartConfiguration.tcl -.DS_Store - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -test-results - -## Python build directories & artifacts -htmlcov -wholegraph.egg-info/ -python/build -python/wholegraph/bindings/*.cpp -wheels/ +.cache/ +.conda/ +.conda-bld/ +.ipynb_checkpoints/ +test-results/ _skbuild/ -cufile.log - -## Patching -*.diff -*.orig -*.rej - -## C++ build directories & artifacts -CMakeFiles/ -Debug -build/ - -## Eclipse IDE -.project -.cproject -.settings - -## IntelliJ IDE -.idea/ -.idea_modules/ -*.iml -*.ipr -*.iws -.pydevproject - -## CLion -.idea/ -cmake-build-debug/ - -# Jupyter Notebooks -.ipynb_checkpoints - -## Doxygen -cpp/doxygen/html - - -# Sphinx docs & build artifacts -docs/wholegraph/source/api_docs/api/* -# others -local_scripts/ -build -*pyc -compile_commands.json -docker_run.bash -.devcontainer \ No newline at end of file +cpp/.idea/ +cpp/cmake-build-debug/ +pylibwholegraph/.idea/ +pylibwholegraph/cmake-build-debug/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..5517db2d4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,103 @@ +# This file is a template, and might need editing before it works on your project. +# This is a sample GitLab CI/CD configuration file that should run without any modifications. +# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts, +# it uses echo commands to simulate the pipeline execution. +# +# A pipeline is composed of independent jobs that run scripts, grouped into stages. +# Stages run in sequential order, but jobs within stages run in parallel. +# +# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages +# +# You can copy and paste this template into a new `.gitlab-ci.yml` file. +# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword. +# +# To contribute improvements to CI/CD templates, please follow the Development guide at: +# https://docs.gitlab.com/ee/development/cicd/templates.html +# This specific template is located at: +# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml + +stages: # List of stages for jobs, and their order of execution + - build + +build-job: # This job runs in the build stage, which runs first. + tags: + - dongxuy + image: nvcr.io/nvidian/sae/manylinux2014_manytorch:cuda11.5 + stage: build + script: + - echo "Compiling cpp code..." + - cd cpp + - mkdir -p build + - cd build + - cmake -DCMAKE_INSTALL_PREFIX=`pwd`/install ../ + - make -j + - echo "Compile cpp complete." + - echo "Testing cpp code." + - make test + - echo "Test cpp code done." + - echo "Installing cpp library" + - make install + - echo "Install cpp library done." + - cd ../.. + - echo "Start building Python and PyTorch..." + - export LIBWHOLEGRAPH_DIR=`pwd`/cpp/build/install + - cd pylibwholegraph + - mkdir all_build + - cd all_build + - echo "Building for Python 3.6m" + - mkdir build_cp36m + - cd build_cp36m + - export WG_PYTHON_BIN=/opt/python/cp36-cp36m/bin/python3 + - cmake -DBUILD_PYTHON_EXE=${WG_PYTHON_BIN} ../../ + - make -j + - ln -s `pwd`/pylibwholegraph/binding/wholememory_binding.cpython* ../../pylibwholegraph/binding/ + - ls -l ../../pylibwholegraph/binding/ + - PYTHONPATH=../../:$PYTHONPATH ${WG_PYTHON_BIN} -m pytest -v --forked ../../tests/ + - cd .. + - echo "Building for Python 3.7m" + - mkdir build_cp37m + - cd build_cp37m + - export WG_PYTHON_BIN=/opt/python/cp37-cp37m/bin/python3 + - cmake -DBUILD_PYTHON_EXE=${WG_PYTHON_BIN} ../../ + - make -j + - ln -s `pwd`/pylibwholegraph/binding/wholememory_binding.cpython* ../../pylibwholegraph/binding/ + - PYTHONPATH=../../:$PYTHONPATH ${WG_PYTHON_BIN} -m pytest -v --forked ../../tests/ + - cd .. + - echo "Building for Python 3.8" + - mkdir build_cp38 + - cd build_cp38 + - export WG_PYTHON_BIN=/opt/python/cp38-cp38/bin/python3 + - cmake -DBUILD_PYTHON_EXE=${WG_PYTHON_BIN} ../../ + - make -j + - ln -s `pwd`/pylibwholegraph/binding/wholememory_binding.cpython* ../../pylibwholegraph/binding/ + - PYTHONPATH=../../:$PYTHONPATH ${WG_PYTHON_BIN} -m pytest -v --forked ../../tests/ + - cd .. + - echo "Building for Python 3.9" + - mkdir build_cp39 + - cd build_cp39 + - export WG_PYTHON_BIN=/opt/python/cp39-cp39/bin/python3 + - cmake -DBUILD_PYTHON_EXE=${WG_PYTHON_BIN} ../../ + - make -j + - ln -s `pwd`/pylibwholegraph/binding/wholememory_binding.cpython* ../../pylibwholegraph/binding/ + - PYTHONPATH=../../:$PYTHONPATH ${WG_PYTHON_BIN} -m pytest -v --forked ../../tests/ + - cd .. + - echo "Building for Python 3.10" + - mkdir build_cp310 + - cd build_cp310 + - export WG_PYTHON_BIN=/opt/python/cp310-cp310/bin/python3 + - cmake -DBUILD_PYTHON_EXE=${WG_PYTHON_BIN} ../../ + - make -j + - ln -s `pwd`/pylibwholegraph/binding/wholememory_binding.cpython* ../../pylibwholegraph/binding/ + - PYTHONPATH=../../:$PYTHONPATH ${WG_PYTHON_BIN} -m pytest -v --forked ../../tests/ + - cd .. + - echo "Building for Python 3.11" + - mkdir build_cp311 + - cd build_cp311 + - export WG_PYTHON_BIN=/opt/python/cp311-cp311/bin/python3 + - cmake -DBUILD_PYTHON_EXE=${WG_PYTHON_BIN} ../../ + - make -j + - ln -s `pwd`/pylibwholegraph/binding/wholememory_binding.cpython* ../../pylibwholegraph/binding/ + - PYTHONPATH=../../:$PYTHONPATH ${WG_PYTHON_BIN} -m pytest -v --forked ../../tests/ + - cd .. + - echo "Done build for all Python version" + - cd ../.. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..17473f511 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,42 @@ +## https://pre-commit.com/ +# +# Before first use: `pre-commit install` +# To run: `pre-commit run --all-files` +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-added-large-files + - id: debug-statements + - id: mixed-line-ending + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + - id: end-of-file-fixer + - repo: https://github.com/PyCQA/flake8 + rev: 6.0.0 + hooks: + - id: flake8 + args: ["--config=.flake8"] + exclude: | + (?x)^( + scripts + ) + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v16.0.0 + hooks: + - id: clang-format + exclude: | + (?x)^( + scripts/checks/__clang_cuda_additional_intrinsics.h + ) + types_or: [c, c++, cuda] + args: ["-fallback-style=none", "-style=file", "-i"] + - repo: local + hooks: + - id: copyright-check + name: copyright-check + entry: python3 ./scripts/checks/copyright.py --update-current-year + #entry: python3 ./scripts/checks/copyright.py --git-modified-only --update-current-year + language: python + pass_filenames: false + additional_dependencies: [gitpython] diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 420e36383..000000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -cmake_minimum_required(VERSION 3.23.1) - -include(./fetch_rapids.cmake) -include(rapids-cmake) -include(rapids-cpm) -include(rapids-cuda) -include(rapids-export) -include(rapids-find) - -if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES) - set(CMAKE_CUDA_ARCHITECTURES 70-real 75-real 80-real 86) -endif () -rapids_cuda_init_architectures(WHOLEGRAPH) -project(wholegraph CXX CUDA) -set(CMAKE_CXX_STANDARD 14) - -# PyTorch Option -set(_WHOLEGRAPH_BUILD_PYTORCH ON) -if (NOT DEFINED WHOLEGRAPH_BUILD_PYTORCH) - set(WHOLEGRAPH_BUILD_PYTORCH ${_WHOLEGRAPH_BUILD_PYTORCH} CACHE BOOL "Build PyTorch support") -endif () -set(WHOLEGRAPH_NEED_PYTHON ${WHOLEGRAPH_BUILD_PYTORCH}) - -# Test Option -set(_WHOLEGRAPH_ENABLE_TESTS ON) -if (NOT DEFINED WHOLEGRAPH_ENABLE_TESTS) - set(WHOLEGRAPH_ENABLE_TESTS ${_WHOLEGRAPH_ENABLE_TESTS} CACHE BOOL "Enable Tests") - message(STATUS "Setting WHOLEGRAPH_ENABLE_TESTS to ${_WHOLEGRAPH_ENABLE_TESTS}") -endif () - -rapids_cmake_build_type(RelWithDebInfo) - -# enable assert in RelWithDebInfo build type -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g") -message(STATUS "CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}") - -# Thread library -find_package(Threads) - -# CUDA -find_package(CUDAToolkit REQUIRED 11.0) - -# NCCL -include(${PROJECT_SOURCE_DIR}/cmake/thirdparty/get_nccl.cmake) - -set(USE_CXX11_ABI TRUE) - -if (WHOLEGRAPH_NEED_PYTHON) - # PYTHON - find_package(Python 3.6 COMPONENTS Interpreter REQUIRED) - set(PY_EXE ${Python_EXECUTABLE}) - message(STATUS "Using python ${Python_EXECUTABLE}") - - find_package(PythonLibs 3.6 REQUIRED) - include_directories(${PYTHON_INCLUDE_DIRS}) - message(STATUS "Using python include dirs ${PYTHON_INCLUDE_DIRS}") - - # pybind11 - find_package(pybind11 CONFIG REQUIRED) - - # Get Python suffix - execute_process(COMMAND ${PY_EXE} -c "import sysconfig; print(next(x for x in [sysconfig.get_config_var('EXT_SUFFIX'), sysconfig.get_config_var('SO'), '.so'] if x))" - OUTPUT_VARIABLE Python_SUFFIX OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) - - if (WHOLEGRAPH_BUILD_PYTORCH) - # Find PyTorch - # Get PyTorch cmake path - execute_process(COMMAND ${PY_EXE} -c "import torch.utils; print(torch.utils.cmake_prefix_path)" - OUTPUT_VARIABLE TORCH_CMAKE_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) - set(Torch_ROOT "${TORCH_CMAKE_PREFIX}/Torch") - set(TORCH_CUDA_ARCH_LIST "7.0;7.5;8.0;8.6") - find_package(Torch "1.9.0" "REQUIRED") - execute_process(COMMAND ${PY_EXE} -c "from torch.utils.cpp_extension import CUDAExtension as ext; e = ext('', []); print(';'.join(e.library_dirs))" - OUTPUT_VARIABLE Torch_LIBRARY_DIRS OUTPUT_STRIP_TRAILING_WHITESPACE) - string(REGEX REPLACE "No CUDA runtime[^\n]*\n?" "" Torch_LIBRARY_DIRS "${Torch_LIBRARY_DIRS}") - execute_process(COMMAND ${PY_EXE} -c "from torch.utils.cpp_extension import CUDAExtension as ext; e = ext('', []); print(';'.join(e.libraries))" - OUTPUT_VARIABLE _Torch_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE) - string(REGEX REPLACE "No CUDA runtime[^\n]*\n?" "" _Torch_LIBRARIES "${_Torch_LIBRARIES}") - foreach (_TLIB IN LISTS _Torch_LIBRARIES) - find_library(FOUND_LIB_${_TLIB} - NAMES ${_TLIB} - HINTS ${Torch_LIBRARY_DIRS}) - list(APPEND TORCH_LIBRARIES ${FOUND_LIB_${_TLIB}}) - endforeach () - if (NOT TORCH_FOUND) - message(FATAL_ERROR "Torch not found.") - return() - endif () - execute_process(COMMAND ${PY_EXE} -c "import torch; print(torch.torch.compiled_with_cxx11_abi())" - OUTPUT_VARIABLE Torch_CXX11 OUTPUT_STRIP_TRAILING_WHITESPACE) - string(TOUPPER ${Torch_CXX11} Torch_CXX11) - message(STATUS "Torch_CXX11: ${Torch_CXX11}") - set(USE_CXX11_ABI ${Torch_CXX11}) - endif() - -endif () - -add_library(whole_graph STATIC "") -target_sources(whole_graph PRIVATE - ${PROJECT_SOURCE_DIR}/wholegraph/whole_memory.cc - ${PROJECT_SOURCE_DIR}/wholegraph/cuda_env_fns.cc - ${PROJECT_SOURCE_DIR}/wholegraph/file_utils.cc - ${PROJECT_SOURCE_DIR}/wholegraph/parallel_utils.cc - ${PROJECT_SOURCE_DIR}/wholegraph/whole_memory_embedding.cu - ${PROJECT_SOURCE_DIR}/wholegraph/whole_memory_memcpy.cu - ${PROJECT_SOURCE_DIR}/wholegraph/whole_memory_graph.cu - ${PROJECT_SOURCE_DIR}/wholegraph/graph_builder.cu - ${PROJECT_SOURCE_DIR}/wholegraph/whole_graph_sampler.cu - ${PROJECT_SOURCE_DIR}/wholegraph/whole_graph_weighted_sampler.cu - ${PROJECT_SOURCE_DIR}/wholegraph/whole_graph_subgraph_extractor.cu - ${PROJECT_SOURCE_DIR}/wholegraph/whole_graph_negative_sampler.cu - ${PROJECT_SOURCE_DIR}/wholegraph/gnn_ops.cu - ${PROJECT_SOURCE_DIR}/wholegraph/bootstrap_communicator.cc - ) - -target_include_directories(whole_graph PUBLIC ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/wholegraph) -set_property(TARGET whole_graph PROPERTY POSITION_INDEPENDENT_CODE ON) -target_compile_definitions(whole_graph PUBLIC -D_FILE_OFFSET_BITS=64) -if (${USE_CXX11_ABI}) - message(STATUS "Using CXX ABI = 1") - target_compile_definitions(whole_graph PUBLIC -D_GLIBCXX_USE_CXX11_ABI=1) -else() - message(STATUS "Using CXX ABI = 0") - target_compile_definitions(whole_graph PUBLIC -D_GLIBCXX_USE_CXX11_ABI=0) -endif() - -target_link_libraries(whole_graph PRIVATE CUDA::cuda_driver NCCL::NCCL) -target_link_libraries(whole_graph PUBLIC CUDA::cudart) - -if (WHOLEGRAPH_BUILD_PYTORCH) - message(STATUS "Building PyTorch support library") - add_subdirectory(wholegraph/torch) -endif () - -if (WHOLEGRAPH_ENABLE_TESTS) - message(STATUS "Test enabled") - add_subdirectory(test) -endif () diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 9e7cc8ee8..000000000 --- a/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM nvcr.io/nvidia/pytorch:21.09-py3 -RUN pip3 install ogb pyyaml mpi4py -RUN apt-get update && apt install -y gdb pybind11-dev git - -RUN FORCE_CUDA=1 pip3 install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -RUN git clone --recurse-submodules https://github.com/dmlc/dgl.git -b 0.8.2 -RUN cd dgl && \ - mkdir build && \ - cd build && \ - cmake -DUSE_CUDA=ON -DUSE_NCCL=ON -DBUILD_TORCH=ON .. && \ - make -j && \ - cd ../python && \ - python setup.py install -ENV USE_TORCH_ALLOC 1 - -RUN pip3 install torchmetrics -RUN conda install -y 'cmake>=3.23.1,!=3.25.0' diff --git a/README.md b/README.md index acc6fd968..7a202e37e 100644 --- a/README.md +++ b/README.md @@ -1,42 +1 @@ -# WholeGraph - -WholeGraph is developed to help train large-scale Graph Neural Networks(GNN). - -The software stack of WholeGraph shown below: - -![WholeGraph](docs/imgs/whole_graph_stack.png) - -Based on CUDA and NVIDIA's hardware, a multi-GPU storage called [WholeMemory](docs/WholeMemoryIntroduction.md) is implemented. -WholeMemory is used to support both graph structure and feature embedding storage. -Based on the storage, WholeGraph Ops are built to support GNN applications, including sampling ops, embedding ops and some GNN layer ops -On the other hand, sampled subgraph from WholeGraph can also be converted to support PyG or DGL layers. -So, GNN applications can utilize ops from WholeGraph and other GNN frameworks. - -## How to Use - -### Environment - -#### Hardware - -It is suggested to use NVLink systems, like DGX-A100 or similar systems. - -#### Software - -It is recommended to use our [Dockerfile](Dockerfile) - -### Compile - -To compile WholeGraph, from source directory: - -```shell script -mkdir build -cd build -cmake ../ -make -j -``` - -Or you can build release version by replacing `cmake ../` by `cmake -DCMAKE_BUILD_TYPE=Release ..`, which has slightly better performance. - -### Examples - -Checkout [GNN example](docs/GNNExample.md) for more details. +# rapids-wholegraph diff --git a/build_component.sh b/build_component.sh new file mode 100755 index 000000000..a3014bddc --- /dev/null +++ b/build_component.sh @@ -0,0 +1,199 @@ +#!/bin/bash + +# Copyright (c) 2019-2023, NVIDIA CORPORATION. + +# wholegraph build script for single components + +# This script is used to build single components in this repo from +# source, and can be called with various options to customize the +# build as needed (see the help output for details) + +# Abort script on first error +set -e + +NUMARGS=$# +ARGS=$* + +# NOTE: ensure all dir changes are relative to the location of this +# script, and that this script resides in the repo dir! +REPODIR=$(cd $(dirname $0); pwd) + +VALIDARGS="clean libwholegraph tests " +VALIDARGS+="pylibwholegraph -v -g -n " +VALIDARGS+="--native --cmake-args --compile-cmd -h --help" +HELP="$0 [ ...] [ ...] + where is: + clean - remove all existing build artifacts and configuration (start over). + libwholegraph - build the libwholegraph C++ library. + tests - build the C++ (OPG) tests. + benchmarks - build benchmarks. + pylibwholegraph - build the pylibwholegraph Python package. + and is: + -v - verbose build mode + -g - build for debug + -n - no install step + --native - build for the GPU architecture of the current system + --cmake-args=\\\"\\\" - add arbitrary CMake arguments to any cmake call + --compile-cmd - only output compile commands (invoke CMake without build) + -h | --h[elp] - print this text +" +LIBWHOLEGRAPH_BUILD_DIR=${REPODIR}/build +PYLIBWHOLEGRAPH_BUILD_DIRS="${REPODIR}/pylibwholegraph/build" +PYLIBWHOLEGRAPH_BUILD_DIRS+=" ${REPODIR}/pylibwholegraph/_skbuild" +PYLIBWHOLEGRAPH_BUILD_DIRS+=" ${REPODIR}/pylibwholegraph/pylibwholegraph/binding/include" +PYLIBWHOLEGRAPH_BUILD_DIRS+=" ${REPODIR}/pylibwholegraph/pylibwholegraph/binding/lib" +BUILD_DIRS="${LIBWHOLEGRAPH_BUILD_DIR} ${PYLIBWHOLEGRAPH_BUILD_DIRS}" + +# Set defaults for vars modified by flags to this script +VERBOSE_FLAG="" +BUILD_TYPE=Release +BUILD_ALL_GPU_ARCH=1 +INSTALL_TARGET="--target install" + +# Set defaults for vars that may not have been defined externally +# FIXME: if INSTALL_PREFIX is not set, check PREFIX, then check +# CONDA_PREFIX, but there is no fallback from there! +INSTALL_PREFIX=${INSTALL_PREFIX:=${PREFIX:=${CONDA_PREFIX}}} +PARALLEL_LEVEL=${PARALLEL_LEVEL:=""} + +export CMAKE_GENERATOR="${CMAKE_GENERATOR:=Ninja}" + +function hasArg { + (( ${NUMARGS} != 0 )) && (echo " ${ARGS} " | grep -q " $1 ") +} + +function cmakeArgs { + # Check for multiple cmake args options + if [[ $(echo $ARGS | { grep -Eo "\-\-cmake\-args" || true; } | wc -l ) -gt 1 ]]; then + echo "Multiple --cmake-args options were provided, please provide only one: ${ARGS}" + exit 1 + fi + + # Check for cmake args option + if [[ -n $(echo $ARGS | { grep -E "\-\-cmake\-args" || true; } ) ]]; then + # There are possible weird edge cases that may cause this regex filter to output nothing and fail silently + # the true pipe will catch any weird edge cases that may happen and will cause the program to fall back + # on the invalid option error + EXTRA_CMAKE_ARGS=$(echo $ARGS | { grep -Eo "\-\-cmake\-args=\".+\"" || true; }) + if [[ -n ${EXTRA_CMAKE_ARGS} ]]; then + # Remove the full EXTRA_CMAKE_ARGS argument from list of args so that it passes validArgs function + ARGS=${ARGS//$EXTRA_CMAKE_ARGS/} + # Filter the full argument down to just the extra string that will be added to cmake call + EXTRA_CMAKE_ARGS=$(echo $EXTRA_CMAKE_ARGS | grep -Eo "\".+\"" | sed -e 's/^"//' -e 's/"$//') + fi + fi +} + +if hasArg -h || hasArg --h || hasArg --help; then + echo "${HELP}" + exit 0 +fi + +# Check for valid usage +if (( ${NUMARGS} != 0 )); then + # Check for cmake args + cmakeArgs + for a in ${ARGS}; do + if ! (echo " ${VALIDARGS} " | grep -q " ${a} "); then + echo "Invalid option: ${a}" + exit 1 + fi + done +fi + +# Process flags +if hasArg -v; then + VERBOSE_FLAG=-v +fi +if hasArg -g; then + BUILD_TYPE=Debug +fi +if hasArg -n; then + INSTALL_TARGET="" +fi +if hasArg --native; then + BUILD_ALL_GPU_ARCH=0 +fi + +# If clean given, run it prior to any other steps +if hasArg clean; then + # If the dirs to clean are mounted dirs in a container, the + # contents should be removed but the mounted dirs will remain. + # The find removes all contents but leaves the dirs, the rmdir + # attempts to remove the dirs but can fail safely. + for bd in ${BUILD_DIRS}; do + if [ -d ${bd} ]; then + find ${bd} -mindepth 1 -delete + rmdir ${bd} || true + fi + done + # remove any left-over cpython shared libraries + find ${REPODIR}/pylibwholegraph -name "*.cpython*.so" -type f -delete +fi + +# set values based on flags +if (( ${BUILD_ALL_GPU_ARCH} == 0 )); then + WHOLEGRAPH_CMAKE_CUDA_ARCHITECTURES="${WHOLEGRAPH_CMAKE_CUDA_ARCHITECTURES:=NATIVE}" + echo "Building for the architecture of the GPU in the system..." +else + WHOLEGRAPH_CMAKE_CUDA_ARCHITECTURES="70-real;75-real;80-real;86-real;90" + echo "Building for *ALL* supported GPU architectures..." +fi +if hasArg tests; then + BUILD_TESTS=ON +else + BUILD_TESTS=OFF +fi +if hasArg benchmarks; then + BUILD_BENCHMARKS=ON +else + BUILD_BENCHMARKS=OFF +fi + +################################################################################ +# libwholegraph +if hasArg libwholegraph; then + cmake -S ${REPODIR}/cpp -B ${LIBWHOLEGRAPH_BUILD_DIR} \ + -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ + -DCMAKE_CUDA_ARCHITECTURES=${WHOLEGRAPH_CMAKE_CUDA_ARCHITECTURES} \ + -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ + -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} \ + -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE \ + -DBUILD_TESTS=${BUILD_TESTS} \ + ${EXTRA_CMAKE_ARGS} + + cd ${LIBWHOLEGRAPH_BUILD_DIR} + + if ! hasArg --compile-cmd; then + ## Build and (optionally) install library + tests + cmake --build . -j${PARALLEL_LEVEL} ${INSTALL_TARGET} ${VERBOSE_FLAG} + fi +fi + +################################################################################ +# pylibwholegraph +if hasArg pylibwholegraph; then + # setup.py and cmake reference an env var LIBWHOLEGRAPH_DIR to find the + # libwholegraph package (cmake). + # If not set by the user, set it to LIBWHOLEGRAPH_BUILD_DIR + LIBWHOLEGRAPH_DIR=${LIBWHOLEGRAPH_DIR:=${LIBWHOLEGRAPH_BUILD_DIR}} + if ! hasArg --compile-cmd; then + cd ${REPODIR}/pylibwholegraph + env LIBWHOLEGRAPH_DIR=${LIBWHOLEGRAPH_DIR} \ + ${PYTHON} setup.py build_ext --inplace \ + --build-type=${BUILD_TYPE} \ + ${EXTRA_CMAKE_ARGS} + if ! hasArg -n; then + env LIBWHOLEGRAPH_DIR=${LIBWHOLEGRAPH_DIR} \ + ${PYTHON} setup.py install \ + --build-type=${BUILD_TYPE} \ + ${EXTRA_CMAKE_ARGS} + fi + else + # just invoke cmake without going through scikit-build + env LIBWHOLEGRAPH_DIR=${LIBWHOLEGRAPH_DIR} \ + cmake -S ${REPODIR}/pylibwholegraph -B ${REPODIR}/pylibwholegraph/_skbuild/build \ + -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ + ${EXTRA_CMAKE_ARGS} + fi +fi diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh new file mode 100644 index 000000000..45e668af1 --- /dev/null +++ b/ci/build_cpp.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright (c) 2022-2023, NVIDIA CORPORATION. + +set -euo pipefail + +source rapids-env-update + +export CMAKE_GENERATOR=Ninja + +rapids-print-env + +rapids-logger "Begin cpp build" + +rapids-mamba-retry mambabuild conda/recipes/libwholegraph + +rapids-upload-conda-to-s3 cpp diff --git a/ci/build_docs.sh b/ci/build_docs.sh new file mode 100644 index 000000000..89c2c6409 --- /dev/null +++ b/ci/build_docs.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Copyright (c) 2023, NVIDIA CORPORATION. + +set -euo pipefail + +rapids-logger "Create test conda environment" +. /opt/conda/etc/profile.d/conda.sh + +rapids-dependency-file-generator \ + --output conda \ + --file_key docs \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml + +rapids-mamba-retry env create --force -f env.yaml -n docs +# Temporarily allow unbound variables for conda activation. +set +u +conda activate docs +set -u + +rapids-print-env + +#rapids-logger "Downloading artifacts from previous jobs" +# +#CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) +#PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) +#VERSION_NUMBER="23.06" + +#rapids-mamba-retry install \ +# --channel "${CPP_CHANNEL}" \ +# --channel "${PYTHON_CHANNEL}" \ +#libwholegraph pylibwholegraph + +rapids-logger "Build Doxygen docs" +pushd cpp +doxygen Doxyfile +popd + +#rapids-logger "Build Sphinx docs" +#pushd docs +#sphinx-build -b dirhtml ./source html -W +#sphinx-build -b text ./source text -W +#popd +# +#if [[ "${RAPIDS_BUILD_TYPE}" == "branch" ]]; then +# rapids-logger "Upload Docs to S3" +# aws s3 sync --no-progress --delete cpp/html "s3://rapidsai-docs/libwholegraph/${VERSION_NUMBER}/html" +# aws s3 sync --no-progress --delete docs/html "s3://rapidsai-docs/pylibwholegraph/${VERSION_NUMBER}/html" +# aws s3 sync --no-progress --delete docs/text "s3://rapidsai-docs/pylibwholegraph/${VERSION_NUMBER}/txt" +#fi diff --git a/ci/build_python.sh b/ci/build_python.sh new file mode 100644 index 000000000..e316c94d0 --- /dev/null +++ b/ci/build_python.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# Copyright (c) 2022-2023, NVIDIA CORPORATION. + +set -euo pipefail + +source rapids-env-update + +export CMAKE_GENERATOR=Ninja + +rapids-print-env + +PACKAGES="libwholegraph" + +CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) + +rapids-mamba-retry install \ + --channel "${CPP_CHANNEL}" \ + "${PACKAGES}" + +rapids-logger "Begin py build" + +# TODO: Remove `--no-test` flags once importing on a CPU +# node works correctly +rapids-logger "Begin pylibwholegraph build" +rapids-mamba-retry mambabuild \ + --no-test \ + --channel "${CPP_CHANNEL}" \ + conda/recipes/pylibwholegraph + +rapids-upload-conda-to-s3 python diff --git a/ci/check_style.sh b/ci/check_style.sh new file mode 100644 index 000000000..79249611c --- /dev/null +++ b/ci/check_style.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright (c) 2020-2023, NVIDIA CORPORATION. + +set -euo pipefail + +rapids-logger "Create checks conda environment" +. /opt/conda/etc/profile.d/conda.sh + +rapids-dependency-file-generator \ + --output conda \ + --file_key checks \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml + +rapids-mamba-retry env create --force -f env.yaml -n checks +conda activate checks + +# Run pre-commit checks +pre-commit run --hook-stage manual --all-files --show-diff-on-failure diff --git a/ci/test_clang_tidy.sh b/ci/test_clang_tidy.sh new file mode 100644 index 000000000..8237746c9 --- /dev/null +++ b/ci/test_clang_tidy.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# Copyright (c) 2023, NVIDIA CORPORATION. + +set -euo pipefail + +rapids-logger "Create clang-tidy conda environment" +. /opt/conda/etc/profile.d/conda.sh + +rapids-logger "Generate clang-tidy testing dependencies" +rapids-dependency-file-generator \ + --output conda \ + --file_key clang_tidy \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" | tee env.yaml + +rapids-mamba-retry env create --force -f env.yaml -n clang_tidy +# Temporarily allow unbound variables for conda activation. +set +u +conda activate clang_tidy +set -u + +rapids-print-env + +env PATH=${PATH}:/usr/local/cuda/bin + +# we do this in two separate parts, one for the library and tests +# and a second one for the bindings, where we can add torch bindings regardless +# of the ABI for library / tests. We'll ignore the generated database for the +# library in the second run. +CMAKE_EXTRA_ARGS="--cmake-args=\"-DBUILD_OPS_WITH_TORCH_C10_API=OFF\"" +rapids-logger "Generate compilation databases for C++ library and tests" +./build_component.sh clean libwholegraph tests pylibwholegraph --compile-cmd ${CMAKE_EXTRA_ARGS} + +# -git_modified_only -v +rapids-logger "Run clang-tidy" +python scripts/checks/run-clang-tidy.py \ + -ignore wholememory_binding \ + build/compile_commands.json \ + pylibwholegraph/_skbuild/build/compile_commands.json \ + -v diff --git a/ci/test_cpp.sh b/ci/test_cpp.sh new file mode 100644 index 000000000..e120d85e3 --- /dev/null +++ b/ci/test_cpp.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright (c) 2022-2023, NVIDIA CORPORATION. + +set -e # abort the script on error +set -o pipefail # piped commands propagate their error +set -E # ERR traps are inherited by subcommands +trap "EXITCODE=1" ERR +EXITCODE=0 +. /opt/conda/etc/profile.d/conda.sh + +rapids-logger "Generate C++ testing dependencies" +rapids-dependency-file-generator \ + --output conda \ + --file_key test_cpp \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" | tee env.yaml + +rapids-mamba-retry env create --force -f env.yaml -n test + +# Temporarily allow unbound variables for conda activation. +set +u +conda activate test +set -u + +CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) +RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/ +mkdir -p "${RAPIDS_TESTS_DIR}" + +rapids-print-env + +PACKAGES="libwholegraph libwholegraph-tests" + +rapids-mamba-retry install \ + --channel "${CPP_CHANNEL}" \ + "${PACKAGES}" + +rapids-logger "Check GPU usage" +nvidia-smi + +set +e + +# Run libwholegraph tests from libwholegraph-tests package +rapids-logger "Run tests" +INSTALLED_TEST_PATH=${CONDA_PREFIX}/bin/gtests/libwholegraph + +for file in "${INSTALLED_TEST_PATH}"/*; do + if [[ -x "$file" ]]; then + rapids-logger "Running: $file" + "$file" + exit_code=$? + + if [[ $exit_code -ne 0 ]]; then + echo "Test $file returned a non-zero exit code: $exit_code" + exit $exit_code + fi + fi +done + +exit 0 diff --git a/ci/test_python.sh b/ci/test_python.sh new file mode 100644 index 000000000..26c9e93ac --- /dev/null +++ b/ci/test_python.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# Copyright (c) 2022-2023, NVIDIA CORPORATION. + +set -e # abort the script on error +set -o pipefail # piped commands propagate their error +set -E # ERR traps are inherited by subcommands +trap "EXITCODE=1" ERR +EXITCODE=0 +. /opt/conda/etc/profile.d/conda.sh + +ARCH=$(arch) +rapids-logger "Generate Python testing dependencies" +rapids-dependency-file-generator \ + --output conda \ + --file_key test_python \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=${ARCH};py=${RAPIDS_PY_VERSION}" | tee env.yaml + +rapids-mamba-retry env create --force -f env.yaml -n test + +# Temporarily allow unbound variables for conda activation. +set +u +conda activate test +set -u + +rapids-logger "Downloading artifacts from previous jobs" +CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) +PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) + +RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"} +RAPIDS_COVERAGE_DIR=${RAPIDS_COVERAGE_DIR:-"${PWD}/coverage-results"} +mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}" + +rapids-print-env + +PACKAGES="pylibwholegraph" + +rapids-mamba-retry install \ + --channel "${CPP_CHANNEL}" \ + --channel "${PYTHON_CHANNEL}" \ + "${PACKAGES}" + +rapids-logger "Check GPU usage" +nvidia-smi + +set +e + +rapids-logger "pytest pylibwholegraph" +pushd pylibwholegraph/tests/ +pytest \ + --cache-clear \ + --forked \ + pylibwholegraph/ wholegraph_torch/ops/test_wholegraph_gather_scatter.py +popd + +echo "test_python is exiting with value: ${EXITCODE}" +exit ${EXITCODE} diff --git a/cmake/CodeChecker.cmake b/cmake/CodeChecker.cmake new file mode 100644 index 000000000..0b223cac7 --- /dev/null +++ b/cmake/CodeChecker.cmake @@ -0,0 +1,56 @@ +# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +function(add_code_checks) + set(options "") + set(oneValueArgs CWD CLANG_FORMAT CLANG_TIDY FLAKE8) + set(multiValueArgs "") + cmake_parse_arguments(code_checker + "${options}" "${oneValueArgs}" "${multiValueArgs}" + ${ARGN}) + + # clang format checker + add_custom_target(clang-format + python scripts/run-clang-format.py + -exe ${code_checker_CLANG_FORMAT} + WORKING_DIRECTORY ${code_checker_CWD} + VERBATIM + COMMENT "Checks for code formatting using clang-format") + + # clang format inplace fixer + add_custom_target(fix-clang-format + python scripts/run-clang-format.py + -inplace + -exe ${code_checker_CLANG_FORMAT} + WORKING_DIRECTORY ${code_checker_CWD} + VERBATIM + COMMENT "Fixes any code formatting issues using clang-format") + + # clang tidy checker + add_custom_target(clang-tidy + python scripts/run-clang-tidy.py + -cdb ${PROJECT_BINARY_DIR}/compile_commands.json + -exe ${code_checker_CLANG_TIDY} + WORKING_DIRECTORY ${code_checker_CWD} + VERBATIM + COMMENT "Checks for coding conventions using clang-tidy") + + # flake8 + add_custom_target(flake8 + ${code_checker_FLAKE8} --exclude build* + WORKING_DIRECTORY ${code_checker_CWD} + VERBATIM + COMMENT "Checks for python coding conventions using flake8") +endfunction(add_code_checks) diff --git a/cmake/doxygen.cmake b/cmake/doxygen.cmake new file mode 100644 index 000000000..677593012 --- /dev/null +++ b/cmake/doxygen.cmake @@ -0,0 +1,55 @@ +# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +find_package(Doxygen 1.8.11) + +function(add_doxygen_target) + if(DOXYGEN_FOUND) + if(NOT ${DOXYGEN_DOT_EXECUTABLE}) + set(DOXYGEN_DOT_EXECUTABLE "") + endif() + set(options "") + set(oneValueArgs IN_DOXYFILE OUT_DOXYFILE OUT_DIR CWD) + set(multiValueArgs DEP_TARGETS) + cmake_parse_arguments(dox + "${options}" "${oneValueArgs}" "${multiValueArgs}" + ${ARGN}) + configure_file(${dox_IN_DOXYFILE} ${dox_OUT_DOXYFILE} @ONLY) + + file(MAKE_DIRECTORY ${dox_OUT_DIR}) + # add any extra files related to Doxygen documentation here! + SET(doxy_extra_files) + cmake_path(SET OUT_INDEXFILE "${dox_OUT_DIR}") + cmake_path(APPEND OUT_INDEXFILE "index.html") + + add_custom_command( + OUTPUT ${OUT_INDEXFILE} + COMMAND ${DOXYGEN_EXECUTABLE} ${dox_OUT_DOXYFILE} + # see https://451.sh/post/cmake-doxygen-improved/ for further explanation + MAIN_DEPENDENCY ${dox_OUT_DOXYFILE} ${dox_IN_DOXYFILE} + # add any extra files related to Doxygen documentation here! + DEPENDS ${dox_DEP_TARGETS} ${doxy_extra_files} + COMMENT "Generating doxygen docs" + WORKING_DIRECTORY ${dox_CWD} + VERBATIM + ) + + add_custom_target(doxygen ALL DEPENDS ${OUT_INDEXFILE} + COMMENT "Generate doxygen docs") + + else() + message("add_doxygen_target: doxygen exe not found") + endif() +endfunction(add_doxygen_target) diff --git a/cmake/thirdparty/get_gtest.cmake b/cmake/thirdparty/get_gtest.cmake new file mode 100644 index 000000000..cdc2c5d88 --- /dev/null +++ b/cmake/thirdparty/get_gtest.cmake @@ -0,0 +1,24 @@ +#============================================================================= +# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#============================================================================= + +function(find_and_configure_gtest) + + include(${rapids-cmake-dir}/cpm/gtest.cmake) + rapids_cpm_gtest() + +endfunction() + +find_and_configure_gtest() diff --git a/cmake/thirdparty/get_nccl.cmake b/cmake/thirdparty/get_nccl.cmake index 04c006de0..e4ff68af1 100644 --- a/cmake/thirdparty/get_nccl.cmake +++ b/cmake/thirdparty/get_nccl.cmake @@ -1,4 +1,6 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. +#============================================================================= +# Copyright (c) 2021, NVIDIA CORPORATION. +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -10,17 +12,18 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +#============================================================================= function(find_and_configure_nccl) - if(TARGET nccl::nccl) + if(TARGET NCCL::NCCL) return() endif() rapids_find_generate_module(NCCL - HEADER_NAMES nccl.h - LIBRARY_NAMES nccl - ) + HEADER_NAMES nccl.h + LIBRARY_NAMES nccl + ) # Currently NCCL has no CMake build-system so we require # it built and installed on the machine already @@ -29,5 +32,3 @@ function(find_and_configure_nccl) endfunction() find_and_configure_nccl() - - diff --git a/cmake/thirdparty/get_raft.cmake b/cmake/thirdparty/get_raft.cmake new file mode 100644 index 000000000..9d116b4dd --- /dev/null +++ b/cmake/thirdparty/get_raft.cmake @@ -0,0 +1,66 @@ +#============================================================================= +# Copyright (c) 2022, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#============================================================================= + +set(WHOLEGRAPH_MIN_VERSION_raft "${RAPIDS_VERSION}.00") +set(WHOLEGRAPH_BRANCH_VERSION_raft "${RAPIDS_VERSION}") + +function(find_and_configure_raft) + + set(oneValueArgs VERSION FORK PINNED_TAG CLONE_ON_PIN) + cmake_parse_arguments(PKG "" "${oneValueArgs}" "" ${ARGN} ) + + if(PKG_CLONE_ON_PIN AND NOT PKG_PINNED_TAG STREQUAL "branch-${WHOLEGRAPH_BRANCH_VERSION_raft}") + message("Pinned tag found: ${PKG_PINNED_TAG}. Cloning raft locally.") + set(CPM_DOWNLOAD_raft ON) + endif() + + rapids_cpm_find(raft ${PKG_VERSION} + GLOBAL_TARGETS raft::raft + BUILD_EXPORT_SET wholegraph-exports + INSTALL_EXPORT_SET wholegraph-exports + CPM_ARGS + EXCLUDE_FROM_ALL TRUE + GIT_REPOSITORY https://github.com/${PKG_FORK}/raft.git + GIT_TAG ${PKG_PINNED_TAG} + SOURCE_SUBDIR cpp + OPTIONS + "RAFT_COMPILE_LIBRARIES OFF" + "RAFT_COMPILE_DIST_LIBRARY OFF" + "BUILD_TESTS OFF" + "BUILD_BENCH OFF" + "RAFT_ENABLE_cuco_DEPENDENCY OFF" + ) + + if(raft_ADDED) + message(VERBOSE "WHOLEGRAPH: Using RAFT located in ${raft_SOURCE_DIR}") + else() + message(VERBOSE "WHOLEGRAPH: Using RAFT located in ${raft_DIR}") + endif() + +endfunction() + +# Change pinned tag and fork here to test a commit in CI +# To use a different RAFT locally, set the CMake variable +# CPM_raft_SOURCE=/path/to/local/raft +find_and_configure_raft(VERSION ${WHOLEGRAPH_MIN_VERSION_raft} + FORK rapidsai + PINNED_TAG branch-${WHOLEGRAPH_BRANCH_VERSION_raft} + + # When PINNED_TAG above doesn't match wholegraph, + # force local raft clone in build directory + # even if it's already installed. + CLONE_ON_PIN ON +) diff --git a/cmake/thirdparty/nanobind.cmake b/cmake/thirdparty/nanobind.cmake new file mode 100644 index 000000000..33ca2dd4e --- /dev/null +++ b/cmake/thirdparty/nanobind.cmake @@ -0,0 +1,58 @@ +#============================================================================= +# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#============================================================================= + +if (NOT SKBUILD) + message(WARNING "WHOLEGRAPH: This CMake file should be executed via scikit-build.") +endif() + +if (SKBUILD) + # Constrain FindPython to find the Python version used by scikit-build + set(Python_VERSION "${PYTHON_VERSION_STRING}") + set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}") + set(Python_INCLUDE_DIR "${PYTHON_INCLUDE_DIR}") + set(Python_LIBRARIES "${PYTHON_LIBRARY}") +elseif (MSVC) + # MSVC needs a little extra help finding the Python library + find_package(PythonInterp) + find_package(Python) +endif() + +find_package(Python COMPONENTS Interpreter Development REQUIRED) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(DEFAULT_CXX_FLAGS "") + +# reset the default flags if we have DEBUG_CXXFLAGS +if(CMAKE_BUILD_TYPE MATCHES Debug) + if (DEFINED ENV{DEBUG_CXXFLAGS}) + set(DEFAULT_CXX_FLAGS "$ENV{DEBUG_CXXFLAGS}") + separate_arguments(DEFAULT_CXX_FLAGS) + add_compile_options(${DEFAULT_CXX_FLAGS}) + endif() +endif() + +execute_process( + COMMAND + "${Python_EXECUTABLE}" -c "import nanobind; print(nanobind.cmake_dir())" + OUTPUT_VARIABLE _tmp_dir + OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ECHO STDOUT +) +message(STATUS "WHOLEGRAPH: nanobind dir='${_tmp_dir}'") +list(APPEND CMAKE_PREFIX_PATH "${_tmp_dir}") + +# Now import nanobind from CMake +find_package(nanobind CONFIG REQUIRED) diff --git a/conda/recipes/libwholegraph/build.sh b/conda/recipes/libwholegraph/build.sh new file mode 100644 index 000000000..579112791 --- /dev/null +++ b/conda/recipes/libwholegraph/build.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +# Copyright (c) 2021-2023, NVIDIA CORPORATION. + +./build_component.sh -n libwholegraph tests -v diff --git a/conda/recipes/libwholegraph/conda_build_config.yaml b/conda/recipes/libwholegraph/conda_build_config.yaml new file mode 100644 index 000000000..6f8813cc4 --- /dev/null +++ b/conda/recipes/libwholegraph/conda_build_config.yaml @@ -0,0 +1,14 @@ +c_compiler_version: + - 11 + +cxx_compiler_version: + - 11 + +cuda_compiler: + - nvcc + +cmake_version: + - ">=3.23.1,!=3.25.0" + +sysroot_version: + - "2.17" diff --git a/conda/recipes/libwholegraph/install_libwholegraph.sh b/conda/recipes/libwholegraph/install_libwholegraph.sh new file mode 100644 index 000000000..dbabc2796 --- /dev/null +++ b/conda/recipes/libwholegraph/install_libwholegraph.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# Copyright (c) 2022-2023, NVIDIA CORPORATION. + +cmake --install build diff --git a/conda/recipes/libwholegraph/install_libwholegraph_tests.sh b/conda/recipes/libwholegraph/install_libwholegraph_tests.sh new file mode 100644 index 000000000..48ec4242a --- /dev/null +++ b/conda/recipes/libwholegraph/install_libwholegraph_tests.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# Copyright (c) 2022-2023, NVIDIA CORPORATION. + +cmake --install build --component testing diff --git a/conda/recipes/libwholegraph/meta.yaml b/conda/recipes/libwholegraph/meta.yaml new file mode 100644 index 000000000..d016a88c6 --- /dev/null +++ b/conda/recipes/libwholegraph/meta.yaml @@ -0,0 +1,96 @@ +# Copyright (c) 2019-2023, NVIDIA CORPORATION. + +{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} +{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} +{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} +{% set cuda_major = cuda_version.split('.')[0] %} +{% set cuda_spec = ">=" + cuda_major ~ ",<" + (cuda_major | int + 1) ~ ".0a0" %} # i.e. >=11,<12.0a0 +{% set date_string = environ['RAPIDS_DATE_STRING'] %} + +package: + name: libwholegraph-split + +source: + git_url: ../../.. + +build: + script_env: + - AWS_ACCESS_KEY_ID + - AWS_SECRET_ACCESS_KEY + - AWS_SESSION_TOKEN + - BUILD_ABI + - CMAKE_C_COMPILER_LAUNCHER + - CMAKE_CUDA_COMPILER_LAUNCHER + - CMAKE_CXX_COMPILER_LAUNCHER + - CMAKE_GENERATOR + - PARALLEL_LEVEL + - SCCACHE_BUCKET + - SCCACHE_IDLE_TIMEOUT + - SCCACHE_REGION + - SCCACHE_S3_KEY_PREFIX=libwholegraph-aarch64 # [aarch64] + - SCCACHE_S3_KEY_PREFIX=libwholegraph-linux64 # [linux64] + - SCCACHE_S3_USE_SSL + - SCCACHE_S3_NO_CREDENTIALS + +# Here we duplicate the dependencies so conda will populate both _build_env +# and _h_env_placeholder directories. This is needed to run clang-tidy. +# We need both build and host, or conda will only use _h_env_placeholder +# directory, which is removed after a build. Having only _build_env is not +# enough as CMake will not search for dependencies in this directory. +# This needs to be removed once CI support from sources builds +requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - {{ compiler('cxx') }} + - cmake {{ cmake_version }} + - cudatoolkit ={{ cuda_version }} + - libraft-headers ={{ minor_version }} + - librmm ={{ minor_version }} + - ninja + - nccl + - doxygen =1.8.20 + - sysroot_{{ target_platform }} {{ sysroot_version }} + host: + - cmake {{ cmake_version }} + - cuda-nvtx ={{ cuda_version }} + - cudatoolkit ={{ cuda_version }} + - libraft-headers ={{ minor_version }} + - librmm ={{ minor_version }} + +outputs: + - name: libwholegraph + version: {{ version }} + script: install_libwholegraph.sh + build: + number: {{ GIT_DESCRIBE_NUMBER }} + string: cuda{{ cuda_major }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + ignore_run_exports_from: + - {{ compiler('cuda') }} + requirements: + build: + - cmake {{ cmake_version }} + run: + - cudatoolkit {{ cuda_spec }} + - libraft-headers ={{ minor_version }} + - librmm ={{ minor_version }} + - nccl + about: + home: https://rapids.ai/ + summary: libwholegraph library + - name: libwholegraph-tests + version: {{ version }} + script: install_libwholegraph_tests.sh + build: + number: {{ GIT_DESCRIBE_NUMBER }} + string: cuda{{ cuda_major }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + ignore_run_exports_from: + - {{ compiler('cuda') }} + requirements: + build: + - cmake {{ cmake_version }} + run: + - {{ pin_subpackage('libwholegraph', exact=True) }} + about: + home: https://rapids.ai/ + summary: libwholegraph tests diff --git a/conda/recipes/pylibwholegraph/build.sh b/conda/recipes/pylibwholegraph/build.sh new file mode 100644 index 000000000..1693e16a4 --- /dev/null +++ b/conda/recipes/pylibwholegraph/build.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# Copyright (c) 2022-2023, NVIDIA CORPORATION. + +CMAKE_EXTRA_ARGS="--cmake-args=\"-DBUILD_OPS_WITH_TORCH_C10_API=OFF\"" + +./build_component.sh pylibwholegraph -v ${CMAKE_EXTRA_ARGS} diff --git a/conda/recipes/pylibwholegraph/conda_build_config.yaml b/conda/recipes/pylibwholegraph/conda_build_config.yaml new file mode 100644 index 000000000..d7e3fb34b --- /dev/null +++ b/conda/recipes/pylibwholegraph/conda_build_config.yaml @@ -0,0 +1,17 @@ +c_compiler_version: + - 11 + +cxx_compiler_version: + - 11 + +cuda_compiler: + - nvcc + +cmake_version: + - ">=3.23.1,!=3.25.0" + +scikit_build_version: + - ">=0.13.1" + +sysroot_version: + - "2.17" diff --git a/conda/recipes/pylibwholegraph/meta.yaml b/conda/recipes/pylibwholegraph/meta.yaml new file mode 100644 index 000000000..9e07a913f --- /dev/null +++ b/conda/recipes/pylibwholegraph/meta.yaml @@ -0,0 +1,66 @@ +# Copyright (c) 2022-2023, NVIDIA CORPORATION. + +{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} +{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} +{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} +{% set cuda_major = cuda_version.split('.')[0] %} +{% set py_version = environ['CONDA_PY'] %} +{% set date_string = environ['RAPIDS_DATE_STRING'] %} + +package: + name: pylibwholegraph + version: {{ version }} + +source: + git_url: ../../.. + +build: + number: {{ GIT_DESCRIBE_NUMBER }} + string: cuda{{ cuda_major }}_py{{ py_version }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + script_env: + - AWS_ACCESS_KEY_ID + - AWS_SECRET_ACCESS_KEY + - AWS_SESSION_TOKEN + - CMAKE_C_COMPILER_LAUNCHER + - CMAKE_CUDA_COMPILER_LAUNCHER + - CMAKE_CXX_COMPILER_LAUNCHER + - CMAKE_GENERATOR + - PARALLEL_LEVEL + - RAPIDS_BUILD_TYPE + - SCCACHE_BUCKET + - SCCACHE_IDLE_TIMEOUT + - SCCACHE_REGION + - SCCACHE_S3_KEY_PREFIX=pylibwholegraph-aarch64 # [aarch64] + - SCCACHE_S3_KEY_PREFIX=pylibwholegraph-linux64 # [linux64] + - SCCACHE_S3_USE_SSL + - SCCACHE_S3_NO_CREDENTIALS + ignore_run_exports_from: + - {{ compiler('cuda') }} + +requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - {{ compiler('cxx') }} + - cmake {{ cmake_version }} + - ninja + - nccl + - cython + - libwholegraph ={{ version }} + - scikit-build {{ scikit_build_version }} + - doxygen =1.8.20 + - sysroot_{{ target_platform }} {{ sysroot_version }} + host: + - cudatoolkit ={{ cuda_version }} + - libwholegraph ={{ version }} + - nanobind >=0.2.0 + - python + - scikit-build {{ scikit_build_version }} + run: + - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} + - libwholegraph ={{ version }} + - python + +about: + home: https://rapids.ai/ + summary: pylibwholegraph library diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt new file mode 100644 index 000000000..d33975ace --- /dev/null +++ b/cpp/CMakeLists.txt @@ -0,0 +1,284 @@ +#============================================================================= +# Copyright (c) 2018-2023, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#============================================================================= + +set(RAPIDS_VERSION "23.06") +set(WHOLEGRAPH_VERSION "${RAPIDS_VERSION}.00") + +cmake_minimum_required(VERSION 3.23.1 FATAL_ERROR) + +include(FetchContent) + +FetchContent_Declare( + rapids-cmake + GIT_REPOSITORY https://github.com/rapidsai/rapids-cmake.git + GIT_TAG origin/branch-${RAPIDS_VERSION} +) +FetchContent_MakeAvailable(rapids-cmake) +include(rapids-cmake) +include(rapids-cpm) +include(rapids-cuda) +include(rapids-export) +include(rapids-find) + +if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES) + set(CMAKE_CUDA_ARCHITECTURES 70-real 80-real 86) +endif () +rapids_cuda_init_architectures(WHOLEGRAPH) + +project(WHOLEGRAPH VERSION ${WHOLEGRAPH_VERSION} LANGUAGES CXX CUDA) + +set(CMAKE_CXX_STANDARD 17) + +set(CMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES FALSE) +set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES FALSE) +set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_INCLUDES FALSE) + +# Write the version header +rapids_cmake_write_version_file(include/wholegraph/version_config.hpp) + +############################################################################## +# - User Options ------------------------------------------------------------ +option(CMAKE_CUDA_LINEINFO "Enable the -lineinfo option for nvcc (useful for cuda-memcheck / profiler" OFF) +option(BUILD_TESTS "Configure CMake to build tests" ON) + +############################################################################## +# - Set options based on user defined one ----------------------------------- + +############################################################################## +# - Base rapids options ------------------------------------------------------ +# default build type +#rapids_cmake_build_type(Release) +rapids_cmake_build_type(RelWithDebInfo) + +message("CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}") + +if(DETECT_CONDA_ENV) + rapids_cmake_support_conda_env( conda_env MODIFY_PREFIX_PATH ) + if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND DEFINED ENV{CONDA_PREFIX}) + message(STATUS "No CMAKE_INSTALL_PREFIX argument detected, setting to: $ENV{CONDA_PREFIX}") + set(CMAKE_INSTALL_PREFIX "$ENV{CONDA_PREFIX}") + endif() +endif() + +################################################################################ +# - compiler options ----------------------------------------------------------- + +# * find CUDAToolkit package +# * determine GPU architectures +# * enable the CMake CUDA language +# * set other CUDA compilation flags +rapids_find_package(CUDAToolkit REQUIRED + BUILD_EXPORT_SET wholegraph-exports + INSTALL_EXPORT_SET wholegraph-exports +) + +set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CMAKE_COMMAND} -E time") +set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CMAKE_COMMAND} -E time") +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +set(WHOLEGRAPH_CXX_FLAGS "") +set(WHOLEGRAPH_CUDA_FLAGS "") + +if(CMAKE_COMPILER_IS_GNUCXX) + list(APPEND WHOLEGRAPH_CXX_FLAGS -Werror -Wno-error=deprecated-declarations) +endif(CMAKE_COMPILER_IS_GNUCXX) + + +message("-- Building for GPU_ARCHS = ${CMAKE_CUDA_ARCHITECTURES}") + +#list(APPEND WHOLEGRAPH_CUDA_FLAGS --expt-extended-lambda --expt-relaxed-constexpr) +#list(APPEND WHOLEGRAPH_CUDA_FLAGS -Werror=cross-execution-space-call -Wno-deprecated-declarations -Xptxas=--disable-warnings) +#list(APPEND WHOLEGRAPH_CUDA_FLAGS -Xcompiler=-Wall,-Wno-error=sign-compare,-Wno-error=unused-but-set-variable) +#list(APPEND WHOLEGRAPH_CUDA_FLAGS -Xfatbin=-compress-all) + +# Option to enable line info in CUDA device compilation to allow introspection when profiling / +# memchecking +if (CMAKE_CUDA_LINEINFO) + list(APPEND WHOLEGRAPH_CUDA_FLAGS -lineinfo) +endif() + +# Debug options +if(CMAKE_BUILD_TYPE MATCHES Debug) + message(STATUS "Building with debugging flags") + list(APPEND WHOLEGRAPH_CUDA_FLAGS -G -Xcompiler=-rdynamic) +endif() + +################################################################################ +# - find CPM based dependencies ----------------------------------------------- + +rapids_cpm_init() + +include(../cmake/thirdparty/get_raft.cmake) +include(../cmake/thirdparty/get_nccl.cmake) + +file(GLOB WHOLEGRAPH_SOURCES + "src/*.cpp" + "src/wholememory/*.cpp" + "src/wholememory_ops/*.cpp" + "src/wholememory_ops/*.cu" + "src/wholememory_ops/functions/*.cu" + "src/wholegraph_ops/*.cpp" + "src/wholegraph_ops/*.cu" + "src/graph_ops/*.cu" + "src/graph_ops/*.cpp") + +add_library(wholegraph SHARED "") +add_library(wholegraph::wholegraph ALIAS wholegraph) + +target_sources(wholegraph PRIVATE ${WHOLEGRAPH_SOURCES}) + +set_target_properties(wholegraph + PROPERTIES BUILD_RPATH "\$ORIGIN" + INSTALL_RPATH "\$ORIGIN" + # set target compile options + CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CUDA_STANDARD 17 + CUDA_STANDARD_REQUIRED ON + POSITION_INDEPENDENT_CODE ON + INTERFACE_POSITION_INDEPENDENT_CODE ON + ) + +target_compile_options(wholegraph + PRIVATE "$<$:${WHOLEGRAPH_CXX_FLAGS}>" + "$<$:${WHOLEGRAPH_CUDA_FLAGS}>" +) + +#target_link_libraries(wholegraph PRIVATE -static-libgcc -static-libstdc++) + +################################################################################ +# - include paths -------------------------------------------------------------- + +set(WHOLEGRAPH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE STRING + "Path to wholegraph include directory") + +target_include_directories(wholegraph + PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/src" + PUBLIC + "$" + "$" + "$" +) + + +################################################################################ +# - link libraries ------------------------------------------------------------- +target_link_libraries(wholegraph +PUBLIC + CUDA::cuda_driver + CUDA::cudart + raft::raft +PRIVATE + NCCL::NCCL +) + +# optionally build tests +if(BUILD_TESTS AND CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) + include(../cmake/thirdparty/get_gtest.cmake) + include(CTest) # calls enable_testing() + + add_subdirectory(tests) +endif() + +############################################################################## +# - doxygen docs ------------------------------------------------------------- + +include(../cmake/doxygen.cmake) +add_doxygen_target( + IN_DOXYFILE Doxyfile.in + OUT_DOXYFILE ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/html + CWD ${CMAKE_CURRENT_BINARY_DIR} + DEP_TARGETS ${DOXYGEN_DEP_TARGETS}) + +############################################################################## +# - code checker ------------------------------------------------------------- + +include(../cmake/CodeChecker.cmake) +set(CLANG_FORMAT_EXE "clang-format") +set(CLANG_TIDY_EXE "clang-tidy") +set(FLAKE8_EXE "flake8") +if(CLANG_TOOL_PATH) + set(CLANG_FORMAT_EXE ${CLANG_TOOL_PATH}/clang-format) + set(CLANG_TIDY_EXE ${CLANG_TOOL_PATH}/clang-tidy) +endif() +add_code_checks( + CWD ${PROJECT_SOURCE_DIR} + CLANG_FORMAT ${CLANG_FORMAT_EXE} + CLANG_TIDY ${CLANG_TIDY_EXE} + FLAKE8 ${FLAKE8_EXE}) + +############################################################################## +# - install targets ---------------------------------------------------------- + +set(doc_string [=[ +]=]) +set(code_string + [=[ +]=]) + +set(WHOLEGRAPH_PUBLIC_HEADERS + wholememory/device_reference.cuh + wholememory/embedding.h + wholememory/env_func_ptrs.h + wholememory/global_reference.h + wholememory/tensor_description.h + wholememory/wholememory.h + wholememory/wholememory_tensor.h + wholememory/wholememory_op.h + wholememory/wholegraph_op.h + wholememory/graph_op.h + ) + +foreach(file IN LISTS WHOLEGRAPH_PUBLIC_HEADERS) + cmake_path(GET file PARENT_PATH file_out_) + string(JOIN "/" out_path "include" ${file_out_}) + install(FILES "${WHOLEGRAPH_INCLUDE_DIR}/${file}" + DESTINATION "${out_path}") + #install(FILES "${WHOLEGRAPH_INCLUDE_DIR}/${file}" + # DESTINATION "${file}") +endforeach() + +rapids_cmake_install_lib_dir( lib_dir ) + +set(PROGRAM_PERMISSIONS_DEFAULT + OWNER_WRITE OWNER_READ OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE) + +install( + TARGETS wholegraph + DESTINATION ${lib_dir} + PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT} + EXPORT wholegraph-exports) + +rapids_export( + INSTALL wholegraph + EXPORT_SET wholegraph-exports + GLOBAL_TARGETS wholegraph + NAMESPACE wholegraph:: + DOCUMENTATION doc_string + FINAL_CODE_BLOCK code_string) + +# build export targets +rapids_export( + BUILD wholegraph + EXPORT_SET wholegraph-exports + GLOBAL_TARGETS wholegraph + NAMESPACE wholegraph:: + DOCUMENTATION doc_string + FINAL_CODE_BLOCK code_string) diff --git a/cpp/Doxyfile b/cpp/Doxyfile new file mode 100644 index 000000000..d236c53cf --- /dev/null +++ b/cpp/Doxyfile @@ -0,0 +1,2526 @@ +# Doxyfile 1.8.20 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "WholeGraph C API" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = 23.06 + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all generated output in the proper direction. +# Possible values are: None, LTR, RTL and Context. +# The default value is: None. + +OUTPUT_TEXT_DIRECTION = None + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# By default Python docstrings are displayed as preformatted text and doxygen's +# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the +# doxygen's special commands can be used and the contents of the docstring +# documentation blocks is shown as doxygen documentation. +# The default value is: YES. + +PYTHON_DOCSTRING = YES + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines (in the resulting output). You can put ^^ in the value part of an +# alias to insert a newline as if a physical newline was in the original file. +# When you need a literal { or } or , in the value part of an alias you have to +# escape them by means of a backslash (\), this can lead to conflicts with the +# commands \{ and \} for these it is advised to use the version @{ and @} or use +# a double escape (\\{ and \\}) + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, +# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files). For instance to make doxygen treat .inc files +# as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See https://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 5. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 5 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use +# during processing. When set to 0 doxygen will based this on the number of +# cores available in the system. You can set it explicitly to a value larger +# than 0 to get more control over the balance between CPU load and processing +# speed. At this moment only the input processing can be done using multiple +# threads. Since this is still an experimental feature the default is set to 1, +# which efficively disables parallel processing. Please report any issues you +# encounter. Generating dot graphs in parallel is controlled by the +# DOT_NUM_THREADS setting. +# Minimum value: 0, maximum value: 32, default value: 1. + +NUM_PROC_THREADS = 1 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# declarations. If set to NO, these declarations will be included in the +# documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# (including Cygwin) and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. If +# EXTRACT_ALL is set to YES then this flag will automatically be disabled. +# The default value is: NO. + +WARN_NO_PARAMDOC = YES + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = YES + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = ./include ./src + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: https://www.gnu.org/software/libiconv/) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), +# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen +# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, +# *.vhdl, *.ucf, *.qsf and *.ice. + +FILE_PATTERNS = *.cpp \ + *.h \ + *.hpp \ + *.hxx \ + *.cu \ + *.cuh + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = columnWiseSort.cuh \ + smoblocksolve.h + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = # @CMAKE_CURRENT_SOURCE_DIR@/doxygen/images + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# entity all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see https://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: https://developer.apple.com/xcode/), introduced with OSX +# 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the main .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg +# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see +# https://inkscape.org) to generate formulas as SVG images instead of PNGs for +# the HTML output. These images will generally look nicer at scaled resolutions. +# Possible values are: png (the default) and svg (looks nicer but requires the +# pdf2svg or inkscape tool). +# The default value is: png. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FORMULA_FORMAT = png + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands +# to create new LaTeX commands to be used in formulas as building blocks. See +# the section "Including formulas" for details. + +FORMULA_MACROFILE = + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# https://www.mathjax.org) which uses client side JavaScript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = YES + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from https://www.mathjax.org before deployment. +# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /