forked from priyanka-raina/dnn-accelerator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Stencil_catapult.h
476 lines (418 loc) · 17.3 KB
/
Stencil_catapult.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
#ifndef STENCIL_H
#define STENCIL_H
#include <stddef.h>
#include <stdint.h>
#include <assert.h>
#include "ac_channel.h"
///Forward declaration
template <typename T, size_t EXTENT_0, size_t EXTENT_1, size_t EXTENT_2, size_t EXTENT_3> struct Stencil;
template <typename T, size_t EXTENT_0, size_t EXTENT_1, size_t EXTENT_2, size_t EXTENT_3> struct PackedStencil;
template <typename T, size_t EXTENT_0, size_t EXTENT_1, size_t EXTENT_2, size_t EXTENT_3> struct AxiPackedStencil;
#ifndef AC_INT_MAX_W
//#define AP_INT_MAX_W 32768
#define AC_INT_MAX_W 4554
//#define AP_INT_MAX_W 17280
//#define AP_INT_MAX_W 2048
#endif
#undef true
#undef false
#include "ac_int.h"
union single_cast {
float f;
uint32_t i;
};
union double_cast {
float f;
uint64_t i;
};
template<typename T>
inline T bitcast_to_uint(T in) {
return in;
}
static inline ac_int<32, false> bitcast_to_uint(float in) {
union single_cast temp;
temp.f = in;
return temp.i;
}
static inline ac_int<64, false> bitcast_to_uint(double in) {
union double_cast temp;
temp.f = in;
return temp.i;
}
template<typename T, int N>
inline void bitcast_to_type(ac_int<N, false>& in, T& out) {
out = in;
}
static inline void bitcast_to_type(ac_int<32, false>& in, float& out) {
union single_cast temp;
temp.i = in;
out = temp.f;
}
static inline void bitcast_to_type(ac_int<64, false>& in, double& out) {
union double_cast temp;
temp.i = in;
out = temp.f;
}
template <typename T, size_t EXTENT_0, size_t EXTENT_1 = 1, size_t EXTENT_2 = 1, size_t EXTENT_3 = 1>
struct PackedStencil {
ac_int<8*sizeof(T)*EXTENT_3*EXTENT_2*EXTENT_1*EXTENT_0, false> value;
/** writer
*/
inline ac_int<8*sizeof(T), false>
operator()(ac_int<sizeof(T)*8, false> set_val, size_t index_0, size_t index_1, size_t index_2, size_t index_3) {
#ifndef __SYNTHESIS__
assert(index_0 < EXTENT_0 && index_1 < EXTENT_1 && index_2 < EXTENT_2 && index_3 < EXTENT_3);
#endif
const size_t word_length = sizeof(T) * 8; // in bits
const size_t lo = index_0 * word_length +
index_1 * EXTENT_0 * word_length +
index_2 * EXTENT_0 * EXTENT_1 * word_length +
index_3 * EXTENT_0 * EXTENT_1 * EXTENT_2 * word_length;
value.set_slc((unsigned int)lo, set_val);
return set_val;
}
/** reader
*/
inline ac_int<8*sizeof(T), false>
operator()(size_t index_0, size_t index_1 = 0, size_t index_2 = 0, size_t index_3 = 0) const {
#ifndef __SYNTHESIS__
assert(index_0 < EXTENT_0 && index_1 < EXTENT_1 && index_2 < EXTENT_2 && index_3 < EXTENT_3);
#endif
const size_t word_length = sizeof(T) * 8; // in bits
const size_t lo = index_0 * word_length +
index_1 * EXTENT_0 * word_length +
index_2 * EXTENT_0 * EXTENT_1 * word_length +
index_3 * EXTENT_0 * EXTENT_1 * EXTENT_2 * word_length;
return value.template slc<word_length>((unsigned int)lo);
}
// convert to Stencil
operator Stencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3>() {
Stencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> res;
#pragma hls_unroll yes
for(size_t idx_3 = 0; idx_3 < EXTENT_3; idx_3++)
#pragma hls_unroll yes
for(size_t idx_2 = 0; idx_2 < EXTENT_2; idx_2++)
#pragma hls_unroll yes
for(size_t idx_1 = 0; idx_1 < EXTENT_1; idx_1++)
#pragma hls_unroll yes
for(size_t idx_0 = 0; idx_0 < EXTENT_0; idx_0++) {
ac_int<sizeof(T) * 8, false> temp = operator()(idx_0, idx_1, idx_2, idx_3);
bitcast_to_type(temp, res.value[idx_3][idx_2][idx_1][idx_0]);
}
return res;
}
// convert to AxiPackedStencil
operator AxiPackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3>() {
AxiPackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> res;
res.value = value;
return res;
}
// set 1st dim
void set_dim(PackedStencil<T, EXTENT_0> set_val, size_t index_1, size_t index_2, size_t index_3) {
const size_t word_length = sizeof(T) * 8; // in bits
#pragma hls_unroll yes
for(size_t idx_0 = 0; idx_0 < EXTENT_0; idx_0++) {
const size_t lo = idx_0 * word_length +
index_1 * EXTENT_0 * word_length +
index_2 * EXTENT_0 * EXTENT_1 * word_length +
index_3 * EXTENT_0 * EXTENT_1 * EXTENT_2 * word_length;
ac_int<sizeof(T) * 8, false> temp = set_val(idx_0);
value.set_slc((unsigned int)lo, temp);
}
}
// set 1st and 2nd dim
void set_dim(PackedStencil<T, EXTENT_0, EXTENT_1> set_val, size_t index_2, size_t index_3) {
const size_t word_length = sizeof(T) * 8; // in bits
#pragma hls_unroll yes
for(size_t idx_1 = 0; idx_1 < EXTENT_1; idx_1++)
#pragma hls_unroll yes
for(size_t idx_0 = 0; idx_0 < EXTENT_0; idx_0++) {
const size_t lo = idx_0 * word_length +
idx_1 * EXTENT_0 * word_length +
index_2 * EXTENT_0 * EXTENT_1 * word_length +
index_3 * EXTENT_0 * EXTENT_1 * EXTENT_2 * word_length;
ac_int<sizeof(T) * 8, false> temp = set_val(idx_0, idx_1);
value.set_slc((unsigned int)lo, temp);
}
}
// get 1st dim
PackedStencil<T, EXTENT_0> get_dim(size_t index_1, size_t index_2, size_t index_3) {
PackedStencil<T, EXTENT_0> res;
const size_t word_length = sizeof(T) * 8; // in bits
#pragma hls_unroll yes
for(size_t idx_0 = 0; idx_0 < EXTENT_0; idx_0++) {
const size_t lo = idx_0 * word_length;
ac_int<sizeof(T) * 8, false> temp = operator()(idx_0, index_1, index_2, index_3);
res.value.set_slc((unsigned int)lo, temp);
}
return res;
}
// get 1st and 2nd dim
PackedStencil<T, EXTENT_0, EXTENT_1> get_dim(size_t index_2, size_t index_3) {
PackedStencil<T, EXTENT_0, EXTENT_1> res;
const size_t word_length = sizeof(T) * 8; // in bits
#pragma hls_unroll yes
for(size_t idx_1 = 0; idx_1 < EXTENT_1; idx_1++)
#pragma hls_unroll yes
for(size_t idx_0 = 0; idx_0 < EXTENT_0; idx_0++) {
const size_t lo = idx_0 * word_length +
idx_1 * EXTENT_0 * word_length;
ac_int<sizeof(T) * 8, false> temp = operator()(idx_0, idx_1, index_2, index_3);
res.value.set_slc((unsigned int)lo, temp);
}
return res;
}
void add(PackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> set_stencil, bool flag) {
const size_t word_length = sizeof(T) * 8; // in bits
#pragma hls_unroll yes
//#pragma hls_pipeline_init_interval 1
for(size_t idx_3 = 0; idx_3 < EXTENT_3; idx_3++)
#pragma hls_unroll yes
for(size_t idx_2 = 0; idx_2 < EXTENT_2; idx_2++)
#pragma hls_unroll yes
for(size_t idx_1 = 0; idx_1 < EXTENT_1; idx_1++)
#pragma hls_unroll yes
for(size_t idx_0 = 0; idx_0 < EXTENT_0; idx_0++) {
const size_t lo = idx_0 * word_length +
idx_1 * EXTENT_0 * word_length +
idx_2 * EXTENT_0 * EXTENT_1 * word_length +
idx_3 * EXTENT_0 * EXTENT_1 * EXTENT_2 * word_length;
ac_int<sizeof(T) * 8, false> temp = operator()(idx_0, idx_1, idx_2, idx_3);
if (flag == false) {temp = set_stencil(idx_0, idx_1, idx_2, idx_3);}
else {
temp += set_stencil(idx_0, idx_1, idx_2, idx_3);
}
value.set_slc((unsigned int)lo, temp);
}
}
};
template <typename T, size_t EXTENT_0, size_t EXTENT_1 = 1, size_t EXTENT_2 = 1, size_t EXTENT_3 = 1>
struct AxiPackedStencil {
ac_int<8*sizeof(T)*EXTENT_3*EXTENT_2*EXTENT_1*EXTENT_0> value;
ac_int<1, false> last;
// convert to PackedStencil
operator PackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3>() {
PackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> res;
res.value = value;
return res;
}
// convert to Stencil
operator Stencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3>() {
PackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> res = *this;
return (Stencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3>)res;
}
};
/** multi-dimension (up-to 4 dimensions) stencil struct
*/
template <typename T, size_t EXTENT_0, size_t EXTENT_1 = 1, size_t EXTENT_2 = 1, size_t EXTENT_3 = 1>
struct Stencil {
public:
T value[EXTENT_3][EXTENT_2][EXTENT_1][EXTENT_0];
/** writer
*/
inline T& operator()(T set_val, size_t index_0, size_t index_1, size_t index_2, size_t index_3) {
#ifndef __SYNTHESIS__
assert(index_0 < EXTENT_0 && index_1 < EXTENT_1 && index_2 < EXTENT_2 && index_3 < EXTENT_3);
#endif
value[index_3][index_2][index_1][index_0] = set_val;
return set_val;
}
/** reader
*/
inline const T& operator()(size_t index_0, size_t index_1 = 0, size_t index_2 = 0, size_t index_3 = 0) const {
#ifndef __SYNTHESIS__
assert(index_0 < EXTENT_0 && index_1 < EXTENT_1 && index_2 < EXTENT_2 && index_3 < EXTENT_3);
#endif
return value[index_3][index_2][index_1][index_0];
}
// convert to PackedStencil
operator PackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3>() {
PackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> res;
const size_t word_length = sizeof(T) * 8; // in bits
#pragma hls_unroll yes
for(size_t idx_3 = 0; idx_3 < EXTENT_3; idx_3++)
#pragma hls_unroll yes
for(size_t idx_2 = 0; idx_2 < EXTENT_2; idx_2++)
#pragma hls_unroll yes
for(size_t idx_1 = 0; idx_1 < EXTENT_1; idx_1++)
#pragma hls_unroll yes
for(size_t idx_0 = 0; idx_0 < EXTENT_0; idx_0++) {
const size_t lo = idx_0 * word_length +
idx_1 * EXTENT_0 * word_length +
idx_2 * EXTENT_0 * EXTENT_1 * word_length +
idx_3 * EXTENT_0 * EXTENT_1 * EXTENT_2 * word_length;
ac_int<word_length, false> temp = bitcast_to_uint(value[idx_3][idx_2][idx_1][idx_0]);
res.value.set_slc((unsigned int)lo, temp);
}
return res;
}
// convert to AxiPackedStencil
operator AxiPackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3>() {
PackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> res = *this;
return (AxiPackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3>)res;
}
//set 1st dim
void set_dim(Stencil<T, EXTENT_0> set_val, size_t index_1, size_t index_2, size_t index_3) {
const size_t word_length = sizeof(T) * 8; // in bits
#pragma hls_unroll yes
for(size_t idx_0 = 0; idx_0 < EXTENT_0; idx_0++) {
ac_int<word_length, false> temp = bitcast_to_uint(set_val[0][0][0][idx_0]);
bitcast_to_type(temp, value[index_3][index_2][index_1][idx_0]);
}
}
//set 1st and 2nd dim
void set_dim(Stencil<T, EXTENT_0, EXTENT_1> set_val, size_t index_2, size_t index_3) {
const size_t word_length = sizeof(T) * 8; // in bits
#pragma hls_unroll yes
for(size_t idx_1 = 0; idx_1 < EXTENT_0; idx_1++)
#pragma hls_unroll yes
for(size_t idx_0 = 0; idx_0 < EXTENT_0; idx_0++) {
ac_int<word_length, false> temp = bitcast_to_uint(set_val[0][0][idx_1][idx_0]);
bitcast_to_type(temp, value[index_3][index_2][idx_1][idx_0]);
}
}
//get 1st dim
Stencil<T, EXTENT_0> get_dim(size_t index_1, size_t index_2, size_t index_3) {
Stencil<T, EXTENT_0> res;
const size_t word_length = sizeof(T) * 8; // in bits
#pragma hls_unroll yes
for(size_t idx_0 = 0; idx_0 < EXTENT_0; idx_0++) {
ac_int<word_length, false> temp = bitcast_to_uint(value[index_3][index_2][index_1][idx_0]);
bitcast_to_type(temp, res.value[0][0][0][idx_0]);
}
return res;
}
//get 1st and 2nd dim
Stencil<T, EXTENT_0, EXTENT_1> get_dim(size_t index_2, size_t index_3) {
Stencil<T, EXTENT_0, EXTENT_1> res;
const size_t word_length = sizeof(T) * 8; // in bits
#pragma hls_unroll yes
for(size_t idx_1 = 0; idx_1 < EXTENT_1; idx_1++)
#pragma hls_unroll yes
for(size_t idx_0 = 0; idx_0 < EXTENT_0; idx_0++) {
ac_int<word_length, false> temp = bitcast_to_uint(value[index_3][index_2][idx_1][idx_0]);
bitcast_to_type(temp, res.value[0][0][idx_1][idx_0]);
}
return res;
}
};
#ifndef HALIDE_ATTRIBUTE_ALIGN
#ifdef _MSC_VER
#define HALIDE_ATTRIBUTE_ALIGN(x) __declspec(align(x))
#else
#define HALIDE_ATTRIBUTE_ALIGN(x) __attribute__((aligned(x)))
#endif
#endif
#ifndef BUFFER_T_DEFINED
#define BUFFER_T_DEFINED
#include <stdbool.h>
#include <stdint.h>
typedef struct buffer_t {
uint64_t dev;
uint8_t* host;
int32_t extent[4];
int32_t stride[4];
int32_t min[4];
int32_t elem_size;
HALIDE_ATTRIBUTE_ALIGN(1) bool host_dirty;
HALIDE_ATTRIBUTE_ALIGN(1) bool dev_dirty;
HALIDE_ATTRIBUTE_ALIGN(1) uint8_t _padding[10 - sizeof(void *)];
} buffer_t;
#endif
template <typename T, size_t EXTENT_0, size_t EXTENT_1, size_t EXTENT_2, size_t EXTENT_3>
void buffer_to_stencil(const buffer_t *buffer,
Stencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> &stencil) {
assert(EXTENT_0 == buffer->extent[0]);
assert((EXTENT_1 == buffer->extent[1]) || (EXTENT_1 == 1 && buffer->extent[1] == 0));
assert((EXTENT_2 == buffer->extent[2]) || (EXTENT_2 == 1 && buffer->extent[2] == 0));
assert((EXTENT_3 == buffer->extent[3]) || (EXTENT_3 == 1 && buffer->extent[3] == 0));
assert(sizeof(T) == buffer->elem_size);
for(size_t idx_3 = 0; idx_3 < EXTENT_3; idx_3++)
for(size_t idx_2 = 0; idx_2 < EXTENT_2; idx_2++)
for(size_t idx_1 = 0; idx_1 < EXTENT_1; idx_1++)
for(size_t idx_0 = 0; idx_0 < EXTENT_0; idx_0++) {
const uint8_t *ptr = buffer->host;
size_t offset = idx_0 * buffer->stride[0] +
idx_1 * buffer->stride[1] +
idx_2 * buffer->stride[2] +
idx_3 * buffer->stride[3];
const T *address = (T *)(ptr + offset * buffer->elem_size);
stencil(*address, idx_0, idx_1, idx_2, idx_3);
}
}
template <typename T, size_t EXTENT_0, size_t EXTENT_1, size_t EXTENT_2, size_t EXTENT_3>
void subimage_to_stream(const struct buffer_t *buf_noop,
ac_channel<AxiPackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> > &stream,
void *subimage,
int stride_0, int subimage_extent_0,
int stride_1 = 1, int subimage_extent_1 = 1,
int stride_2 = 1, int subimage_extent_2 = 1,
int stride_3 = 1, int subimage_extent_3 = 1) {
assert(subimage_extent_0 % EXTENT_0 == 0);
assert(subimage_extent_1 % EXTENT_1 == 0);
assert(subimage_extent_2 % EXTENT_2 == 0);
assert(subimage_extent_3 % EXTENT_3 == 0);
(void) buf_noop; // avoid unused warnning
for(size_t idx_3 = 0; idx_3 < subimage_extent_3; idx_3 += EXTENT_3)
for(size_t idx_2 = 0; idx_2 < subimage_extent_2; idx_2 += EXTENT_2)
for(size_t idx_1 = 0; idx_1 < subimage_extent_1; idx_1 += EXTENT_1)
for(size_t idx_0 = 0; idx_0 < subimage_extent_0; idx_0 += EXTENT_0) {
Stencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> stencil;
for(size_t st_idx_3 = 0; st_idx_3 < EXTENT_3; st_idx_3++)
for(size_t st_idx_2 = 0; st_idx_2 < EXTENT_2; st_idx_2++)
for(size_t st_idx_1 = 0; st_idx_1 < EXTENT_1; st_idx_1++)
for(size_t st_idx_0 = 0; st_idx_0 < EXTENT_0; st_idx_0++) {
int offset = (idx_0 + st_idx_0) * stride_0 +
(idx_1 + st_idx_1) * stride_1 +
(idx_2 + st_idx_2) * stride_2 +
(idx_3 + st_idx_3) * stride_3;
stencil(*((T *)subimage + offset), st_idx_0, st_idx_1, st_idx_2, st_idx_3);
}
stream.write(stencil);
}
}
template <typename T, size_t EXTENT_0, size_t EXTENT_1, size_t EXTENT_2, size_t EXTENT_3>
void stream_to_subimage(const struct buffer_t *buf_noop,
ac_channel<AxiPackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> > &stream,
void *subimage,
int stride_0, int subimage_extent_0,
int stride_1 = 1, int subimage_extent_1 = 1,
int stride_2 = 1, int subimage_extent_2 = 1,
int stride_3 = 1, int subimage_extent_3 = 1) {
assert(subimage_extent_0 % EXTENT_0 == 0);
assert(subimage_extent_1 % EXTENT_1 == 0);
assert(subimage_extent_2 % EXTENT_2 == 0);
assert(subimage_extent_3 % EXTENT_3 == 0);
(void) buf_noop; // avoid unused warnning
for(size_t idx_3 = 0; idx_3 < subimage_extent_3; idx_3 += EXTENT_3)
for(size_t idx_2 = 0; idx_2 < subimage_extent_2; idx_2 += EXTENT_2)
for(size_t idx_1 = 0; idx_1 < subimage_extent_1; idx_1 += EXTENT_1)
for(size_t idx_0 = 0; idx_0 < subimage_extent_0; idx_0 += EXTENT_0) {
AxiPackedStencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> axi_stencil = stream.read();
Stencil<T, EXTENT_0, EXTENT_1, EXTENT_2, EXTENT_3> stencil = axi_stencil;
for(size_t st_idx_3 = 0; st_idx_3 < EXTENT_3; st_idx_3++)
for(size_t st_idx_2 = 0; st_idx_2 < EXTENT_2; st_idx_2++)
for(size_t st_idx_1 = 0; st_idx_1 < EXTENT_1; st_idx_1++)
for(size_t st_idx_0 = 0; st_idx_0 < EXTENT_0; st_idx_0++) {
int offset = (idx_0 + st_idx_0) * stride_0 +
(idx_1 + st_idx_1) * stride_1 +
(idx_2 + st_idx_2) * stride_2 +
(idx_3 + st_idx_3) * stride_3;
*((T *)subimage + offset) = stencil(st_idx_0, st_idx_1, st_idx_2, st_idx_3);
}
// check TLAST
if (idx_3 == subimage_extent_3 - EXTENT_3 &&
idx_2 == subimage_extent_2 - EXTENT_2 &&
idx_1 == subimage_extent_1 - EXTENT_1 &&
idx_0 == subimage_extent_0 - EXTENT_0) {
if(axi_stencil.last != 1) {
printf("TLAS check failed.\n");
}
} else {
if(axi_stencil.last != 0) {
printf("TLAS check failed.\n");
}
}
}
}
#endif