Skip to content

Commit 3bef228

Browse files
authored
Fix csrc Makefile and update doc (#24)
1 parent ae3efb5 commit 3bef228

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed

csrc/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
TFCOLL_WITH_CUDA ?= ON
22
TFCOLL_WITH_NCCL ?= ON
3-
TFCOLL_USE_CXX11_ABI ?= 0
43

54
PYTHON ?= python
65
CXX ?= g++
76
LOCAL_HOME ?= /usr/local
87
PAI_HOME ?= /home/pai
98

109
CFLAGS := -O3 -g -DNDEBUG \
11-
-D_GLIBCXX_USE_CXX11_ABI=$(TFCOLL_USE_CXX11_ABI) \
1210
-DEIGEN_MPL2_ONLY \
1311
-DEIGEN_MAX_ALIGN_BYTES=64 \
1412
-DEIGEN_HAS_TYPE_TRAITS=0 \

docs/zh/api/env.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Env
2+
3+
本文档主要介绍EPL的Env中获取常用的运行时信息。
4+
5+
你可以通过`epl.Env.get()` 获取当前的env对象。
6+
7+
## cluster
8+
9+
cluster包含当前分布式任务的集群信息。
10+
11+
| Attribute | Type | Description |
12+
|:--------:|:-------:|:-----------:|
13+
| `cluster.worker_num` | int | worker数量 |
14+
| `cluster.worker_index` | int | 当前worker的index |
15+
16+
示例
17+
18+
```python
19+
import epl
20+
env = epl.Env.get()
21+
worker_num = env.cluster.worker_num
22+
worker_index = env.cluster.worker_index
23+
```
24+
25+
## config
26+
27+
config包含当前epl的配置信息。
28+
29+
示例
30+
31+
```
32+
import epl
33+
env = epl.Env.get()
34+
config = env.config
35+
```
36+
37+

docs/zh/api/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ API 文档
88
strategy
99
api_examples
1010
config
11+
env
1112

1213
|
1314
|

docs/zh/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ EPL (Easy Parallel Library) 是一个高效易用的分布式大模型训练框
2121
api/strategy
2222
api/api_examples
2323
api/config
24+
api/env
2425

2526
|
2627
|

0 commit comments

Comments
 (0)