Skip to content

Commit 18b1427

Browse files
dzakharJaccovG
authored andcommitted
Minor Changes: code segment for relu_range, void pointer arithm, debug mode code
1 parent aaa43f5 commit 18b1427

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

include/mli_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
*/
5050
#define DBG_MODE_RELEASE (0) /*< No debug. Messages:OFF; Assertions:OFF; ReturnCodes: Always OK */
5151
#define DBG_MODE_RET_CODES (1) /*< Return codes mode. Messages:OFF; Assertions:OFF; ReturnCodes: Valid Return*/
52-
#define DBG_MODE_ASSERT (3) /*< Assert. Messages:OFF; Assertions:ON; Extra Assertions:OFF; ReturnCodes: Valid Return */
52+
#define DBG_MODE_ASSERT (2) /*< Assert. Messages:OFF; Assertions:ON; Extra Assertions:OFF; ReturnCodes: Valid Return */
5353
#define DBG_MODE_DEBUG (3) /*< Debug. Messages:ON; Assertions:ON; Extra Assertions:OFF; ReturnCodes: Valid Return */
5454
#define DBG_MODE_FULL (4) /*< Full Debug. Messages:ON; Assertions:ON; Extra Assertions:ON; ReturnCodes: Valid Return */
5555

lib/src/helpers/src/mli_helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ mli_status mli_hlp_point_to_subtensor(const mli_tensor *in, const mli_point_to_s
8282
for (int i = 1; i < cfg->coord_num; i++)
8383
size += cfg->start_coord[i] * dimension_sizes[i];
8484

85-
out->data = in->data + size;
85+
out->data = (void *)((char *)in->data + size);
8686
size = out->shape[0] = cfg->first_out_dim_size;
8787
for (int i = 1; i < out_rank; i++) {
8888
out->shape[i] = in->shape[subtsr_start_axis + i];

lib/src/private/mli_debug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ static bool __attribute__ ((always_inline)) mli_check(
109109
}
110110
#endif
111111

112-
#endif /* DEBUG_H_ */
112+
#endif /* DEBUG_H_ */

lib/src/private/src/mli_prv_helpers.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#include "mli_private_types.h"
3333
#include "mli_math_macros.h"
3434

35+
#pragma Code(".mli_lib")
36+
3537
//============================================================
3638
//
3739
//============================================================
@@ -73,4 +75,6 @@ mli_prv_get_relu_min_max (const mli_relu_cfg * cfg, const mli_tensor * out) {
7375
}
7476

7577
return val_limit;
76-
}
78+
}
79+
#pragma Code()
80+

0 commit comments

Comments
 (0)