Skip to content

Commit

Permalink
Revert "export AOTI_TORCH_EXPORT on Windows. (pytorch#140030)"
Browse files Browse the repository at this point in the history
This reverts commit 7a9d0e3.

Reverted pytorch#140030 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally ([comment](pytorch#140030 (comment)))
  • Loading branch information
pytorchmergebot committed Nov 25, 2024
1 parent 4a378d7 commit 2325749
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions torch/csrc/inductor/aoti_torch/c/shim.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@
#define AOTI_TORCH_EXPORT __attribute__((__visibility__("default")))
#else // !__GNUC__
#ifdef _WIN32
// PyTorch2 doesn't currently work on Windows. But, we still need to export aoti
// functions. If we didn't export these functions, it will cause the inductor
// failed, please issue: https://github.com/pytorch/pytorch/issues/139954
// TODO: We can only show message when aoti runtime, but not compiling time.
#define AOTI_TORCH_EXPORT __declspec(dllexport)
// PyTorch2 doesn't currently work on Windows. Exporting these APIs can lead
// to symbol clashes at link time if libtorch is included in a DLL and binary
// that depends on the DLL. As a short term fix, we don't export the symbols.
// In the long term, this will need to be addressed when Windows is supported.
// #define AOTI_TORCH_EXPORT __declspec(dllexport)
#define AOTI_TORCH_EXPORT
#else // !_WIN32
#define AOTI_TORCH_EXPORT
#endif // _WIN32
Expand Down

0 comments on commit 2325749

Please sign in to comment.