mirror of
https://github.com/wassname/ray.git
synced 2026-07-04 00:17:00 +08:00
c2c501bbe6
* Init commit for async plasma client * Create an eventloop model for ray/plasma * Implement a poll-like selector base on `ray.wait`. Huge improvements. * Allow choosing workers & selectors * remove original design * initial implementation of epoll-like selector for plasma * Add a param for `worker` used in `PlasmaSelectorEventLoop` * Allow accepting a `Future` which returns object_id * Do not need `io.py` anymore * Create a basic testing model * fix: `ray.wait` returns tuple of lists * fix a few bugs * improving performance & bug fixing * add test * several improvements & fixing * fix relative import * [async] change code format, remove old files * [async] Create context wrapper for the eventloop * [async] fix: context should return a value * [async] Implement futures grouping * [async] Fix bugs & replace old functions * [async] Fix bugs found in tests * [async] Implement `PlasmaEpoll` * [async] Make test faster, add tests for epoll * [async] Fix code format * [async] Add comments for main code. * [async] Fix import path. * [async] Fix test. * [async] Compatibility. * [async] less verbose to not annoy the CI. * [async] Add test for new API * [async] Allow showing debug info in some of the test. * [async] Fix test. * [async] Proper shutdown. * [async] Lint~ * [async] Move files to experimental and create API * [async] Use async/await syntax * [async] Fix names & styles * [async] comments * [async] bug fixing & use pytest * [async] bug fixing & change tests * [async] use logger * [async] add tests * [async] lint * [async] type checking * [async] add more tests * [async] fix bugs on waiting a future while timeout. Add more docs. * [async] Formal docs. * [async] Add typing info since these codes are compatible with py3.5+. * [async] Documents. * [async] Lint. * [async] Fix deprecated call. * [async] Fix deprecated call. * [async] Implement a more reasonable way for dealing with pending inputs. * [async] Fix docs * [async] Lint * [async] Fix bug: Type for time * [async] Set our eventloop as the default eventloop so that we can get it through `asyncio.get_event_loop()`. * [async] Update test & docs. * [async] Lint. * [async] Temporarily print more debug info. * [async] Use `Poll` as a default option. * [async] Limit resources. * new async implementation for Ray * implement linked list * bug fix * update * support seamless async operations * update * update API * fix tests * lint * bug fix * refactor names * improve doc * properly shutdown async_api * doc * Change the table on the index page. * Adjust table size. * Only keeps `as_future`. * change how we init connection * init connection in `ray.worker.connect` * doc * fix * Move initialization code into the module. * Fix docs & code * Update pyarrow version. * lint * Restore index.rst * Add known issues. * Apply suggestions from code review Co-Authored-By: suquark <suquark@gmail.com> * rename * Update async_api.rst * Update async_api.py * Update async_api.rst * Update async_api.py * Update worker.py * Update async_api.rst * fix tests * lint * lint * replace the magic number
113 lines
3.7 KiB
CMake
113 lines
3.7 KiB
CMake
# arrow external project
|
|
# target:
|
|
# - arrow_ep
|
|
# depends:
|
|
#
|
|
# this module defines:
|
|
# - ARROW_HOME
|
|
# - ARROW_SOURCE_DIR
|
|
# - ARROW_INCLUDE_DIR
|
|
# - ARROW_SHARED_LIB
|
|
# - ARROW_STATIC_LIB
|
|
# - ARROW_LIBRARY_DIR
|
|
# - PLASMA_INCLUDE_DIR
|
|
# - PLASMA_STATIC_LIB
|
|
# - PLASMA_SHARED_LIB
|
|
|
|
set(arrow_URL https://github.com/apache/arrow.git)
|
|
# The PR for this commit is https://github.com/apache/arrow/pull/3093. We
|
|
# include the link here to make it easier to find the right commit because
|
|
# Arrow often rewrites git history and invalidates certain commits.
|
|
set(arrow_TAG 187b98ed338d4995317dae9efd19870c532192cb)
|
|
|
|
set(ARROW_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/arrow-install)
|
|
set(ARROW_HOME ${ARROW_INSTALL_PREFIX})
|
|
set(ARROW_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/external/arrow/src/arrow_ep)
|
|
|
|
set(ARROW_INCLUDE_DIR ${ARROW_HOME}/include)
|
|
set(ARROW_LIBRARY_DIR ${ARROW_HOME}/lib${LIB_SUFFIX})
|
|
set(ARROW_SHARED_LIB ${ARROW_LIBRARY_DIR}/libarrow${CMAKE_SHARED_LIBRARY_SUFFIX})
|
|
set(ARROW_STATIC_LIB ${ARROW_LIBRARY_DIR}/libarrow.a)
|
|
|
|
# plasma in arrow
|
|
set(PLASMA_INCLUDE_DIR ${ARROW_HOME}/include)
|
|
set(PLASMA_SHARED_LIB ${ARROW_LIBRARY_DIR}/libplasma${CMAKE_SHARED_LIBRARY_SUFFIX})
|
|
set(PLASMA_STATIC_LIB ${ARROW_LIBRARY_DIR}/libplasma.a)
|
|
|
|
find_package(PythonInterp REQUIRED)
|
|
message(STATUS "PYTHON_EXECUTABLE for arrow: ${PYTHON_EXECUTABLE}")
|
|
|
|
set(ARROW_CMAKE_ARGS
|
|
-DCMAKE_BUILD_TYPE:STRING=Release
|
|
-DCMAKE_INSTALL_PREFIX=${ARROW_INSTALL_PREFIX}
|
|
-DCMAKE_C_FLAGS=-g -O3 ${EP_C_FLAGS}
|
|
-DCMAKE_CXX_FLAGS=-g -O3 ${EP_CXX_FLAGS}
|
|
-DARROW_BUILD_TESTS=off
|
|
-DARROW_HDFS=on
|
|
-DARROW_BOOST_USE_SHARED=off
|
|
-DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}
|
|
-DARROW_PYTHON=on
|
|
-DARROW_PLASMA=on
|
|
-DARROW_TENSORFLOW=on
|
|
-DARROW_JEMALLOC=off
|
|
-DARROW_WITH_BROTLI=off
|
|
-DARROW_WITH_LZ4=off
|
|
-DARROW_WITH_ZSTD=off
|
|
-DFLATBUFFERS_HOME=${FLATBUFFERS_HOME}
|
|
-DBOOST_ROOT=${BOOST_ROOT}
|
|
-DGLOG_HOME=${GLOG_HOME})
|
|
|
|
if ("${CMAKE_RAY_LANG_PYTHON}" STREQUAL "YES")
|
|
# PyArrow needs following settings.
|
|
set(ARROW_CMAKE_ARGS ${ARROW_CMAKE_ARGS}
|
|
-DARROW_WITH_THRIFT=ON
|
|
-DARROW_PARQUET=ON
|
|
-DARROW_WITH_ZLIB=ON)
|
|
else()
|
|
set(ARROW_CMAKE_ARGS ${ARROW_CMAKE_ARGS}
|
|
-DARROW_WITH_THRIFT=OFF
|
|
-DARROW_PARQUET=OFF
|
|
-DARROW_WITH_ZLIB=OFF)
|
|
endif ()
|
|
if (APPLE)
|
|
set(ARROW_CMAKE_ARGS ${ARROW_CMAKE_ARGS}
|
|
-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison)
|
|
endif()
|
|
|
|
if ("${CMAKE_RAY_LANG_JAVA}" STREQUAL "YES")
|
|
set(ARROW_CMAKE_ARGS ${ARROW_CMAKE_ARGS} -DARROW_PLASMA_JAVA_CLIENT=ON)
|
|
endif ()
|
|
|
|
message(STATUS "ARROW_CMAKE_ARGS: ${ARROW_CMAKE_ARGS}")
|
|
|
|
if (CMAKE_VERSION VERSION_GREATER "3.7")
|
|
set(ARROW_CONFIGURE SOURCE_SUBDIR "cpp" CMAKE_ARGS ${ARROW_CMAKE_ARGS})
|
|
else()
|
|
set(ARROW_CONFIGURE CONFIGURE_COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}"
|
|
${ARROW_CMAKE_ARGS} "${ARROW_SOURCE_DIR}/cpp")
|
|
endif()
|
|
|
|
ExternalProject_Add(arrow_ep
|
|
PREFIX external/arrow
|
|
DEPENDS flatbuffers boost glog
|
|
GIT_REPOSITORY ${arrow_URL}
|
|
GIT_TAG ${arrow_TAG}
|
|
UPDATE_COMMAND ""
|
|
${ARROW_CONFIGURE}
|
|
BUILD_BYPRODUCTS "${ARROW_SHARED_LIB}" "${ARROW_STATIC_LIB}")
|
|
|
|
if ("${CMAKE_RAY_LANG_JAVA}" STREQUAL "YES")
|
|
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${ARROW_SOURCE_DIR}/java/target/")
|
|
|
|
if(NOT EXISTS ${ARROW_SOURCE_DIR}/java/target/)
|
|
ExternalProject_Add_Step(arrow_ep arrow_ep_install_java_lib
|
|
COMMAND bash -c "cd ${ARROW_SOURCE_DIR}/java && mvn clean install -pl plasma -am -Dmaven.test.skip > /dev/null"
|
|
DEPENDEES build)
|
|
endif()
|
|
|
|
# add install of library plasma_java, it is not configured in plasma CMakeLists.txt
|
|
ExternalProject_Add_Step(arrow_ep arrow_ep_install_plasma_java
|
|
COMMAND bash -c "cp -rf ${CMAKE_CURRENT_BINARY_DIR}/external/arrow/src/arrow_ep-build/release/libplasma_java.* ${ARROW_LIBRARY_DIR}/"
|
|
DEPENDEES install)
|
|
endif ()
|