:py:mod:`hlsfactory.flow_harp` ============================== .. py:module:: hlsfactory.flow_harp .. autodoc2-docstring:: hlsfactory.flow_harp :allowtitles: Module Contents --------------- Classes ~~~~~~~ .. list-table:: :class: autosummary longtable :align: left * - :py:obj:`Node ` - .. autodoc2-docstring:: hlsfactory.flow_harp.Node :summary: * - :py:obj:`Edge ` - .. autodoc2-docstring:: hlsfactory.flow_harp.Edge :summary: Functions ~~~~~~~~~ .. list-table:: :class: autosummary longtable :align: left * - :py:obj:`create_pseudo_node_block ` - .. autodoc2-docstring:: hlsfactory.flow_harp.create_pseudo_node_block :summary: * - :py:obj:`add_to_graph ` - .. autodoc2-docstring:: hlsfactory.flow_harp.add_to_graph :summary: * - :py:obj:`copy_files ` - .. autodoc2-docstring:: hlsfactory.flow_harp.copy_files :summary: * - :py:obj:`read_json_graph ` - .. autodoc2-docstring:: hlsfactory.flow_harp.read_json_graph :summary: * - :py:obj:`llvm_to_nx ` - .. autodoc2-docstring:: hlsfactory.flow_harp.llvm_to_nx :summary: * - :py:obj:`make_json_readable ` - .. autodoc2-docstring:: hlsfactory.flow_harp.make_json_readable :summary: * - :py:obj:`extract_function_names ` - .. autodoc2-docstring:: hlsfactory.flow_harp.extract_function_names :summary: * - :py:obj:`get_tc_for_loop ` - .. autodoc2-docstring:: hlsfactory.flow_harp.get_tc_for_loop :summary: * - :py:obj:`get_icmp ` - .. autodoc2-docstring:: hlsfactory.flow_harp.get_icmp :summary: * - :py:obj:`get_pragmas_loops ` - .. autodoc2-docstring:: hlsfactory.flow_harp.get_pragmas_loops :summary: * - :py:obj:`create_pragma_nodes ` - .. autodoc2-docstring:: hlsfactory.flow_harp.create_pragma_nodes :summary: * - :py:obj:`prune_redundant_nodes ` - .. autodoc2-docstring:: hlsfactory.flow_harp.prune_redundant_nodes :summary: * - :py:obj:`process_graph ` - .. autodoc2-docstring:: hlsfactory.flow_harp.process_graph :summary: * - :py:obj:`graph_generator ` - .. autodoc2-docstring:: hlsfactory.flow_harp.graph_generator :summary: * - :py:obj:`get_for_blocks_info ` - .. autodoc2-docstring:: hlsfactory.flow_harp.get_for_blocks_info :summary: * - :py:obj:`augment_graph_hierarchy ` - .. autodoc2-docstring:: hlsfactory.flow_harp.augment_graph_hierarchy :summary: * - :py:obj:`add_auxiliary_nodes ` - .. autodoc2-docstring:: hlsfactory.flow_harp.add_auxiliary_nodes :summary: * - :py:obj:`remove_extra_header ` - .. autodoc2-docstring:: hlsfactory.flow_harp.remove_extra_header :summary: * - :py:obj:`write_csv_file ` - .. autodoc2-docstring:: hlsfactory.flow_harp.write_csv_file :summary: * - :py:obj:`run_graph_gen ` - .. autodoc2-docstring:: hlsfactory.flow_harp.run_graph_gen :summary: Data ~~~~ .. list-table:: :class: autosummary longtable :align: left * - :py:obj:`PRAGMA_POSITION ` - .. autodoc2-docstring:: hlsfactory.flow_harp.PRAGMA_POSITION :summary: * - :py:obj:`BENCHMARK ` - .. autodoc2-docstring:: hlsfactory.flow_harp.BENCHMARK :summary: * - :py:obj:`type_graph ` - .. autodoc2-docstring:: hlsfactory.flow_harp.type_graph :summary: * - :py:obj:`processed_gexf_folder ` - .. autodoc2-docstring:: hlsfactory.flow_harp.processed_gexf_folder :summary: * - :py:obj:`auxiliary_node_gexf_folder ` - .. autodoc2-docstring:: hlsfactory.flow_harp.auxiliary_node_gexf_folder :summary: * - :py:obj:`MACHSUITE_KERNEL ` - .. autodoc2-docstring:: hlsfactory.flow_harp.MACHSUITE_KERNEL :summary: * - :py:obj:`poly_KERNEL ` - .. autodoc2-docstring:: hlsfactory.flow_harp.poly_KERNEL :summary: * - :py:obj:`ALL_KERNEL ` - .. autodoc2-docstring:: hlsfactory.flow_harp.ALL_KERNEL :summary: API ~~~ .. py:data:: PRAGMA_POSITION :canonical: hlsfactory.flow_harp.PRAGMA_POSITION :value: None .. autodoc2-docstring:: hlsfactory.flow_harp.PRAGMA_POSITION .. py:data:: BENCHMARK :canonical: hlsfactory.flow_harp.BENCHMARK :value: 'machsuite' .. autodoc2-docstring:: hlsfactory.flow_harp.BENCHMARK .. py:data:: type_graph :canonical: hlsfactory.flow_harp.type_graph :value: 'harp' .. autodoc2-docstring:: hlsfactory.flow_harp.type_graph .. py:data:: processed_gexf_folder :canonical: hlsfactory.flow_harp.processed_gexf_folder :value: 'join(...)' .. autodoc2-docstring:: hlsfactory.flow_harp.processed_gexf_folder .. py:data:: auxiliary_node_gexf_folder :canonical: hlsfactory.flow_harp.auxiliary_node_gexf_folder :value: 'join(...)' .. autodoc2-docstring:: hlsfactory.flow_harp.auxiliary_node_gexf_folder .. py:data:: MACHSUITE_KERNEL :canonical: hlsfactory.flow_harp.MACHSUITE_KERNEL :value: ['aes', 'gemm-blocked', 'gemm-ncubed', 'spmv-crs', 'spmv-ellpack', 'stencil_stencil2d', 'nw', 'md', ... .. autodoc2-docstring:: hlsfactory.flow_harp.MACHSUITE_KERNEL .. py:data:: poly_KERNEL :canonical: hlsfactory.flow_harp.poly_KERNEL :value: ['2mm', '3mm', 'adi', 'atax', 'bicg', 'bicg-large', 'covariance', 'doitgen', 'doitgen-red', 'fdtd-2d... .. autodoc2-docstring:: hlsfactory.flow_harp.poly_KERNEL .. py:data:: ALL_KERNEL :canonical: hlsfactory.flow_harp.ALL_KERNEL :value: None .. autodoc2-docstring:: hlsfactory.flow_harp.ALL_KERNEL .. py:class:: Node(block, function, text, type_n, features=None) :canonical: hlsfactory.flow_harp.Node .. autodoc2-docstring:: hlsfactory.flow_harp.Node .. rubric:: Initialization .. autodoc2-docstring:: hlsfactory.flow_harp.Node.__init__ .. py:method:: get_attr(after_process=True) :canonical: hlsfactory.flow_harp.Node.get_attr .. autodoc2-docstring:: hlsfactory.flow_harp.Node.get_attr .. py:class:: Edge(src, dst, flow, position) :canonical: hlsfactory.flow_harp.Edge .. autodoc2-docstring:: hlsfactory.flow_harp.Edge .. rubric:: Initialization .. autodoc2-docstring:: hlsfactory.flow_harp.Edge.__init__ .. py:method:: get_attr() :canonical: hlsfactory.flow_harp.Edge.get_attr .. autodoc2-docstring:: hlsfactory.flow_harp.Edge.get_attr .. py:function:: create_pseudo_node_block(block, function) :canonical: hlsfactory.flow_harp.create_pseudo_node_block .. autodoc2-docstring:: hlsfactory.flow_harp.create_pseudo_node_block .. py:function:: add_to_graph(g_nx, nodes, edges) :canonical: hlsfactory.flow_harp.add_to_graph .. autodoc2-docstring:: hlsfactory.flow_harp.add_to_graph .. py:function:: copy_files(name, src, dest) :canonical: hlsfactory.flow_harp.copy_files .. autodoc2-docstring:: hlsfactory.flow_harp.copy_files .. py:function:: read_json_graph(name, readable=True) :canonical: hlsfactory.flow_harp.read_json_graph .. autodoc2-docstring:: hlsfactory.flow_harp.read_json_graph .. py:function:: llvm_to_nx(name) :canonical: hlsfactory.flow_harp.llvm_to_nx .. autodoc2-docstring:: hlsfactory.flow_harp.llvm_to_nx .. py:function:: make_json_readable(name, js_graph) :canonical: hlsfactory.flow_harp.make_json_readable .. autodoc2-docstring:: hlsfactory.flow_harp.make_json_readable .. py:function:: extract_function_names(c_code) :canonical: hlsfactory.flow_harp.extract_function_names .. autodoc2-docstring:: hlsfactory.flow_harp.extract_function_names .. py:function:: get_tc_for_loop(for_loop_text) :canonical: hlsfactory.flow_harp.get_tc_for_loop .. autodoc2-docstring:: hlsfactory.flow_harp.get_tc_for_loop .. py:function:: get_icmp(path, name, log=False) :canonical: hlsfactory.flow_harp.get_icmp .. autodoc2-docstring:: hlsfactory.flow_harp.get_icmp .. py:function:: get_pragmas_loops(path, name, EXT='c', log=False) :canonical: hlsfactory.flow_harp.get_pragmas_loops .. autodoc2-docstring:: hlsfactory.flow_harp.get_pragmas_loops .. py:function:: create_pragma_nodes(g_nx, g_nx_nodes, for_dict_source, for_dict_llvm, log=True) :canonical: hlsfactory.flow_harp.create_pragma_nodes .. autodoc2-docstring:: hlsfactory.flow_harp.create_pragma_nodes .. py:function:: prune_redundant_nodes(g_new) :canonical: hlsfactory.flow_harp.prune_redundant_nodes .. autodoc2-docstring:: hlsfactory.flow_harp.prune_redundant_nodes .. py:function:: process_graph(name, g, csv_dict=None) :canonical: hlsfactory.flow_harp.process_graph .. autodoc2-docstring:: hlsfactory.flow_harp.process_graph .. py:function:: graph_generator(name, path, benchmark, generate_programl=False, csv_dict=None) :canonical: hlsfactory.flow_harp.graph_generator .. autodoc2-docstring:: hlsfactory.flow_harp.graph_generator .. py:function:: get_for_blocks_info(name, path) :canonical: hlsfactory.flow_harp.get_for_blocks_info .. autodoc2-docstring:: hlsfactory.flow_harp.get_for_blocks_info .. py:function:: augment_graph_hierarchy(name, for_blocks_info, src_path, dst_path, csv_dict=None, node_type='block') :canonical: hlsfactory.flow_harp.augment_graph_hierarchy .. autodoc2-docstring:: hlsfactory.flow_harp.augment_graph_hierarchy .. py:function:: add_auxiliary_nodes(name, path, processed_path, csv_dict, node_type='block', connected=False) :canonical: hlsfactory.flow_harp.add_auxiliary_nodes .. autodoc2-docstring:: hlsfactory.flow_harp.add_auxiliary_nodes .. py:function:: remove_extra_header(src_dir, kernel_name) :canonical: hlsfactory.flow_harp.remove_extra_header .. autodoc2-docstring:: hlsfactory.flow_harp.remove_extra_header .. py:function:: write_csv_file(csv_dict, csv_header, file_path) :canonical: hlsfactory.flow_harp.write_csv_file .. autodoc2-docstring:: hlsfactory.flow_harp.write_csv_file .. py:function:: run_graph_gen(mode='initial', connected=True, target=['machsuite', 'poly'], ALL_KERNEL=ALL_KERNEL) :canonical: hlsfactory.flow_harp.run_graph_gen .. autodoc2-docstring:: hlsfactory.flow_harp.run_graph_gen