From 2a7554c0b94711991981b1f2fd70db9723abb0bd Mon Sep 17 00:00:00 2001 From: Mukhil M S <167260682+mukh1l@users.noreply.github.com> Date: Tue, 15 Jul 2025 15:17:58 -0500 Subject: [PATCH] Framework: DGL Compatability * Introducing new file for DGL Compatability * Update dgl-compatibility.rst * Update .wordlist.txt * Update .wordlist.txt * Update deep-learning-rocm.rst * compatibility fixes * Update docs/compatibility/ml-compatibility/dgl-compatibility.rst Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com> * Update docs/compatibility/ml-compatibility/dgl-compatibility.rst Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com> * Update docs/compatibility/ml-compatibility/dgl-compatibility.rst Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com> * Update docs/compatibility/ml-compatibility/dgl-compatibility.rst Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com> * Update dgl-compatibility.rst * Update dgl-compatibility.rst * Update dgl-compatibility.rst * Update dgl-compatibility.rst * additions to use-cases and system support * wording and fixes * Update dgl-compatibility.rst * Update dgl-compatibility.rst * remove table heading * Update compatibility-matrix-historical-6.0.csv --------- Co-authored-by: anisha-amd Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com> --- .wordlist.txt | 14 + docs/compatibility/compatibility-matrix.rst | 1 + .../ml-compatibility/dgl-compatibility.rst | 255 ++++++++++++++++++ docs/how-to/deep-learning-rocm.rst | 2 + 4 files changed, 272 insertions(+) create mode 100644 docs/compatibility/ml-compatibility/dgl-compatibility.rst diff --git a/.wordlist.txt b/.wordlist.txt index 2001972d7..57f58ab9f 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -6,6 +6,7 @@ ACS AccVGPR AccVGPRs ALU +AllReduce AMD AMDGPU AMDGPUs @@ -13,6 +14,7 @@ AMDMIGraphX AMI AOCC AOMP +AOT AOTriton APBDIS APIC @@ -80,10 +82,13 @@ ConnectX CuPy da Dashboarding +Dataloading DBRX DDR DF DGEMM +DGL +DGLGraph dGPU dGPUs DIMM @@ -101,6 +106,7 @@ DataFrame DataLoader DataParallel Debian +decompositions DeepSeek DeepSpeed Dependabot @@ -131,6 +137,7 @@ FluxBenchmark Fortran Fuyu GALB +GAT GCC GCD GCDs @@ -158,6 +165,8 @@ GPT GPU GPU's GPUs +Graphbolt +GraphSage GRBM GenAI GenZ @@ -170,6 +179,7 @@ HIPCC HIPExtension HIPIFY HIPification +hipification HIPify HPC HPCG @@ -218,6 +228,7 @@ KV KVM Karpathy's KiB +Kineto Keras Khronos LAPACK @@ -267,6 +278,7 @@ Miniconda MirroredStrategy Mixtral MosaicML +Mpops Multicore Multithreaded MyEnvironment @@ -280,6 +292,7 @@ NIC NICs NLI NLP +NN NPKit NPS NSP @@ -316,6 +329,7 @@ OpenMPI OpenSSL OpenVX OpenXLA +Optim Oversubscription PagedAttention Pallas diff --git a/docs/compatibility/compatibility-matrix.rst b/docs/compatibility/compatibility-matrix.rst index 8bd85284d..5587c368d 100644 --- a/docs/compatibility/compatibility-matrix.rst +++ b/docs/compatibility/compatibility-matrix.rst @@ -55,6 +55,7 @@ compatibility and system requirements. :doc:`PyTorch <../compatibility/ml-compatibility/pytorch-compatibility>`,"2.6, 2.5, 2.4, 2.3","2.6, 2.5, 2.4, 2.3","2.4, 2.3, 2.2, 2.1, 2.0, 1.13" :doc:`TensorFlow <../compatibility/ml-compatibility/tensorflow-compatibility>`,"2.18.1, 2.17.1, 2.16.2","2.18.1, 2.17.1, 2.16.2","2.17.0, 2.16.2, 2.15.1" :doc:`JAX <../compatibility/ml-compatibility/jax-compatibility>`,0.4.35,0.4.35,0.4.31 + :doc:`DGL <../compatibility/ml-compatibility/dgl-compatibility>`,2.4.0,2.4.0,N/A `ONNX Runtime `_,1.2,1.2,1.17.3 ,,, THIRD PARTY COMMS,.. _thirdpartycomms-support-compatibility-matrix:,, diff --git a/docs/compatibility/ml-compatibility/dgl-compatibility.rst b/docs/compatibility/ml-compatibility/dgl-compatibility.rst new file mode 100644 index 000000000..2dcbe87bf --- /dev/null +++ b/docs/compatibility/ml-compatibility/dgl-compatibility.rst @@ -0,0 +1,255 @@ +:orphan: + +.. meta:: + :description: Deep Graph Library (DGL) compatibility + :keywords: GPU, DGL compatibility + +.. version-set:: rocm_version latest + +******************************************************************************** +DGL compatibility +******************************************************************************** + +Deep Graph Library `(DGL) `_ is an easy-to-use, high-performance and scalable +Python package for deep learning on graphs. DGL is framework agnostic, meaning +if a deep graph model is a component in an end-to-end application, the rest of +the logic is implemented using PyTorch. + +* ROCm support for DGL is hosted in the `https://github.com/ROCm/dgl `_ repository. +* Due to independent compatibility considerations, this location differs from the `https://github.com/dmlc/dgl `_ upstream repository. +* Use the prebuilt :ref:`Docker images ` with DGL, PyTorch, and ROCm preinstalled. +* See the :doc:`ROCm DGL installation guide ` + to install and get started. + + +Supported devices +================================================================================ + +- **Officially Supported**: TF32 with AMD Instinct MI300X (through hipblaslt) +- **Partially Supported**: TF32 with AMD Instinct MI250X + + +.. _dgl-recommendations: + +Use cases and recommendations +================================================================================ + +DGL can be used for Graph Learning, and building popular graph models like +GAT, GCN and GraphSage. Using these we can support a variety of use-cases such as: + +- Recommender systems +- Network Optimization and Analysis +- 1D (Temporal) and 2D (Image) Classification +- Drug Discovery + +Refer to :doc:`ROCm DGL blog posts ` +for examples and best practices to optimize your training workflows on AMD GPUs. + +Coverage includes: + +- Single-GPU training/inference +- Multi-GPU training + +Benchmarking details are included in the :doc:`Benchmarks` section. + + +.. _dgl-docker-compat: + +Docker image compatibility +================================================================================ + +.. |docker-icon| raw:: html + + + +AMD validates and publishes `DGL images `_ +with ROCm and Pytorch backends on Docker Hub. The following Docker image tags and associated +inventories were tested on `ROCm 6.4.0 `_. +Click the |docker-icon| to view the image on Docker Hub. + +.. list-table:: DGL Docker image components + :header-rows: 1 + :class: docker-image-compatibility + + * - Docker + - DGL + - PyTorch + - Ubuntu + - Python + + * - .. raw:: html + + + + - `2.4.0 `_ + - `2.6.0 `_ + - 24.04 + - `3.12.9 `_ + + * - .. raw:: html + + + + - `2.4.0 `_ + - `2.4.1 `_ + - 24.04 + - `3.12.9 `_ + + + * - .. raw:: html + + + + - `2.4.0 `_ + - `2.4.1 `_ + - 22.04 + - `3.10.16 `_ + + + * - .. raw:: html + + + + - `2.4.0 `_ + - `2.3.0 `_ + - 22.04 + - `3.10.16 `_ + + +Key ROCm libraries for DGL +================================================================================ + +DGL on ROCm depends on specific libraries that affect its features and performance. +Using the DGL Docker container or building it with the provided docker file or a ROCm base image is recommended. +If you prefer to build it yourself, ensure the following dependencies are installed: + +.. list-table:: + :header-rows: 1 + + * - ROCm library + - Version + - Purpose + * - `Composable Kernel `_ + - :version-ref:`"Composable Kernel" rocm_version` + - Enables faster execution of core operations like matrix multiplication + (GEMM), convolutions and transformations. + * - `hipBLAS `_ + - :version-ref:`hipBLAS rocm_version` + - Provides GPU-accelerated Basic Linear Algebra Subprograms (BLAS) for + matrix and vector operations. + * - `hipBLASLt `_ + - :version-ref:`hipBLASLt rocm_version` + - hipBLASLt is an extension of the hipBLAS library, providing additional + features like epilogues fused into the matrix multiplication kernel or + use of integer tensor cores. + * - `hipCUB `_ + - :version-ref:`hipCUB rocm_version` + - Provides a C++ template library for parallel algorithms for reduction, + scan, sort and select. + * - `hipFFT `_ + - :version-ref:`hipFFT rocm_version` + - Provides GPU-accelerated Fast Fourier Transform (FFT) operations. + * - `hipRAND `_ + - :version-ref:`hipRAND rocm_version` + - Provides fast random number generation for GPUs. + * - `hipSOLVER `_ + - :version-ref:`hipSOLVER rocm_version` + - Provides GPU-accelerated solvers for linear systems, eigenvalues, and + singular value decompositions (SVD). + * - `hipSPARSE `_ + - :version-ref:`hipSPARSE rocm_version` + - Accelerates operations on sparse matrices, such as sparse matrix-vector + or matrix-matrix products. + * - `hipSPARSELt `_ + - :version-ref:`hipSPARSELt rocm_version` + - Accelerates operations on sparse matrices, such as sparse matrix-vector + or matrix-matrix products. + * - `hipTensor `_ + - :version-ref:`hipTensor rocm_version` + - Optimizes for high-performance tensor operations, such as contractions. + * - `MIOpen `_ + - :version-ref:`MIOpen rocm_version` + - Optimizes deep learning primitives such as convolutions, pooling, + normalization, and activation functions. + * - `MIGraphX `_ + - :version-ref:`MIGraphX rocm_version` + - Adds graph-level optimizations, ONNX models and mixed precision support + and enable Ahead-of-Time (AOT) Compilation. + * - `MIVisionX `_ + - :version-ref:`MIVisionX rocm_version` + - Optimizes acceleration for computer vision and AI workloads like + preprocessing, augmentation, and inferencing. + * - `rocAL `_ + - :version-ref:`rocAL rocm_version` + - Accelerates the data pipeline by offloading intensive preprocessing and + augmentation tasks. rocAL is part of MIVisionX. + * - `RCCL `_ + - :version-ref:`RCCL rocm_version` + - Optimizes for multi-GPU communication for operations like AllReduce and + Broadcast. + * - `rocDecode `_ + - :version-ref:`rocDecode rocm_version` + - Provides hardware-accelerated data decoding capabilities, particularly + for image, video, and other dataset formats. + * - `rocJPEG `_ + - :version-ref:`rocJPEG rocm_version` + - Provides hardware-accelerated JPEG image decoding and encoding. + * - `RPP `_ + - :version-ref:`RPP rocm_version` + - Speeds up data augmentation, transformation, and other preprocessing steps. + * - `rocThrust `_ + - :version-ref:`rocThrust rocm_version` + - Provides a C++ template library for parallel algorithms like sorting, + reduction, and scanning. + * - `rocWMMA `_ + - :version-ref:`rocWMMA rocm_version` + - Accelerates warp-level matrix-multiply and matrix-accumulate to speed up matrix + multiplication (GEMM) and accumulation operations with mixed precision + support. + + +Supported features +================================================================================ + +Many functions and methods available in DGL Upstream are also supported in DGL ROCm. +Instead of listing them all, support is grouped into the following categories to provide a general overview. + +* DGL Base +* DGL Backend +* DGL Data +* DGL Dataloading +* DGL DGLGraph +* DGL Function +* DGL Ops +* DGL Sampling +* DGL Transforms +* DGL Utils +* DGL Distributed +* DGL Geometry +* DGL Mpops +* DGL NN +* DGL Optim +* DGL Sparse + + +Unsupported features +================================================================================ + +* Graphbolt +* Partial TF32 Support (MI250x only) +* Kineto/ ROCTracer integration + + +Unsupported functions +================================================================================ + +* ``more_nnz`` +* ``format`` +* ``multiprocess_sparse_adam_state_dict`` +* ``record_stream_ndarray`` +* ``half_spmm`` +* ``segment_mm`` +* ``gather_mm_idx_b`` +* ``pgexplainer`` +* ``sample_labors_prob`` +* ``sample_labors_noprob`` \ No newline at end of file diff --git a/docs/how-to/deep-learning-rocm.rst b/docs/how-to/deep-learning-rocm.rst index 606e13cf2..e9b9881e8 100644 --- a/docs/how-to/deep-learning-rocm.rst +++ b/docs/how-to/deep-learning-rocm.rst @@ -17,6 +17,7 @@ features for these ROCm-enabled deep learning frameworks. * :doc:`PyTorch compatibility <../compatibility/ml-compatibility/pytorch-compatibility>` * :doc:`TensorFlow compatibility <../compatibility/ml-compatibility/tensorflow-compatibility>` * :doc:`JAX compatibility <../compatibility/ml-compatibility/jax-compatibility>` +* :doc:`DGL compatibility <../compatibility/ml-compatibility/dgl-compatibility>` This chart steps through typical installation workflows for installing deep learning frameworks for ROCm. @@ -29,6 +30,7 @@ See the installation instructions to get started. * :doc:`PyTorch for ROCm ` * :doc:`TensorFlow for ROCm ` * :doc:`JAX for ROCm ` +* :doc:`DGL for ROCm ` .. note::