diff --git a/c/runtime.h b/c/runtime.h index c5cfe23..c8ec3b1 100644 --- a/c/runtime.h +++ b/c/runtime.h @@ -10,7 +10,7 @@ #define EXT_C #endif -typedef struct { +typedef const struct { const int32_t n, l, kw, coe, coe_tl, r_ll, h, w, ci, co, w_kw2, t, p, cm, cm_p0; const int32_t w_bpt, w_bpt_p0, x_bpt, x_bpt_p0, o_bytes; // bytes per transfer const int8_t is_bias, is_pool, is_flatten; @@ -27,13 +27,13 @@ typedef enum {POOL_NONE, POOL_MAX, POOL_AVG} Pool_t; #define X_BITS (1<o_bytes; i++) fprintf(fp_tiled,"%d\n", ib == N_BUNDLES-1 ? mem.y[i] : mem.nx[i]); fclose(fp_tiled); - int8_t f_path_debug [1000]; + char f_path_debug [1000]; sprintf(f_path_debug, "%s/%0d_y_nhwc_sim.txt", DATA_DIR, ib); FILE *fp_debug = fopen(f_path_debug, "w"); for (int32_t i=0; idebug_nhwc_words; i++) @@ -388,7 +388,7 @@ extern EXT_C void load_w (uint8_t *p_done, int32_t *p_offset, int32_t *p_bpt) { extern EXT_C void fill_memory (){ FILE *fp; - int8_t f_path [1000]; + char f_path [1000]; sprintf(f_path, "%s/w.bin", DATA_DIR); fp = fopen(f_path, "rb"); diff --git a/test/py/param_test.py b/test/py/param_test.py index d68301b..8a5c60e 100644 --- a/test/py/param_test.py +++ b/test/py/param_test.py @@ -168,7 +168,7 @@ class Config: @pytest.mark.parametrize("COMPILE", list(product_dict( X_BITS = [8 ], - K_BITS = [4 ], + K_BITS = [8 ], B_BITS = [16 ], Y_BITS = [24 ], INT_BITS = [32 ], # size of integer in target CPU @@ -307,7 +307,7 @@ def test_dnn_engine(COMPILE): ch.write( f".b_offset={b_words}, .b_val_shift={b.bias_val_shift}, .b_bias_shift={b.bias_b_shift}, ") ch.write( f".ca_nzero={ca_nzero}, .ca_shift={ca_shift}, .ca_pl_scale={ca_pl_scale}, ") ch.write( f".csh={b.r.CSH}, .ch={b.r.CYH}, .csh_shift={b.r.CSH_SHIFT}, .pkh={b.r.PKH}, .psh={b.r.PSH}, .ph={b.r.PYH}, .psh_shift={b.r.PSH_SHIFT}, .csw={b.r.CSW}, .cw={b.r.CYW}, .csw_shift={b.r.CSW_SHIFT}, .pkw={b.r.PKW}, .psw={b.r.PSW}, .pw={b.r.PYW}, .psw_shift={b.r.PSW_SHIFT}, .pool={pool_type}, .on={b.r.ON}, .oh={b.r.OH}, .ow={b.r.OW}, .oc={b.r.OC}, ") - ch.write( f".x_header={b.r.x_header_be_p[-1][0]}, .x_header_p0={b.r.x_header_be_p[0][0]}, .w_header={b.r.w_header_be_p[-1][0]}, .w_header_p0={b.r.x_header_be_p[0][0]} , ") + ch.write( f".x_header={b.r.x_header_be_p[-1][0]}u, .x_header_p0={b.r.x_header_be_p[0][0]}u, .w_header={b.r.w_header_be_p[-1][0]}u, .w_header_p0={b.r.x_header_be_p[0][0]}u , ") ch.write( f".debug_nhwc_words={b.oe_exp_nhwc.size} }}") b_words += b.be.size if b.b else 0