From de5637bfe9a90e725c6ff97971768d785dfced01 Mon Sep 17 00:00:00 2001 From: Arash Pakbin Date: Wed, 21 May 2025 18:50:27 -0700 Subject: [PATCH] [release/2.6] Exposing Some MIOpen Symbols (#2176) This PR exposes some MIOpen symbols, namely: 1. `miopenDataType_t getMiopenDataType(const at::Tensor& tensor)` 2. `miopenHandle_t getMiopenHandle()` 3. `class TensorDescriptor` to enable adding extensions that make use of them. --- aten/src/ATen/miopen/Descriptors.h | 3 ++- aten/src/ATen/miopen/Handle.h | 3 ++- aten/src/ATen/miopen/Types.h | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/aten/src/ATen/miopen/Descriptors.h b/aten/src/ATen/miopen/Descriptors.h index e32adf55c5513..6496fd1727f58 100644 --- a/aten/src/ATen/miopen/Descriptors.h +++ b/aten/src/ATen/miopen/Descriptors.h @@ -5,6 +5,7 @@ #include #include #include +#include namespace at { namespace native { @@ -64,7 +65,7 @@ class Descriptor std::unique_ptr> desc_; }; -class TensorDescriptor +class TORCH_CUDA_CPP_API TensorDescriptor : public Descriptor diff --git a/aten/src/ATen/miopen/Handle.h b/aten/src/ATen/miopen/Handle.h index 9d537d8091128..8747ee6daef82 100644 --- a/aten/src/ATen/miopen/Handle.h +++ b/aten/src/ATen/miopen/Handle.h @@ -1,9 +1,10 @@ #pragma once #include +#include namespace at { namespace native { -miopenHandle_t getMiopenHandle(); +TORCH_CUDA_CPP_API miopenHandle_t getMiopenHandle(); }} // namespace diff --git a/aten/src/ATen/miopen/Types.h b/aten/src/ATen/miopen/Types.h index 5a207c83d387e..c098e4e5baa87 100644 --- a/aten/src/ATen/miopen/Types.h +++ b/aten/src/ATen/miopen/Types.h @@ -2,10 +2,11 @@ #include #include +#include namespace at { namespace native { -miopenDataType_t getMiopenDataType(const at::Tensor& tensor); +TORCH_CUDA_CPP_API miopenDataType_t getMiopenDataType(const at::Tensor& tensor); int64_t miopen_version();