Skip to content

Commit 92d6dd8

Browse files
apakbinjerrymannil
authored andcommitted
[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.
1 parent 02cee70 commit 92d6dd8

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

aten/src/ATen/miopen/Descriptors.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <ATen/miopen/miopen-wrapper.h>
66
#include <ATen/core/Tensor.h>
77
#include <ATen/TensorUtils.h>
8+
#include <c10/macros/Export.h>
89

910
namespace at { namespace native {
1011

@@ -64,7 +65,7 @@ class Descriptor
6465
std::unique_ptr<T, DescriptorDeleter<T, dtor>> desc_;
6566
};
6667

67-
class TensorDescriptor
68+
class TORCH_CUDA_CPP_API TensorDescriptor
6869
: public Descriptor<miopenTensorDescriptor,
6970
&miopenCreateTensorDescriptor,
7071
&miopenDestroyTensorDescriptor>

aten/src/ATen/miopen/Handle.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#pragma once
22

33
#include <ATen/miopen/miopen-wrapper.h>
4+
#include <c10/macros/Export.h>
45

56
namespace at { namespace native {
67

7-
miopenHandle_t getMiopenHandle();
8+
TORCH_CUDA_CPP_API miopenHandle_t getMiopenHandle();
89

910
}} // namespace

aten/src/ATen/miopen/Types.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
#include <ATen/miopen/miopen-wrapper.h>
44
#include <ATen/Tensor.h>
5+
#include <c10/macros/Export.h>
56

67
namespace at { namespace native {
78

8-
miopenDataType_t getMiopenDataType(const at::Tensor& tensor);
9+
TORCH_CUDA_CPP_API miopenDataType_t getMiopenDataType(const at::Tensor& tensor);
910

1011
int64_t miopen_version();
1112

0 commit comments

Comments
 (0)