# gnn_macro_place_predictor **Repository Path**: Constwelve/gnn_macro_place_predictor ## Basic Information - **Project Name**: gnn_macro_place_predictor - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-24 - **Last Updated**: 2021-09-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # src/contents * batch.py , loader.py 对PyG原有的loader进行了修改,使得对于Hypergraph,batch_size>1时可以正确加载egde_index和macro_index * layers.py HyperSAGPool是基于attention的Hypergraph pooling,现在没有在用 HyperConv是允许每个node向不同的的hyperedge propagate不同的message的 conv AttHyperConv在上述HyperConv之上在Hyperedge propagate 到node时增加了attention机制,使得不同hyperedge传到node时有不同的权重。正考虑有没有办法把att移到node->edge的部分,这样感觉更合理。 AttHyperhgraphConv在HypergraphConv(PyG已经实现的)之上在Hyperedge propagate 到node时增加了attention机制,使得不同hyperedge传到node时有不同的权重 * models.py 里面除了ANet和CNN都已经弃用 ANet 一层AttHyperConv + 2 层 AttHypergraphConv + 一个3层 MLP,中间加了每层graph conv到MLP的额外的连接。采用 graph mean pooling 和 macro mean pooling。 * datasets.py 除了DesignSet和CNNDataset其他的都已经弃用了,CNNDataset仅用于测试CNN模型。 DesignSet Data 中包括 * x=cell_size * edge_index * pin_feature=pin_offset * macro_index=macro_index, * golden=gold, * wl=routed wire length * rank=该 design 内部rwl排名 * cell_pos=real cell pos * fake_pos=cell pos infered from macro pos * hpwl * util.py,looger.py 一些工具,可以计算graph的半径,cell 到每个macro的最短路等 # train and test train 直接用 main.py python main.py --model ANet --batch_size 2 --device cuda:1 --lr 0.0002 --step_size 50 #lr decay step size --graph_reg #表示图回归 --dataset DesignSet --nhid 128 --label hpwl --seed 2021 --attention --use_real_pos --design all #训练和测试所用的design,可指定单个design或者使用all即suoyoudesign test 用 test.py, 不用指定model,他会从路径读出来,但要选择attention python test.py --checkp save/ANet_graph_ispd19_test4_Sep:24:07:46:22/best.pth --design ispd19_test4 --attention --device cuda:3