File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -157,15 +157,15 @@ HOSTDEVICE int64_t& indexer<0>(Dim<0>& dim, int idx) {
157
157
throw std::invalid_argument (" Invalid index" );
158
158
#else
159
159
PADDLE_ASSERT (false );
160
- #endif
161
- #if (defined __CUDA_ARCH__) && (CUDA_VERSION < 8000)
160
+ #if CUDA_VERSION < 8000
162
161
// On CUDA versions previous to 8.0, only __shared__ variables
163
162
// could be declared as static in the device code.
164
163
int64_t head = 0 ;
165
164
#else
166
165
static int64_t head = 0 ;
167
166
#endif
168
167
return head;
168
+ #endif
169
169
}
170
170
171
171
template <int D>
@@ -189,15 +189,15 @@ HOSTDEVICE int64_t indexer<0>(const Dim<0>& dim, int idx) {
189
189
throw std::invalid_argument (" Invalid index" );
190
190
#else
191
191
PADDLE_ASSERT (false );
192
- #endif
193
- #if (defined __CUDA_ARCH__) && (CUDA_VERSION < 8000)
192
+ #if CUDA_VERSION < 8000
194
193
// On CUDA versions previous to 8.0, only __shared__ variables
195
194
// could be declared as static in the device code.
196
195
int64_t head = 0 ;
197
196
#else
198
197
static int64_t head = 0 ;
199
198
#endif
200
199
return head;
200
+ #endif
201
201
}
202
202
203
203
} // namespace
You can’t perform that action at this time.
0 commit comments