File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,8 @@ size_t CUDAPinnedMaxChunkSize() {
103
103
return CUDAPinnedMaxAllocSize () / 256 ;
104
104
}
105
105
106
- #ifdef PADDLE_WITH_XBYAK
107
106
namespace jit {
108
-
107
+ # ifdef PADDLE_WITH_XBYAK
109
108
static Xbyak::util::Cpu cpu;
110
109
bool MayIUse (const cpu_isa_t cpu_isa) {
111
110
using namespace Xbyak ::util; // NOLINT
@@ -136,8 +135,16 @@ bool MayIUse(const cpu_isa_t cpu_isa) {
136
135
}
137
136
return false ;
138
137
}
138
+ #else
139
+ bool MayIUse (const cpu_isa_t cpu_isa) {
140
+ if (cpu_isa == isa_any) {
141
+ return true ;
142
+ } else {
143
+ return false ;
144
+ }
145
+ }
146
+ #endif
139
147
140
148
} // namespace jit
141
- #endif
142
149
} // namespace platform
143
150
} // namespace paddle
Original file line number Diff line number Diff line change @@ -37,9 +37,7 @@ size_t CUDAPinnedMinChunkSize();
37
37
// ! Get the maximum chunk size for buddy allocator.
38
38
size_t CUDAPinnedMaxChunkSize ();
39
39
40
- #ifdef PADDLE_WITH_XBYAK
41
40
namespace jit {
42
-
43
41
typedef enum {
44
42
isa_any,
45
43
sse42,
@@ -56,7 +54,6 @@ typedef enum {
56
54
inline bool MayIUse (const cpu_isa_t cpu_isa);
57
55
58
56
} // namespace jit
59
- #endif
60
57
61
58
} // namespace platform
62
59
} // namespace paddle
You can’t perform that action at this time.
0 commit comments