diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000000..7429a132339e --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1 @@ +rocm_setup_version(VERSION 2.55.1) diff --git a/LICENSE b/LICENSE index c247a8575b35..413acde66f0b 100644 --- a/LICENSE +++ b/LICENSE @@ -271,8 +271,10 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------- -Code in python/ray/_private/prometheus_exporter.py is adapted from https://github.com/census-instrumentation/opencensus-python/blob/master/contrib/opencensus-ext-prometheus/opencensus/ext/prometheus/stats_exporter/__init__.py +-------------------------------------------------------------------------------- +Code in python/ray/_private/prometheus_exporter.py is adapted from +https://github.com/census-instrumentation/opencensus-python/blob/master/contrib/ +opencensus-ext-prometheus/opencensus/ext/prometheus/stats_exporter/__init__.py # Copyright 2018, OpenCensus Authors # @@ -361,7 +363,8 @@ See the License for the specific language governing permissions and limitations under the License. -------------------------------------------------------------------------------- -Code in python/ray/_private/runtime_env/_clonevirtualenv.py is adapted from https://github.com/edwardgeorge/virtualenv-clone/blob/master/clonevirtualenv.py +Code in python/ray/_private/runtime_env/_clonevirtualenv.py is adapted from +https://github.com/edwardgeorge/virtualenv-clone/blob/master/clonevirtualenv.py Copyright (c) 2011, Edward George, based on code contained within the virtualenv project. @@ -384,8 +387,10 @@ 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. ---------------------------------------------------------------------------------------------------------------- -Code in python/ray/_private/thirdparty/tabulate/tabulate.py is adapted from https://github.com/astanin/python-tabulate/blob/4892c6e9a79638c7897ccea68b602040da9cc7a7/tabulate.py +-------------------------------------------------------------------------------- +Code in python/ray/_private/thirdparty/tabulate/tabulate.py is adapted from +https://github.com/astanin/python-tabulate/blob/ +4892c6e9a79638c7897ccea68b602040da9cc7a7/tabulate.py Copyright (c) 2011-2020 Sergey Astanin and contributors @@ -409,7 +414,8 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- -Code in python/ray/_private/thirdparty/dacite is adapted from https://github.com/konradhalas/dacite/blob/master/dacite +Code in python/ray/_private/thirdparty/dacite is adapted from +https://github.com/konradhalas/dacite/blob/master/dacite Copyright (c) 2018 Konrad Hałas @@ -433,7 +439,8 @@ SOFTWARE. -------------------------------------------------------------------------------- -Code in python/ray/autoscaler/_private/kuberay/utils.py is adapted from https://github.com/kubernetes-client/python/blob/master/kubernetes/utils/quantity.py +Code in python/ray/autoscaler/_private/kuberay/utils.py is adapted from +https://github.com/kubernetes-client/python/blob/master/kubernetes/utils/quantity.py Copyright 2019 The Kubernetes Authors. @@ -451,7 +458,8 @@ limitations under the License. -------------------------------------------------------------------------------- -Code in python/ray/_private/thirdparty/pynvml is adapted from https://pypi.org/project/nvidia-ml-py +Code in python/ray/_private/thirdparty/pynvml is adapted from +https://pypi.org/project/nvidia-ml-py Copyright (c) 2011-2022, NVIDIA Corporation. All rights reserved. @@ -483,7 +491,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- -Code in src/ray/thirdparty/setproctitle is adapted from https://github.com/dvarrazzo/py-setproctitle +Code in src/ray/thirdparty/setproctitle is adapted from +https://github.com/dvarrazzo/py-setproctitle BSD 3-Clause License diff --git a/amd-docs/.readthedocs.yaml b/amd-docs/.readthedocs.yaml new file mode 100644 index 000000000000..7952df64526d --- /dev/null +++ b/amd-docs/.readthedocs.yaml @@ -0,0 +1,21 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +sphinx: + configuration: amd-docs/conf.py + +# RTD by default builds html only +# Additional formats available for extra build time: htmlzip, pdf, epub +formats: [] + +python: + install: + - requirements: amd-docs/sphinx/requirements.txt + +# Defines build environment +build: + os: ubuntu-24.04 + tools: + python: "3.12" diff --git a/amd-docs/about/license.rst b/amd-docs/about/license.rst new file mode 100644 index 000000000000..c3bf4568cb69 --- /dev/null +++ b/amd-docs/about/license.rst @@ -0,0 +1,12 @@ +.. meta:: + :description: Ray license + :keywords: Ray, reinforcement learning, ROCm, developer, reference, python + +.. _license: + +****************************************** +License +****************************************** + +.. include:: ../../LICENSE + :literal: \ No newline at end of file diff --git a/amd-docs/conf.py b/amd-docs/conf.py new file mode 100644 index 000000000000..7c56619b2b45 --- /dev/null +++ b/amd-docs/conf.py @@ -0,0 +1,58 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +import re + +''' +html_theme is usually unchanged (rocm_docs_theme). +flavor defines the site header display, select the flavor for the corresponding portals +flavor options: rocm, rocm-docs-home, rocm-blogs, rocm-ds, instinct, ai-developer-hub, local, generic +''' +html_theme = "rocm_docs_theme" +html_theme_options = {"flavor": "rocm-llmext", "repository_url": "https://github.com/AMD-Ecosystem/ray/"} + +''' +docs_header_version is used to manually configure the version in the header. If +there exists a non-null value mapped to docs_header_version, then the header in +the documentation page will contain the given version string. +''' +html_context = { + "docs_header_version": "26.06" +} + + +# This section turns on/off article info +setting_all_article_info = True +all_article_info_os = ["linux"] +all_article_info_author = "" + +# Dynamically extract component version +with open('../CMakeLists.txt', encoding='utf-8') as f: + pattern = r'.*\brocm_setup_version\(VERSION\s+([0-9A-Za-z._-]+)' # Update according to each component's CMakeLists.txt + match = re.search(pattern, + f.read()) + if not match: + raise ValueError("VERSION not found!") + version_number = match[1] + +# for PDF output on Read the Docs +project = "Ray" +author = "Advanced Micro Devices, Inc." +copyright = "Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved." +version = version_number +release = version_number + +external_toc_path = "./sphinx/_toc.yml" # Defines Table of Content structure definition path + +# Add more additional packages accordingly +extensions = [ + "rocm_docs", + "sphinx.ext.autodoc", # for Python docstrings +] + +html_title = f"{project} {version_number} documentation" + +external_projects_current_project = "Ray" diff --git a/amd-docs/index.rst b/amd-docs/index.rst new file mode 100644 index 000000000000..b7eea917e8db --- /dev/null +++ b/amd-docs/index.rst @@ -0,0 +1,45 @@ +.. meta:: + :description: Ray documentation + :keywords: Ray, ROCm, documentation, reinforcement learning, deep learning, framework, GPU + +.. _ray-documentation-index: + +******************************************************************** +Ray on ROCm documentation +******************************************************************** + +Use Ray on ROCm to orchestrate distributed GPU workloads across AMD Instinct +clusters, enabling elastic hyperparameter tuning, reinforcement learning, +and scalable end-to-end machine learning pipelines. + +Ray is a unified framework, consisting of `a core distributed +runtime `__ and a set of +`AI libraries `__ for +simplifying machine learning computations. + +Ray is part of the `AMD LLM Extension toolkit +`__. + +The Ray public repository is located at `https://github.com/AMD-Ecosystem/ray `__. + +.. grid:: 2 + :gutter: 3 + + .. grid-item-card:: Install + + * :doc:`Install Ray ` + + .. grid-item-card:: Examples + + * `Ray examples (upstream) `__ + * `Ray use cases (upstream) `__ + + .. grid-item-card:: Reference + + * `Get started with Ray (upstream) `__ + * `Ray Core API (upstream) `__ + +To contribute to the documentation, refer to +`Contributing to Ray `__. + +You can find licensing information on the :doc:`Licensing ` page. diff --git a/amd-docs/install/ray-install.rst b/amd-docs/install/ray-install.rst new file mode 100644 index 000000000000..5cb8d32dbd46 --- /dev/null +++ b/amd-docs/install/ray-install.rst @@ -0,0 +1,233 @@ +.. meta:: + :description: installing Ray for ROCm + :keywords: installation instructions, Docker, AMD, ROCm, Ray + +.. _ray-on-rocm-installation: + +******************************************************************** +Ray on ROCm installation +******************************************************************** + +System requirements +==================================================================== + +To use Ray `2.55.1 `__, you need the following prerequisites: + +- **ROCm version:** `7.2.1 `__ +- **Operating system:** Ubuntu 22.04 +- **GPU platform:** AMD Instinct™ MI300X, MI325X, MI355X +- **PyTorch:** `2.10.0 `__ +- **Python:** `3.12 `__ +- **vLLM:** `0.18.0 `__ + +Install Ray +================================================================================ + +To install Ray on ROCm, you have the following options: + +* :ref:`use-docker-with-ray-pre-installed` **(recommended)** +* :ref:`build-ray-rocm-docker-image` +* :ref:`install-rocm-ray-bare-metal` +* :ref:`build-rocm-ray-from-source` + +.. _use-docker-with-ray-pre-installed: + +Use a prebuilt Docker image with Ray pre-installed +-------------------------------------------------------------------------------------- + +The recommended way to set up a Ray environment and avoid potential installation issues is with Docker. +The tested, prebuilt image includes Ray, PyTorch, ROCm, and other dependencies. + +Prebuilt Docker images with Ray configured for ROCm are available on `Docker Hub `_. + +1. Pull the Docker image: + + .. code-block:: bash + + docker pull rocm/ray:ray-2.55.1_rocm7.2.1_ubuntu22.04_py3.12_vllm0.18.0 + +2. Launch and connect to the Docker container: + + .. code-block:: bash + + docker run -it -d \ + --network=host \ + --device=/dev/kfd \ + --device=/dev/dri \ + --ipc=host \ + --shm-size 64G \ + --group-add video \ + --cap-add=SYS_PTRACE \ + --security-opt seccomp=unconfined \ + -v $(pwd):/host_dir \ + -w /app \ + --name rocm_ray \ + rocm/ray:ray-2.55.1_rocm7.2.1_ubuntu22.04_py3.12_vllm0.18.0 \ + /bin/bash + + docker attach rocm_ray + + .. tip:: + + * The ``--shm-size`` parameter allocates shared memory for the container. Adjust it based on your system's resources if needed. + * Replace ``$(pwd)`` with the absolute path to the directory you want to mount inside the container. + +.. _build-ray-rocm-docker-image: + +Build your own Docker image +-------------------------------------------------------------------------------------- + +1. Clone the `https://github.com/AMD-Ecosystem/ray `__ repository: + + .. code-block:: bash + + git clone https://github.com/AMD-Ecosystem/ray.git -b release/2.55.1 + +2. Build the Docker container using the Dockerfile in the ``ray/docker`` directory: + + .. code-block:: bash + + cd ray + docker build -f docker/Dockerfile.rocm -t rocm-ray . + +3. Launch and connect to the container: + + .. code-block:: bash + + docker run --rm -it \ + --device /dev/dri \ + --device /dev/kfd \ + -p 8265:8265 \ + --group-add video \ + --cap-add SYS_PTRACE \ + --security-opt seccomp=unconfined \ + --privileged \ + -v $HOME/.ssh:/root/.ssh \ + -v $HOME:$HOME \ + --shm-size 128G \ + -w $PWD \ + --name my-rocm-ray \ + rocm-ray \ + /bin/bash + + .. note:: + + The ``--shm-size`` parameter allocates shared memory for the container. It can be adjusted based on your system's resources. + +4. Verify the installed Ray version: + + .. code-block:: bash + + pip3 freeze | grep ray + + Expected output: + + .. code-block:: + + ray==2.55.1 + +.. _install-rocm-ray-bare-metal: + +Install Ray on bare metal or a custom container +-------------------------------------------------------------------------------------- + +Follow these steps if you prefer to install ROCm manually on your host system or in a custom container. + +1. Install ROCm. Follow the `ROCm installation guide `__ to install ROCm on your system. + + Once installed, verify your ROCm installation using: + + .. code-block:: bash + + amd-smi + + Expected output: + + .. code-block:: bash + + +------------------------------------------------------------------------------+ + | AMD-SMI 26.0.0+37d158ab amdgpu version: 6.14.14 ROCm version: 7.2.1 | + | Platform: Linux Baremetal | + |-------------------------------------+----------------------------------------| + | BDF GPU-Name | Mem-Uti Temp UEC Power-Usage | + | GPU HIP-ID OAM-ID Partition-Mode | GFX-Uti Fan Mem-Usage | + |=====================================+========================================| + | 0000:05:00.0 ...Instinct MI300X OAM | 0 % 38 °C 0 141/750 W | + | 0 0 7 SPX/NPS1 | 0 % N/A 283/196592 MB | + |-------------------------------------+----------------------------------------| + | 0000:26:00.0 ...Instinct MI300X OAM | 0 % 38 °C 0 135/750 W | + | 1 1 6 SPX/NPS1 | 0 % N/A 283/196592 MB | + |-------------------------------------+----------------------------------------| + | 0000:46:00.0 ...Instinct MI300X OAM | 0 % 42 °C 0 139/750 W | + | 2 2 4 SPX/NPS1 | 0 % N/A 283/196592 MB | + |-------------------------------------+----------------------------------------| + | 0000:65:00.0 ...Instinct MI300X OAM | 0 % 37 °C 0 136/750 W | + | 3 3 5 SPX/NPS1 | 0 % N/A 283/196592 MB | + |-------------------------------------+----------------------------------------| + | 0000:85:00.0 ...Instinct MI300X OAM | 0 % 41 °C 0 139/750 W | + | 4 4 3 SPX/NPS1 | 0 % N/A 283/196592 MB | + |-------------------------------------+----------------------------------------| + | 0000:a6:00.0 ...Instinct MI300X OAM | 0 % 38 °C 0 140/750 W | + | 5 5 2 SPX/NPS1 | 0 % N/A 283/196592 MB | + |-------------------------------------+----------------------------------------| + | 0000:c6:00.0 ...Instinct MI300X OAM | 0 % 38 °C 0 138/750 W | + | 6 6 0 SPX/NPS1 | 0 % N/A 283/196592 MB | + |-------------------------------------+----------------------------------------| + | 0000:e5:00.0 ...Instinct MI300X OAM | 0 % 37 °C 0 139/750 W | + | 7 7 1 SPX/NPS1 | 0 % N/A 283/196592 MB | + +-------------------------------------+----------------------------------------+ + +------------------------------------------------------------------------------+ + | Processes: | + | GPU PID Process Name GTT_MEM VRAM_MEM MEM_USAGE CU % | + |==============================================================================| + | No running processes found | + +------------------------------------------------------------------------------+ + +2. Install the required version of Ray with ROCm support using pip: + + .. code-block:: bash + + pip install -U ray[all]==2.55.1 + +3. Verify the installed Ray version: + + .. code-block:: bash + + pip3 freeze | grep ray + + Expected output: + + .. code-block:: + + ray==2.55.1 + +.. _build-rocm-ray-from-source: + +Build Ray from source +-------------------------------------------------------------------------------------- + +Follow the `Building Ray from source guide `__ +to build Ray with ROCm support from source. + +.. _ray-verify-installation: + +Test the Ray installation +====================================================================================== + +Ray unit tests are optional for validating your installation if you used a +prebuilt Docker image from AMD ROCm Docker Hub. To run unit tests manually and +validate your installation fully, follow these steps: + +1. After launching the container, test whether Ray detects ROCm devices as expected. + + .. code-block:: bash + + python3 -c "import ray; ray.init(); print(ray.cluster_resources())" + +2. If the setup is successful, the output should list all available ROCm devices. + + Expected output (for example, on the MI300X node): + + .. code-block:: shell-session + + {'memory': 1420360912896.0, 'GPU': 8.0, 'accelerator_type:AMD-Instinct-MI300X-OAM': 1.0, 'node:10.7.39.110': 1.0, 'CPU': 384.0, 'node:__internal_head__': 1.0, 'object_store_memory': 200000000000.0} diff --git a/amd-docs/sphinx/_toc.yml.in b/amd-docs/sphinx/_toc.yml.in new file mode 100644 index 000000000000..8d6e23ab1022 --- /dev/null +++ b/amd-docs/sphinx/_toc.yml.in @@ -0,0 +1,36 @@ +defaults: + numbered: False + maxdepth: 6 +root: index +subtrees: +- entries: + - file: what-is-ray.rst + title: What is Ray? + +- caption: Install + entries: + - file: install/ray-install.rst + title: Install Ray + +- caption: Examples + entries: + - url: https://docs.ray.io/en/latest/ray-overview/examples/index.html + title: Ray examples (upstream) + - url: https://docs.ray.io/en/latest/ray-overview/use-cases.html + title: Ray use cases (upstream) + +- caption: Reference + entries: + - url: https://docs.ray.io/en/latest/ray-overview/getting-started.html + title: Get started with Ray (upstream) + - url: https://docs.ray.io/en/latest/ray-core/api/index.html + title: Ray Core API (upstream) + +- caption: About + entries: + - url: https://rocm.blogs.amd.com/ecosystems-and-partners/ray-rocm7/README.html + title: ROCm Ray blog + - url: https://github.com/AMD-Ecosystem/ray/blob/amd-integration/CONTRIBUTING.rst + title: Contribute to Ray + - file: about/license.rst + title: License diff --git a/amd-docs/sphinx/requirements.in b/amd-docs/sphinx/requirements.in new file mode 100644 index 000000000000..834f75631ead --- /dev/null +++ b/amd-docs/sphinx/requirements.in @@ -0,0 +1 @@ +rocm-docs-core==1.37.0 diff --git a/amd-docs/sphinx/requirements.txt b/amd-docs/sphinx/requirements.txt new file mode 100644 index 000000000000..d8cf7dcf575a --- /dev/null +++ b/amd-docs/sphinx/requirements.txt @@ -0,0 +1,279 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile requirements.in +# +accessible-pygments==0.0.5 + # via pydata-sphinx-theme +alabaster==1.0.0 + # via sphinx +asttokens==3.0.2 + # via stack-data +attrs==26.1.0 + # via + # jsonschema + # jupyter-cache + # referencing +babel==2.18.0 + # via + # pydata-sphinx-theme + # sphinx +beautifulsoup4==4.15.0 + # via pydata-sphinx-theme +breathe==4.36.0 + # via rocm-docs-core +certifi==2026.6.17 + # via requests +cffi==2.1.0 + # via + # cryptography + # pynacl +charset-normalizer==3.4.9 + # via requests +click==8.4.2 + # via + # jupyter-cache + # sphinx-external-toc +colorama==0.4.6 + # via + # click + # ipython + # sphinx +comm==0.2.3 + # via ipykernel +cryptography==49.0.0 + # via pyjwt +debugpy==1.8.21 + # via ipykernel +decorator==5.3.1 + # via ipython +docutils==0.22.4 + # via + # myst-parser + # pydata-sphinx-theme + # sphinx +executing==2.2.1 + # via stack-data +fastjsonschema==2.21.2 + # via + # nbformat + # rocm-docs-core +gitdb==4.0.12 + # via gitpython +gitpython==3.1.51 + # via rocm-docs-core +greenlet==3.5.3 + # via sqlalchemy +idna==3.18 + # via requests +imagesize==2.0.0 + # via sphinx +importlib-metadata==9.0.0 + # via + # jupyter-cache + # myst-nb +ipykernel==7.3.0 + # via myst-nb +ipython==9.15.0 + # via + # ipykernel + # myst-nb +ipython-pygments-lexers==1.1.1 + # via ipython +jedi==0.20.0 + # via ipython +jinja2==3.1.6 + # via + # myst-parser + # sphinx +jsonschema==4.26.0 + # via nbformat +jsonschema-specifications==2025.9.1 + # via jsonschema +jupyter-cache==1.0.1 + # via myst-nb +jupyter-client==8.9.1 + # via + # ipykernel + # nbclient +jupyter-core==5.9.1 + # via + # ipykernel + # jupyter-client + # nbclient + # nbformat +markdown-it-py==4.2.0 + # via + # mdit-py-plugins + # myst-parser +markupsafe==3.0.3 + # via jinja2 +matplotlib-inline==0.2.2 + # via + # ipykernel + # ipython +mdit-py-plugins==0.6.1 + # via myst-parser +mdurl==0.1.2 + # via markdown-it-py +myst-nb==1.4.0 + # via rocm-docs-core +myst-parser==5.1.0 + # via myst-nb +nbclient==0.11.0 + # via + # jupyter-cache + # myst-nb +nbformat==5.10.4 + # via + # jupyter-cache + # myst-nb + # nbclient +nest-asyncio2==1.7.2 + # via ipykernel +packaging==26.2 + # via + # ipykernel + # sphinx +parso==0.8.7 + # via jedi +platformdirs==4.10.0 + # via jupyter-core +prompt-toolkit==3.0.52 + # via ipython +psutil==7.2.2 + # via + # ipykernel + # ipython +pure-eval==0.2.3 + # via stack-data +pycparser==3.0 + # via cffi +pydata-sphinx-theme==0.16.1 + # via + # rocm-docs-core + # sphinx-book-theme +pygithub==2.9.1 + # via rocm-docs-core +pygments==2.20.0 + # via + # accessible-pygments + # ipython + # ipython-pygments-lexers + # pydata-sphinx-theme + # sphinx +pyjwt[crypto]==2.13.0 + # via pygithub +pynacl==1.6.2 + # via pygithub +python-dateutil==2.9.0.post0 + # via jupyter-client +pyyaml==6.0.3 + # via + # jupyter-cache + # myst-nb + # myst-parser + # rocm-docs-core + # sphinx-external-toc +pyzmq==27.1.0 + # via + # ipykernel + # jupyter-client +referencing==0.37.0 + # via + # jsonschema + # jsonschema-specifications +requests==2.34.2 + # via + # pygithub + # sphinx +rocm-docs-core==1.37.0 + # via -r requirements.in +roman-numerals==4.1.0 + # via sphinx +rpds-py==2026.6.3 + # via + # jsonschema + # referencing +six==1.17.0 + # via python-dateutil +smmap==5.0.3 + # via gitdb +snowballstemmer==3.1.1 + # via sphinx +soupsieve==2.8.4 + # via beautifulsoup4 +sphinx==9.1.0 + # via + # breathe + # myst-nb + # myst-parser + # pydata-sphinx-theme + # rocm-docs-core + # sphinx-book-theme + # sphinx-copybutton + # sphinx-design + # sphinx-external-toc + # sphinx-multitoc-numbering + # sphinx-notfound-page +sphinx-book-theme==1.2.0 + # via rocm-docs-core +sphinx-copybutton==0.5.2 + # via rocm-docs-core +sphinx-design==0.7.0 + # via rocm-docs-core +sphinx-external-toc==1.1.0 + # via rocm-docs-core +sphinx-multitoc-numbering==0.1.3 + # via sphinx-external-toc +sphinx-notfound-page==1.1.0 + # via rocm-docs-core +sphinxcontrib-applehelp==2.0.0 + # via sphinx +sphinxcontrib-devhelp==2.0.0 + # via sphinx +sphinxcontrib-htmlhelp==2.1.0 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==2.0.0 + # via sphinx +sphinxcontrib-serializinghtml==2.0.0 + # via sphinx +sqlalchemy==2.0.51 + # via jupyter-cache +stack-data==0.6.3 + # via ipython +tabulate==0.10.0 + # via jupyter-cache +tornado==6.5.7 + # via + # ipykernel + # jupyter-client +traitlets==5.15.1 + # via + # ipykernel + # ipython + # jupyter-client + # jupyter-core + # matplotlib-inline + # nbclient + # nbformat +typing-extensions==4.16.0 + # via + # beautifulsoup4 + # jupyter-client + # myst-nb + # pydata-sphinx-theme + # pygithub + # referencing + # sqlalchemy +urllib3==2.7.0 + # via + # pygithub + # requests +wcwidth==0.8.2 + # via prompt-toolkit +zipp==4.1.0 + # via importlib-metadata diff --git a/amd-docs/what-is-ray.rst b/amd-docs/what-is-ray.rst new file mode 100644 index 000000000000..90eb8a7a5fc7 --- /dev/null +++ b/amd-docs/what-is-ray.rst @@ -0,0 +1,76 @@ +.. meta:: + :description: What is Ray? + :keywords: Ray, documentation, reinforcement learning, deep learning, framework, GPU, AMD, ROCm, overview, introduction + +.. _what-is-ray: + +******************************************************************** +What is Ray? +******************************************************************** + +Ray is a unified framework for scaling AI and Python applications from your laptop +to a full cluster, without changing your code. Ray consists of `a core distributed +runtime `__ and a set of +`AI libraries `__ for +simplifying machine learning computations. + +Ray is a general-purpose framework that runs many types of workloads efficiently. +Any Python application can be scaled with Ray, without extra infrastructure. + +Features and use cases +==================================================================== + +Ray provides the following key features: + +- **Unified Distributed Runtime:** Offers actor/task APIs with resource-aware + scheduling for GPUs and CPUs, enabling elastic, fault-tolerant workloads + on ROCm-enabled clusters. + +- **AI Libraries:** Includes Ray Train for distributed training, Ray Tune + for hyperparameter optimization, Ray RLlib for reinforcement learning, + and Ray Serve for scalable model serving. + +- **Cluster Orchestration:** Integrates with Kubernetes and on-prem schedulers + for autoscaling, placement groups, and isolation across multi-tenant clusters. + +- **Data and Streaming:** Provides Ray Data and streaming primitives for + efficient input pipelines, batch processing, and online inference. + +- **Observability and Reliability:** Built-in metrics, logging, dashboards, + and autoscaling policies to monitor and recover long-running jobs. + +Ray is commonly used in the following scenarios: + +- **Distributed Training:** Scale PyTorch and other ML workloads across + AMD Instinct GPUs with minimal code changes. + +- **Hyperparameter Tuning:** Run large HPO sweeps with efficient trial + scheduling and early stopping. + +- **Reinforcement Learning:** Train RL agents at scale using RLlib with + flexible environment integration. + +- **Model Serving Pipelines:** Deploy low-latency inference services and + batch scoring jobs with Ray Serve. + +For more use cases and recommendations, see the AMD GPU tabs in the `Accelerator Support +topic `__ +of the Ray core documentation and refer to the `AMD ROCm blog `__, +where you can search for Ray examples and best practices to optimize your workloads on AMD GPUs. + +Why Ray? +==================================================================== + +Ray is well suited for end-to-end ML systems for the following reasons: + +- Its **simple programming model** abstracts away distributed systems + complexity while exposing fine-grained resource control. + +- **Rich library ecosystem** accelerates common ML tasks from training + to tuning and serving. + +- **Production-grade orchestration** with autoscaling, fault tolerance, + and observability supports enterprise deployments. + +- **Seamless GPU integration** allows efficient scheduling and utilization + of ROCm-powered AMD Instinct clusters.