@@ -33,7 +33,7 @@ We provide automated extraction and validation tools for constructing this datas
3333
3434
3535** Demo: Extract & Validate ResNet‑18**
36- ```
36+ ``` bash
3737git clone https://github.com/PaddlePaddle/GraphNet.git
3838cd GraphNet
3939
@@ -50,7 +50,7 @@ python -m graph_net.torch.validate \
5050
5151** Step 1: graph_net.torch.extract**
5252
53- ``` python
53+ ``` bash
5454import graph_net
5555
5656# Instantiate the model (e.g. a torchvision model)
@@ -66,7 +66,7 @@ model = graph_net.torch.extract(name="model_name")(model)
6666For details, see docstring of ` graph_net.torch.extract ` defined in ` graph_net/torch/extractor.py `
6767
6868** Step 2: graph_net.torch.validate**
69- ```
69+ ``` bash
7070# Verify that the extracted model meets requirements
7171python -m graph_net.torch.validate \
7272 --model-path $GRAPH_NET_EXTRACT_WORKSPACE /model_name
@@ -79,15 +79,15 @@ python -m graph_net.torch.validate \
7979
8080We use ``` graph_net/benchmark_demo.sh ``` to benchmark GraphNet computation graph samples:
8181
82- ```
82+ ``` bash
8383bash graph_net/benchmark_demo.sh &
8484```
8585
8686The script runs ``` graph_net.torch.test_compiler ``` with specific batch and log configurations.
8787
8888Or you can customize and use ``` graph_net.torch.test_compiler ``` yourself:
8989
90- ```
90+ ``` bash
9191python -m graph_net.torch.test_compiler \
9292 --model-path $GRAPH_NET_EXTRACT_WORKSPACE /model_name/ \
9393 --compiler /path/to/custom/compiler/ \
@@ -105,7 +105,7 @@ After executing, ```graph_net.torch.test_compiler``` will:
105105
106106After processing, we provide ``` graph_net/analysis.py ``` to generate [ violin plot] ( https://en.m.wikipedia.org/wiki/Violin_plot ) based on the JSON results.
107107
108- ```
108+ ``` bash
109109python -m graph_net.analysis \
110110 --benchmark-path /path/to/read/JSON/result/file/ \
111111 --output-dir /path/to/save/output/figures/
@@ -122,7 +122,7 @@ The script is designed to process a file structure as ```/benchmark_path/compile
1221223 . Extract samples from multi-GPU scenarios to support benchmarking and optimization for large-scale, distributed computing.
1231234 . Enable splitting full graphs into independently optimized subgraphs and operator sequences.
124124
125- ** Vision** : GraphNet aims to lay the foundation for AI4C by enabling large-scale, systematic evaluation of tensor compiler optimizations.
125+ ** Vision** : GraphNet aims to lay the foundation for ai4c by enabling large-scale, systematic evaluation of tensor compiler optimizations.
126126
127127## GraphNet Community:
128128
0 commit comments