diff --git a/projects/rocshmem/src/CMakeLists.txt b/projects/rocshmem/src/CMakeLists.txt index 823102d8a1..15162c2384 100644 --- a/projects/rocshmem/src/CMakeLists.txt +++ b/projects/rocshmem/src/CMakeLists.txt @@ -30,7 +30,6 @@ target_sources( backend_bc.cpp context_host.cpp context_device.cpp - ipc_policy.cpp mpi_init_singleton.cpp roc_shmem_gpu.cpp roc_shmem.cpp @@ -67,3 +66,4 @@ add_subdirectory(containers) add_subdirectory(host) add_subdirectory(memory) add_subdirectory(sync) +add_subdirectory(ipc) diff --git a/projects/rocshmem/src/backend_bc.hpp b/projects/rocshmem/src/backend_bc.hpp index 88cc6b3ba3..b968c0f3bb 100644 --- a/projects/rocshmem/src/backend_bc.hpp +++ b/projects/rocshmem/src/backend_bc.hpp @@ -38,7 +38,7 @@ #include "config.h" // NOLINT(build/include_subdir) #include "roc_shmem/roc_shmem.hpp" #include "backend_type.hpp" -#include "ipc_policy.hpp" +#include "ipc/ipc_policy.hpp" #include "memory/symmetric_heap.hpp" #include "stats.hpp" #include "team_tracker.hpp" diff --git a/projects/rocshmem/src/context.hpp b/projects/rocshmem/src/context.hpp index 72c8f38352..4ff1251220 100644 --- a/projects/rocshmem/src/context.hpp +++ b/projects/rocshmem/src/context.hpp @@ -28,7 +28,7 @@ #include "backend_type.hpp" #include "fence_policy.hpp" #include "host/host.hpp" -#include "ipc_policy.hpp" +#include "ipc/ipc_policy.hpp" #include "stats.hpp" #include "sync/spin_ebo_block_mutex.hpp" #include "wf_coal_policy.hpp" diff --git a/projects/rocshmem/src/ipc/CMakeLists.txt b/projects/rocshmem/src/ipc/CMakeLists.txt new file mode 100644 index 0000000000..730b733c63 --- /dev/null +++ b/projects/rocshmem/src/ipc/CMakeLists.txt @@ -0,0 +1,30 @@ +############################################################################### +# Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +############################################################################### + +############################################################################### +# ADD ROCSHMEM TARGET FOR FILES IN CURRENT DIRECTORY +############################################################################### +target_sources( + ${PROJECT_NAME} + PRIVATE + ipc_policy.cpp +) diff --git a/projects/rocshmem/src/ipc_policy.cpp b/projects/rocshmem/src/ipc/ipc_policy.cpp similarity index 98% rename from projects/rocshmem/src/ipc_policy.cpp rename to projects/rocshmem/src/ipc/ipc_policy.cpp index 4bf483735d..e4555ac8f2 100644 --- a/projects/rocshmem/src/ipc_policy.cpp +++ b/projects/rocshmem/src/ipc/ipc_policy.cpp @@ -25,9 +25,9 @@ #include #include "config.h" // NOLINT(build/include_subdir) -#include "backend_bc.hpp" -#include "context_incl.hpp" -#include "util.hpp" +#include "../backend_bc.hpp" +#include "../context_incl.hpp" +#include "../util.hpp" namespace rocshmem { diff --git a/projects/rocshmem/src/ipc_policy.hpp b/projects/rocshmem/src/ipc/ipc_policy.hpp similarity index 98% rename from projects/rocshmem/src/ipc_policy.hpp rename to projects/rocshmem/src/ipc/ipc_policy.hpp index f6bb49d409..d608dc8d54 100644 --- a/projects/rocshmem/src/ipc_policy.hpp +++ b/projects/rocshmem/src/ipc/ipc_policy.hpp @@ -30,8 +30,8 @@ #include #include "config.h" // NOLINT(build/include_subdir) -#include "memory/hip_allocator.hpp" -#include "util.hpp" +#include "../memory/hip_allocator.hpp" +#include "../util.hpp" namespace rocshmem { diff --git a/projects/rocshmem/src/reverse_offload/block_handle.hpp b/projects/rocshmem/src/reverse_offload/block_handle.hpp index d2235f8639..f2ba1872b3 100644 --- a/projects/rocshmem/src/reverse_offload/block_handle.hpp +++ b/projects/rocshmem/src/reverse_offload/block_handle.hpp @@ -24,7 +24,7 @@ #define LIBRARY_SRC_REVERSE_OFFLOAD_BLOCK_HANDLE_HPP_ #include "../hdp_policy.hpp" -#include "../ipc_policy.hpp" +#include "../ipc/ipc_policy.hpp" #include "profiler.hpp" #include "queue.hpp" diff --git a/projects/rocshmem/src/reverse_offload/queue_proxy.hpp b/projects/rocshmem/src/reverse_offload/queue_proxy.hpp index 9cde0cb0cb..f3ddcec1ce 100644 --- a/projects/rocshmem/src/reverse_offload/queue_proxy.hpp +++ b/projects/rocshmem/src/reverse_offload/queue_proxy.hpp @@ -28,7 +28,7 @@ #include "../atomic_return.hpp" #include "../device_proxy.hpp" #include "../hdp_policy.hpp" -#include "../ipc_policy.hpp" +#include "../ipc/ipc_policy.hpp" #include "commands_types.hpp" #include "profiler.hpp" #include "../sync/abql_block_mutex.hpp"