.. _ev74_graph_2_sima_tesselate: |graph| ======================= Description ----------- |ev74_synopsys| performing ``tesselation`` operation on the tensor passed to it. Graph Info ---------- .. list-table:: |graph| :widths: 12 20 :stub-columns: 1 * - Graph Name - |graph| * - Graph ID - 2 * - Operations Supported - Tesselates incoming tensor * - Important Parameters to configure - "n_boxes" → No:of input boxes/images/tensors to be tessellated "c16_align" → Tessellated output is aligned to 16 bytes boundary(1) or not(0). 0 is supported only if elemSize = 1 "input_width" → Width of the input box/image/tensor "input_height" → Height of the input box/image/tensor "input_depth" → Depth/Channels of the input box/image/tensor "tile_width" → Width of the Slice/Tile "tile_height" → Height of the Slice/Tile "tile_depth" → Depth/Channels of the Slice/Tile "elem_size" → Width in bytes of each input element/data(1, 2, 4). 1 → INT8, 2 → INT16, 4 → INT32 "debug" → Enable more debug logs, 0 → disable, 1→ enable * - Available Since Yocto Build - B670 Example Config -------------- |ev74_example_config_text| .. code-block:: { "version": 0.1, "node_name": "ev-tess", "simaai__params": { "params": 15, "index": 0, "cpu": 1, "next_cpu": 2, "graph_id": 2, "input_width": 10, "input_height": 17, "input_depth": 32, "tile_width": 4, "tile_height": 3, "tile_depth": 23, "data_type": 2, "n_boxes": 1, "c16_align": 1, "format": 1, "in_type": 0, "no_of_outbuf": 1, "out_type": 2, "in_sz": 21760, "out_sz": 21840, "ibufname": "in-source", "debug": 1, "dump_data": 1 } } .. note:: Please note that, the ``out_sz`` parameter in above mentioned config json needs to be calculated using `tess_out_sz.py `_ file. |dependent_app| --------------- |ev74_dependent_app_brief| .. code-block:: cpp :caption: Sample |dependent_app| Function to configure Parameters :linenos: #define SIMA_TESS_GRAPH_ID (2) #define N_BOXES (1) #define C_ALIGN_16 (2) #define INPUT_WIDTH (3) #define INPUT_HEIGHT (4) #define TILE_WIDTH (5) #define TILE_HEIGHT (6) #define INPUT_DEPTH (7) #define TILE_DEPTH (8) #define ELEM_SIZE (9) #define DEBUG_EN (10) void configure_tesselate(const char *json_fpath) { simaai_params_t *params = parser_node_struct_init(); uint8_t *buf = (uint8_t *)calloc(1, sizeof(uint8_t) * 16); int val = *((int *)parser_get_int(params, "n_boxes")); send_i32_param(2, SIMA_TESS_GRAPH_ID, SIMA_TESS_GRAPH_N_BOXES, buf, val); val = *((int *)parser_get_int(params, "c16_align")); send_i32_param(2, SIMA_TESS_GRAPH_ID, SIMA_TESS_GRAPH_C_ALIGN_16, buf, val); val = *((int *)parser_get_int(params, "img_width")); send_i32_param(2, SIMA_TESS_GRAPH_ID, SIMA_TESS_GRAPH_INPUT_WIDTH, buf, val); val = *((int *)parser_get_int(params, "img_height")); send_i32_param(2, SIMA_TESS_GRAPH_ID, SIMA_TESS_GRAPH_INPUT_HEIGHT, buf, val); val = *((int *)parser_get_int(params, "tile_width")); send_i32_param(2, SIMA_TESS_GRAPH_ID, SIMA_TESS_GRAPH_TILE_WIDTH, buf, val); val = *((int *)parser_get_int(params, "tile_height")); send_i32_param(2, SIMA_TESS_GRAPH_ID, SIMA_TESS_GRAPH_TILE_HEIGHT, buf, val); send_i32_param(2, SIMA_TESS_GRAPH_ID, SIMA_TESS_GRAPH_INPUT_DEPTH, buf, 3); send_i32_param(2, SIMA_TESS_GRAPH_ID, SIMA_TESS_GRAPH_TILE_DEPTH, buf, 3); send_i32_param(2, SIMA_TESS_GRAPH_ID, SIMA_TESS_GRAPH_ELEM_SIZE, buf, 0); send_i32_param(2, SIMA_TESS_GRAPH_ID, SIMA_TESS_GRAPH_DEBUG_EN, buf, 0); std::cout << "Completed tess Graph Configure \n"; parser_finalize(params); free(buf); } |ev74_dependent_app_footer| .. |graph| replace:: SIMA_TESSELATE