From be7207d0086ae5b60ecf55f81c0fb7d58918acc2 Mon Sep 17 00:00:00 2001 From: Michael Demoret Date: Mon, 8 Apr 2024 01:49:53 -0400 Subject: [PATCH] IWYU fixes --- .../src/simple_cpp_stage/_lib/pass_thru.cpp | 3 +++ .../src/simple_cpp_stage/_lib/pass_thru.hpp | 5 +++++ .../_lib/rabbitmq_source.cpp | 13 ++++++++++--- .../_lib/rabbitmq_source.hpp | 18 ++++++++++++------ .../morpheus/io/data_loader_registry.hpp | 1 + .../include/morpheus/stages/preprocess_fil.hpp | 2 -- .../include/morpheus/stages/preprocess_nlp.hpp | 2 -- morpheus/_lib/llm/src/py_llm_task_handler.cpp | 4 ++-- morpheus/_lib/src/io/data_loader_registry.cpp | 2 ++ .../_lib/src/modules/data_loader_module.cpp | 2 -- .../_lib/src/stages/add_scores_stage_base.cpp | 2 -- morpheus/_lib/src/stages/write_to_file.cpp | 2 +- morpheus/_lib/tests/llm/test_llm_context.cpp | 2 +- morpheus/_lib/tests/llm/test_llm_engine.cpp | 1 + morpheus/_lib/tests/llm/test_llm_node.cpp | 1 + .../_lib/tests/llm/test_llm_node_runner.cpp | 1 + .../tests/llm/test_llm_task_handler_runner.cpp | 1 + 17 files changed, 41 insertions(+), 21 deletions(-) diff --git a/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/_lib/pass_thru.cpp b/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/_lib/pass_thru.cpp index a639bc1a35..3d3c824870 100644 --- a/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/_lib/pass_thru.cpp +++ b/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/_lib/pass_thru.cpp @@ -17,10 +17,13 @@ #include "pass_thru.hpp" +#include +#include #include #include // for pymrc::import #include +#include namespace morpheus_example { diff --git a/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/_lib/pass_thru.hpp b/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/_lib/pass_thru.hpp index 9670aab1d7..a4be293fcb 100644 --- a/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/_lib/pass_thru.hpp +++ b/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/_lib/pass_thru.hpp @@ -21,9 +21,14 @@ #include // for Segment Builder #include // for Segment Object #include // for PythonNode +#include #include #include +#include + +// IWYU pragma: no_include "morpheus/objects/data_table.hpp" +// IWYU pragma: no_include namespace morpheus_example { diff --git a/examples/developer_guide/4_rabbitmq_cpp_stage/src/rabbitmq_cpp_stage/_lib/rabbitmq_source.cpp b/examples/developer_guide/4_rabbitmq_cpp_stage/src/rabbitmq_cpp_stage/_lib/rabbitmq_source.cpp index bf7427b773..6159aaff07 100644 --- a/examples/developer_guide/4_rabbitmq_cpp_stage/src/rabbitmq_cpp_stage/_lib/rabbitmq_source.cpp +++ b/examples/developer_guide/4_rabbitmq_cpp_stage/src/rabbitmq_cpp_stage/_lib/rabbitmq_source.cpp @@ -17,16 +17,23 @@ #include "rabbitmq_source.hpp" +#include +#include +#include #include -#include #include -#include // for timedelta->chrono conversions +#include +#include #include +#include #include #include #include // for std::this_thread::sleep_for -#include +#include + +// IWYU pragma: no_include +// IWYU pragma: no_include namespace morpheus_rabbit { diff --git a/examples/developer_guide/4_rabbitmq_cpp_stage/src/rabbitmq_cpp_stage/_lib/rabbitmq_source.hpp b/examples/developer_guide/4_rabbitmq_cpp_stage/src/rabbitmq_cpp_stage/_lib/rabbitmq_source.hpp index 8a1b2ff462..c117bcc5e9 100644 --- a/examples/developer_guide/4_rabbitmq_cpp_stage/src/rabbitmq_cpp_stage/_lib/rabbitmq_source.hpp +++ b/examples/developer_guide/4_rabbitmq_cpp_stage/src/rabbitmq_cpp_stage/_lib/rabbitmq_source.hpp @@ -17,16 +17,22 @@ #pragma once -#include // for AmqpClient::Channel::ptr_t -#include // for cudf::io::table_with_metadata -#include // for MessageMeta -#include // for Segment Builder -#include // for Segment Object -#include // for mrc::pymrc::PythonSource +#include +#include // for cudf::io::table_with_metadata +#include // for MessageMeta +#include // for Segment Builder +#include // for Segment Object +#include // for mrc::pymrc::PythonSource +#include #include // for chrono::milliseconds #include // for shared_ptr #include +#include +#include + +// IWYU pragma: no_include "morpheus/objects/data_table.hpp" +// IWYU pragma: no_include namespace morpheus_rabbit { diff --git a/morpheus/_lib/include/morpheus/io/data_loader_registry.hpp b/morpheus/_lib/include/morpheus/io/data_loader_registry.hpp index 8bbf4aca30..1c038c2617 100644 --- a/morpheus/_lib/include/morpheus/io/data_loader_registry.hpp +++ b/morpheus/_lib/include/morpheus/io/data_loader_registry.hpp @@ -24,6 +24,7 @@ #include #include +#include #include namespace morpheus { diff --git a/morpheus/_lib/include/morpheus/stages/preprocess_fil.hpp b/morpheus/_lib/include/morpheus/stages/preprocess_fil.hpp index e8d1b5036c..982ebca09d 100644 --- a/morpheus/_lib/include/morpheus/stages/preprocess_fil.hpp +++ b/morpheus/_lib/include/morpheus/stages/preprocess_fil.hpp @@ -17,8 +17,6 @@ #pragma once -#include "rxcpp/operators/rx-map.hpp" - #include "morpheus/messages/control.hpp" #include "morpheus/messages/multi.hpp" #include "morpheus/messages/multi_inference.hpp" diff --git a/morpheus/_lib/include/morpheus/stages/preprocess_nlp.hpp b/morpheus/_lib/include/morpheus/stages/preprocess_nlp.hpp index 004a844f7b..c6c03f7311 100644 --- a/morpheus/_lib/include/morpheus/stages/preprocess_nlp.hpp +++ b/morpheus/_lib/include/morpheus/stages/preprocess_nlp.hpp @@ -17,8 +17,6 @@ #pragma once -#include "rxcpp/operators/rx-map.hpp" // for map - #include "morpheus/messages/control.hpp" // for ControlMessage #include "morpheus/messages/multi.hpp" // for MultiMessage #include "morpheus/messages/multi_inference.hpp" // for MultiInferenceMessage diff --git a/morpheus/_lib/llm/src/py_llm_task_handler.cpp b/morpheus/_lib/llm/src/py_llm_task_handler.cpp index 12f2dd915d..79884995bd 100644 --- a/morpheus/_lib/llm/src/py_llm_task_handler.cpp +++ b/morpheus/_lib/llm/src/py_llm_task_handler.cpp @@ -17,8 +17,8 @@ #include "py_llm_task_handler.hpp" -#include "morpheus/llm/llm_context.hpp" // IWYU pragma: keep -#include "morpheus/messages/control.hpp" +#include "morpheus/llm/llm_context.hpp" // IWYU pragma: keep +#include "morpheus/messages/control.hpp" // IWYU pragma: keep #include // IWYU pragma: keep #include diff --git a/morpheus/_lib/src/io/data_loader_registry.cpp b/morpheus/_lib/src/io/data_loader_registry.cpp index 4f7145c834..c9a61d6e52 100644 --- a/morpheus/_lib/src/io/data_loader_registry.cpp +++ b/morpheus/_lib/src/io/data_loader_registry.cpp @@ -24,10 +24,12 @@ #include #include +#include // for gil_scoped_acquire #include #include #include +#include // for move namespace morpheus { template class FactoryRegistry; diff --git a/morpheus/_lib/src/modules/data_loader_module.cpp b/morpheus/_lib/src/modules/data_loader_module.cpp index 69c2a7dc11..2abf1edda8 100644 --- a/morpheus/_lib/src/modules/data_loader_module.cpp +++ b/morpheus/_lib/src/modules/data_loader_module.cpp @@ -17,8 +17,6 @@ #include "morpheus/modules/data_loader_module.hpp" -#include "rxcpp/operators/rx-map.hpp" - #include "morpheus/io/data_loader_registry.hpp" #include "morpheus/messages/control.hpp" diff --git a/morpheus/_lib/src/stages/add_scores_stage_base.cpp b/morpheus/_lib/src/stages/add_scores_stage_base.cpp index efb0036be9..b7ff58ca67 100644 --- a/morpheus/_lib/src/stages/add_scores_stage_base.cpp +++ b/morpheus/_lib/src/stages/add_scores_stage_base.cpp @@ -17,8 +17,6 @@ #include "morpheus/stages/add_scores_stage_base.hpp" -#include "rxcpp/operators/rx-map.hpp" // for map - #include "morpheus/messages/memory/tensor_memory.hpp" // for TensorMemory #include "morpheus/messages/meta.hpp" #include "morpheus/messages/multi_response.hpp" // for MultiResponseMessage diff --git a/morpheus/_lib/src/stages/write_to_file.cpp b/morpheus/_lib/src/stages/write_to_file.cpp index cde1cfc6ae..327c09df8b 100644 --- a/morpheus/_lib/src/stages/write_to_file.cpp +++ b/morpheus/_lib/src/stages/write_to_file.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "morpheus/stages/write_to_file.hpp" // IWYU pragma: accosiated +#include "morpheus/stages/write_to_file.hpp" // IWYU pragma: associated #include "mrc/segment/builder.hpp" #include "mrc/segment/object.hpp" diff --git a/morpheus/_lib/tests/llm/test_llm_context.cpp b/morpheus/_lib/tests/llm/test_llm_context.cpp index ad4c34b7b9..50d67492c3 100644 --- a/morpheus/_lib/tests/llm/test_llm_context.cpp +++ b/morpheus/_lib/tests/llm/test_llm_context.cpp @@ -22,9 +22,9 @@ #include "morpheus/llm/llm_context.hpp" #include "morpheus/llm/llm_task.hpp" #include "morpheus/messages/control.hpp" -#include "morpheus/types.hpp" #include +#include #include #include diff --git a/morpheus/_lib/tests/llm/test_llm_engine.cpp b/morpheus/_lib/tests/llm/test_llm_engine.cpp index ddf7864d5c..c33e7c1b03 100644 --- a/morpheus/_lib/tests/llm/test_llm_engine.cpp +++ b/morpheus/_lib/tests/llm/test_llm_engine.cpp @@ -25,6 +25,7 @@ #include "morpheus/types.hpp" #include +#include #include #include #include diff --git a/morpheus/_lib/tests/llm/test_llm_node.cpp b/morpheus/_lib/tests/llm/test_llm_node.cpp index 3802038e97..ccf7de8d13 100644 --- a/morpheus/_lib/tests/llm/test_llm_node.cpp +++ b/morpheus/_lib/tests/llm/test_llm_node.cpp @@ -26,6 +26,7 @@ #include "morpheus/types.hpp" #include +#include #include #include diff --git a/morpheus/_lib/tests/llm/test_llm_node_runner.cpp b/morpheus/_lib/tests/llm/test_llm_node_runner.cpp index 7ee457239a..a2256bb0bf 100644 --- a/morpheus/_lib/tests/llm/test_llm_node_runner.cpp +++ b/morpheus/_lib/tests/llm/test_llm_node_runner.cpp @@ -27,6 +27,7 @@ #include "morpheus/types.hpp" #include +#include #include #include diff --git a/morpheus/_lib/tests/llm/test_llm_task_handler_runner.cpp b/morpheus/_lib/tests/llm/test_llm_task_handler_runner.cpp index aa567221a1..c04f2ca3bf 100644 --- a/morpheus/_lib/tests/llm/test_llm_task_handler_runner.cpp +++ b/morpheus/_lib/tests/llm/test_llm_task_handler_runner.cpp @@ -27,6 +27,7 @@ #include "morpheus/types.hpp" #include +#include #include #include // IWYU pragma: keep #include