MCPcopy Create free account
hub / github.com/Xilinx/CHaiDNN / update_nms_module_opcode_table

Function update_nms_module_opcode_table

software/common/kernelinfo_class.cpp:804–957  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

802 opcode_info_map[obj_module_opcode.op_code]=obj_module_opcode;
803}
804void update_nms_module_opcode_table(Opcode_info & obj_module_opcode,map<opcode_num_e, Opcode_info> & opcode_info_map,int batch_size){
805
806
807 Module_info module_default;
808 module_default.module_target_info = CPU;
809 module_default.module_type = SW_NMS;
810 module_default.module_name = "NMS"; /// TODO abid needs to update the layer information based on the enum instead of layer name
811 module_default.num_total_ports=11; // TODO need to check with buffer management & init module
812 obj_module_opcode.mega_module = module_default;
813
814 /*** nms mega module ports & these port order should be same as deploy file *********/
815
816 Port_info in_port0;
817 in_port0.data_type = XI_INT8;
818 in_port0.size_datatype = XI_INT8_S;
819 in_port0.memory_align_required=32; // TODO need to check with buffer management & init module
820 in_port0.memory_map_info = __SDS_CACHEABLE;
821 in_port0.port_enum=XI_INPUT;
822 in_port0.qant_scheme_type = g_quant_value;
823
824 packinfo input_p_info;
825
826 input_p_info.dim = XI_CHANNEL;
827 input_p_info.mem_contiguous = true;
828 input_p_info.mod_div_factor = 1; // need to discuss with team
829 input_p_info.sep=XI_DIVISION;
830
831 in_port0.pack_info_vec.push_back(input_p_info);
832
833 input_p_info.dim = XI_HEIGHT;
834 input_p_info.mem_contiguous = true;
835 input_p_info.mod_div_factor = 0;
836 input_p_info.sep=XI_NONE;
837
838 in_port0.pack_info_vec.push_back(input_p_info);
839
840 input_p_info.dim = XI_WIDTH;
841 input_p_info.mem_contiguous = true;
842 input_p_info.mod_div_factor = 0;
843 input_p_info.sep=XI_NONE;
844
845 in_port0.pack_info_vec.push_back(input_p_info);
846
847 input_p_info.dim = XI_INTERLEAVED;
848 input_p_info.mem_contiguous = true;
849 input_p_info.mod_div_factor = 1; // need to discuss with team
850 input_p_info.sep=XI_MODULO;
851
852 in_port0.pack_info_vec.push_back(input_p_info);
853
854 input_p_info.dim = XI_BATCH;
855 input_p_info.mem_contiguous = true;
856 input_p_info.mod_div_factor = 0;
857 input_p_info.sep=XI_NONE;
858
859 in_port0.pack_info_vec.push_back(input_p_info);
860
861 obj_module_opcode.port_vec.push_back(in_port0);

Callers 1

kernelInfoMethod · 0.85

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected