Skip to content

Commit bfe0848

Browse files
authored
Merge branch 'PaddlePaddle:develop' into develop
2 parents 22a2772 + ad4b5da commit bfe0848

File tree

57 files changed

+4178
-648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4178
-648
lines changed

.pre-commit-config.yaml

100644100755
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,19 @@ repos:
33
rev: 23.1.0
44
hooks:
55
- id: black
6-
language_version: python3
6+
language_version: python3
7+
8+
- repo: https://github.com/astral-sh/ruff-pre-commit
9+
rev: v0.14.4
10+
hooks:
11+
- id: ruff-check
12+
args: [--fix, --exit-non-zero-on-fix, --no-cache]
13+
14+
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
15+
rev: v1.5.1
16+
hooks:
17+
- id: remove-crlf
18+
- id: remove-tabs
19+
name: Tabs remver (Python)
20+
files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$
21+
args: [--whitespaces-count, '4']

README.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,29 +59,19 @@ After executing, `graph_net.torch.test_compiler` will:
5959
3. Executing the compiled model and collecting its runtime and outputs.
6060
4. Conduct speedup by comparing the compiled results against the baseline (if no execution failure occurs).
6161

62-
**Step 2: Generate JSON Record**
62+
**Step 2: Analysis**
6363

64-
Extract runtime, correctness, and failure information from benchmark logs:
65-
66-
```bash
67-
python -m graph_net.log2json \
68-
--log-file $GRAPH_NET_BENCHMARK_PATH/log.log \
69-
--output-dir $GRAPH_NET_BENCHMARK_PATH/JSON_results/
70-
```
71-
72-
**Step 3: Analysis**
73-
74-
Use the three scripts `graph_net.plot_St`, `graph_net.plot_ESt` and `graph_net.plot_violin` to generate St plot, ESt plot, and [violin plot](https://en.m.wikipedia.org/wiki/Violin_plot) based on the JSON results.
64+
Use the three scripts `graph_net.plot_St`, `graph_net.plot_ESt` and `graph_net.plot_violin` to generate St plot, ESt plot, and [violin plot](https://en.m.wikipedia.org/wiki/Violin_plot) based on speedup, correctness and runtime information from benchmark logs.
7565

7666
```bash
7767
python -m graph_net.plot_St \
78-
--benchmark-path $GRAPH_NET_BENCHMARK_PATH/JSON_results/ \
68+
--benchmark-path $GRAPH_NET_BENCHMARK_PATH/log.log \
7969
--output-dir $GRAPH_NET_BENCHMARK_PATH \
8070
--negative-speedup-penalty penalty/power/for/negative/speedup \
8171
--fpdb base/penalty/for/severe/errors
8272

8373
python -m graph_net.plot_ESt \
84-
--benchmark-path $GRAPH_NET_BENCHMARK_PATH/JSON_results/ \
74+
--benchmark-path $GRAPH_NET_BENCHMARK_PATH/log.log \
8575
--output-dir $GRAPH_NET_BENCHMARK_PATH \
8676
--negative-speedup-penalty penalty/power/for/negative/speedup \
8777
--fpdb base/penalty/for/severe/errors

graph_net/__init__.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
__all__ = ["torch", "paddle"]
2-
3-
from importlib import import_module
4-
from typing import TYPE_CHECKING, Any, List
5-
6-
7-
def __getattr__(name: str) -> Any:
8-
if name in __all__:
9-
module = import_module(f"{__name__}.{name}")
10-
globals()[name] = module
11-
return module
12-
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
13-
14-
15-
def __dir__() -> List[str]:
16-
return sorted(list(globals().keys()) + __all__)
17-
18-
19-
if TYPE_CHECKING:
20-
from . import torch as torch # type: ignore
21-
from . import paddle as paddle # type: ignore
1+
__all__ = ["torch", "paddle"]
2+
3+
from importlib import import_module
4+
from typing import TYPE_CHECKING, Any, List
5+
6+
7+
def __getattr__(name: str) -> Any:
8+
if name in __all__:
9+
module = import_module(f"{__name__}.{name}")
10+
globals()[name] = module
11+
return module
12+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
13+
14+
15+
def __dir__() -> List[str]:
16+
return sorted(list(globals().keys()) + __all__)
17+
18+
19+
if TYPE_CHECKING:
20+
from . import torch as torch # type: ignore
21+
from . import paddle as paddle # type: ignore

0 commit comments

Comments
 (0)