Skip to content

Commit 1a9ca16

Browse files
tvukovic-amdjithunnair-amdethanwee1xinyazhangpragupta
authored
[ROCm][Windows] Fixing undefined symbol linker error after exposing MIOpen symbols (#2415)
Changing TORCH_CUDA_CPP_API macros to TORCH_HIP_CPP in MIOpen header files according to closed [PR](pytorch#156479) in pytorch upstream. --------- Signed-off-by: Jagadish Krishnamoorthy <[email protected]> Co-authored-by: Jithun Nair <[email protected]> Co-authored-by: Ethan Wee <[email protected]> Co-authored-by: Jithun Nair <[email protected]> Co-authored-by: Xinya Zhang <[email protected]> Co-authored-by: Prachi Gupta <[email protected]> Co-authored-by: Dmitry Nikolaev <[email protected]> Co-authored-by: iupaikov-amd <[email protected]> Co-authored-by: omkar kakarparthi <[email protected]> Co-authored-by: Jeff Daily <[email protected]> Co-authored-by: rocm-mici <[email protected]> Co-authored-by: Michael Halkenhäuser <[email protected]> Co-authored-by: Hashem Hashemi <[email protected]> Co-authored-by: Jagadish Krishnamoorthy <[email protected]> Co-authored-by: Andres Lugo <[email protected]> Co-authored-by: pmaybank <[email protected]> Co-authored-by: pnikolic-amd <[email protected]> Co-authored-by: Jerry Mannil <[email protected]> Co-authored-by: Sampsa Riikonen <[email protected]> Co-authored-by: Ramya Ramineni <[email protected]> Co-authored-by: pytorchbot <[email protected]> Co-authored-by: Nikita Shulga <[email protected]> Co-authored-by: rzou <[email protected]> Co-authored-by: atalman <[email protected]> Co-authored-by: David Berard <[email protected]> Co-authored-by: Frank Lin <[email protected]> Co-authored-by: Wei Wang <[email protected]> Co-authored-by: Cao E <[email protected]> Co-authored-by: Sidharth Subbarao <[email protected]> Co-authored-by: Camyll Harajli <[email protected]> Co-authored-by: Aditya Tewari <[email protected]> Co-authored-by: Christopher Sidebottom <[email protected]> Co-authored-by: Ryo Suzuki <[email protected]> Co-authored-by: Ye Tao <[email protected]> Co-authored-by: Nikita Shulga <[email protected]> Co-authored-by: Eli Uriegas <[email protected]> Co-authored-by: Luca Wehrstedt <[email protected]> Co-authored-by: Robert Hardwick <[email protected]> Co-authored-by: Svetlana Karslioglu <[email protected]> Co-authored-by: Michael Lazos <[email protected]> Co-authored-by: bobrenjc93 <[email protected]> Co-authored-by: Nikita Shulga <[email protected]> Co-authored-by: Jane Xu <[email protected]> Co-authored-by: charlifu <[email protected]> Co-authored-by: Jack Taylor <[email protected]> Co-authored-by: Nichols A. Romero <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Sriram Kumar <[email protected]> Co-authored-by: Divin Honnappa <[email protected]> Co-authored-by: akashveramd <[email protected]>
1 parent c140442 commit 1a9ca16

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

aten/src/ATen/miopen/Descriptors.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct DescriptorDeleter {
3939
// function.
4040
template <typename T, miopenStatus_t (*ctor)(T**), miopenStatus_t (*dtor)(T*)>
4141
// NOLINTNEXTLINE(bugprone-exception-escape)
42-
class TORCH_CUDA_CPP_API Descriptor {
42+
class TORCH_HIP_CPP_API Descriptor {
4343
public:
4444
// Use desc() to access the underlying descriptor pointer in
4545
// a read-only fashion. Most client code should use this.
@@ -65,7 +65,7 @@ class TORCH_CUDA_CPP_API Descriptor {
6565
std::unique_ptr<T, DescriptorDeleter<T, dtor>> desc_;
6666
};
6767

68-
class TORCH_CUDA_CPP_API TensorDescriptor : public Descriptor<
68+
class TORCH_HIP_CPP_API TensorDescriptor : public Descriptor<
6969
miopenTensorDescriptor,
7070
&miopenCreateTensorDescriptor,
7171
&miopenDestroyTensorDescriptor> {
@@ -88,7 +88,7 @@ class TORCH_CUDA_CPP_API TensorDescriptor : public Descriptor<
8888

8989
std::ostream& operator<<(std::ostream & out, const TensorDescriptor& d);
9090

91-
class TORCH_CUDA_CPP_API FilterDescriptor : public Descriptor<
91+
class TORCH_HIP_CPP_API FilterDescriptor : public Descriptor<
9292
miopenTensorDescriptor,
9393
&miopenCreateTensorDescriptor,
9494
&miopenDestroyTensorDescriptor> {
@@ -105,7 +105,7 @@ class TORCH_CUDA_CPP_API FilterDescriptor : public Descriptor<
105105
}
106106
};
107107

108-
struct TORCH_CUDA_CPP_API ConvolutionDescriptor
108+
struct TORCH_HIP_CPP_API ConvolutionDescriptor
109109
: public Descriptor<
110110
miopenConvolutionDescriptor,
111111
&miopenCreateConvolutionDescriptor,
@@ -121,7 +121,7 @@ struct TORCH_CUDA_CPP_API ConvolutionDescriptor
121121
};
122122

123123
// NOLINTNEXTLINE(bugprone-exception-escape)
124-
struct TORCH_CUDA_CPP_API DropoutDescriptor
124+
struct TORCH_HIP_CPP_API DropoutDescriptor
125125
: public Descriptor<
126126
miopenDropoutDescriptor,
127127
&miopenCreateDropoutDescriptor,
@@ -137,7 +137,7 @@ struct TORCH_CUDA_CPP_API DropoutDescriptor
137137
}
138138
};
139139

140-
struct TORCH_CUDA_CPP_API RNNDescriptor
140+
struct TORCH_HIP_CPP_API RNNDescriptor
141141
: public Descriptor<miopenRNNDescriptor,
142142
&miopenCreateRNNDescriptor,
143143
&miopenDestroyRNNDescriptor>

aten/src/ATen/miopen/Handle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55

66
namespace at::native {
77

8-
TORCH_CUDA_CPP_API miopenHandle_t getMiopenHandle();
8+
TORCH_HIP_CPP_API miopenHandle_t getMiopenHandle();
99
} // namespace at::native

aten/src/ATen/miopen/Types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace at::native {
88

9-
TORCH_CUDA_CPP_API miopenDataType_t getMiopenDataType(const at::Tensor& tensor);
9+
TORCH_HIP_CPP_API miopenDataType_t getMiopenDataType(const at::Tensor& tensor);
1010

1111
int64_t miopen_version();
1212

0 commit comments

Comments
 (0)