Skip to content

Commit 960d94a

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] [ROCm][Windows] Fix compile torchvision image for ROCm (#8897)
Reviewed By: scotts Differential Revision: D77997074 fbshipit-source-id: 06cdc349f360270a90d05fde2623bfacab729313
1 parent f4ef379 commit 960d94a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

torchvision/csrc/io/image/common.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11

22
#include "common.h"
33

4+
// If we are in a Windows environment, we need to define
5+
// initialization functions for the _custom_ops extension
6+
#ifdef _WIN32
7+
void* PyInit_image(void) {
8+
return nullptr;
9+
}
10+
#endif
11+
412
namespace vision {
513
namespace image {
614

torchvision/csrc/io/image/image.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22

33
#include <ATen/core/op_registration/op_registration.h>
44

5-
// If we are in a Windows environment, we need to define
6-
// initialization functions for the _custom_ops extension
7-
#ifdef _WIN32
8-
void* PyInit_image(void) {
9-
return nullptr;
10-
}
11-
#endif
12-
135
namespace vision {
146
namespace image {
157

0 commit comments

Comments
 (0)