Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ lib*
__pycache__

.vscode

3rdparty/msgpack-c/
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion 3rdparty/msgpack-c
Submodule msgpack-c deleted from 9b801f
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ endif()
message(STATUS "WARP_ACCUM_UNROLL is set to: ${WARP_ACCUM_UNROLL}")
add_definitions(-DWARP_ACCUM_UNROLL=${WARP_ACCUM_UNROLL})

include("cmake/msgpack-c.cmake")

# Create an interface library to represent msgpack-c dependency
add_library(msgpack-c-interface INTERFACE)
target_include_directories(
msgpack-c-interface INTERFACE ${CMAKE_SOURCE_DIR}/3rdparty/msgpack-c/include)
target_compile_definitions(msgpack-c-interface INTERFACE MSGPACK_NO_BOOST)
# Make sure msgpack-c is downloaded before using the interface
add_dependencies(msgpack-c-interface msgpack-c)

if(USE_ROCM)
list(APPEND CMAKE_PREFIX_PATH "/opt/rocm")
project(mori LANGUAGES HIP CXX C)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ cd mori && docker build -t rocm/mori:dev -f docker/Dockerfile.dev .

### Install with Python
```
cd mori && pip install -r requirements-build.txt && git submodule update --init --recursive && pip3 install .
cd mori \
&& pip install -r requirements-build.txt \
&& pip3 install .
```

### Test dispatch / combine
Expand Down
50 changes: 50 additions & 0 deletions cmake/msgpack-c.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright © Advanced Micro Devices, Inc. All rights reserved.

# MIT License

# 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.

cmake_minimum_required(VERSION 3.18)

# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()

project(dependency NONE)

include(ExternalProject)

set(MSGPACK_C_DIR "${CMAKE_SOURCE_DIR}/3rdparty/msgpack-c")

# set(MSGPACK_C_TAG "origin/cpp_master")
set(MSGPACK_C_TAG "a0b2ec09da4bd823e40fa591221713951d4ec995")

# cmake-format: off
ExternalProject_Add(msgpack-c
GIT_REPOSITORY https://github.com/msgpack/msgpack-c.git
GIT_TAG ${MSGPACK_C_TAG}
SOURCE_DIR ${MSGPACK_C_DIR}
BINARY_DIR ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
# cmake-format: on
13 changes: 8 additions & 5 deletions src/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ add_library(mori_io SHARED engine.cpp rdma/protocol.cpp

target_include_directories(mori_io PUBLIC ${CMAKE_SOURCE_DIR}/include)
target_include_directories(mori_io PUBLIC ${CMAKE_SOURCE_DIR})
target_include_directories(
mori_io PUBLIC ${CMAKE_SOURCE_DIR}/3rdparty/msgpack-c/include)
target_link_libraries(mori_io mori_application ibverbs mlx5 hip::host
hip::device)
target_compile_definitions(mori_io PUBLIC MSGPACK_NO_BOOST)
target_link_libraries(
mori_io
mori_application
ibverbs
mlx5
hip::host
hip::device
msgpack-c-interface)