From 81fb13e279ad71123448991c342ff060c32035d1 Mon Sep 17 00:00:00 2001 From: "Nichols A. Romero" Date: Fri, 20 Dec 2024 00:03:52 +0000 Subject: [PATCH 1/2] Update C++ Custom Operators tutorial with note about AMD GPU. --- advanced_source/cpp_custom_ops.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/advanced_source/cpp_custom_ops.rst b/advanced_source/cpp_custom_ops.rst index ffabd6eff77..18dd2e510be 100644 --- a/advanced_source/cpp_custom_ops.rst +++ b/advanced_source/cpp_custom_ops.rst @@ -420,3 +420,7 @@ In this tutorial, we went over the recommended approach to integrating Custom C+ and CUDA operators with PyTorch. The ``TORCH_LIBRARY/torch.library`` APIs are fairly low-level. For more information about how to use the API, see `The Custom Operators Manual `_. + +Custom Operators on the AMD GPU +------------------------------- +This tutorial will also work on the AMD GPU with no additional modifications. From 0f820d18e56625643e64c654a247bcea6b287670 Mon Sep 17 00:00:00 2001 From: "Nichols A. Romero" Date: Mon, 13 Jan 2025 21:18:22 +0000 Subject: [PATCH 2/2] Put in a NOTE call out box and change to AMD ROCm. --- advanced_source/cpp_custom_ops.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/advanced_source/cpp_custom_ops.rst b/advanced_source/cpp_custom_ops.rst index 18dd2e510be..4aa0e023b57 100644 --- a/advanced_source/cpp_custom_ops.rst +++ b/advanced_source/cpp_custom_ops.rst @@ -19,6 +19,10 @@ Custom C++ and CUDA Operators * PyTorch 2.4 or later * Basic understanding of C++ and CUDA programming +.. note:: + + This tutorial will also work on AMD ROCm with no additional modifications. + PyTorch offers a large library of operators that work on Tensors (e.g. torch.add, torch.sum, etc). However, you may wish to bring a new custom operator to PyTorch. This tutorial demonstrates the blessed path to authoring a custom operator written in C++/CUDA. @@ -420,7 +424,3 @@ In this tutorial, we went over the recommended approach to integrating Custom C+ and CUDA operators with PyTorch. The ``TORCH_LIBRARY/torch.library`` APIs are fairly low-level. For more information about how to use the API, see `The Custom Operators Manual `_. - -Custom Operators on the AMD GPU -------------------------------- -This tutorial will also work on the AMD GPU with no additional modifications.