Skip to content

Commit e75087e

Browse files
authored
[FIX] add batch_norm MLP (#62)
* add mlp for batch norm * disabled sm_90 temporarily * build wheels for backward compatibility --------- Co-authored-by: John Calderon <[email protected]>
1 parent 16d89af commit e75087e

File tree

3 files changed

+184
-10
lines changed

3 files changed

+184
-10
lines changed

.github/workflows/whl-build-all.yaml

Lines changed: 181 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
create-habitat-index-html:
8-
needs: [whl-build-cu118, whl-build-cu121]
8+
needs: [whl-build-cu113, whl-build-cu116, whl-build-cu117, whl-build-cu118, whl-build-cu121]
99
runs-on: [self-hosted]
1010
steps:
1111
- name: Configure AWS Credentials
@@ -17,12 +17,190 @@ jobs:
1717

1818
- name: Create index.html
1919
run: |
20-
python3 /home/builduser/create_index.py habitat -f wheels-cu118 wheels-cu121
21-
20+
python3 /home/builduser/create_index.py habitat -f wheels-cu113 wheels-cu116 wheels-cu117 wheels-cu118 wheels-cu121
2221
- name: Upload to S3
2322
run: |
2423
aws s3 cp index.html s3://centml-releases/habitat/
24+
whl-build-cu113:
25+
runs-on: [self-hosted, cu113]
26+
steps:
27+
- name: Configure AWS Credentials
28+
uses: aws-actions/configure-aws-credentials@v4
29+
with:
30+
aws-access-key-id: ${{ secrets.HABITAT_AWS_ACCESS_KEY }}
31+
aws-region: ${{ secrets.HABITAT_AWS_REGION }}
32+
aws-secret-access-key: ${{ secrets.HABITAT_AWS_SECRET_ACCESS_KEY }}
33+
34+
- name: Display host information
35+
run: |
36+
uname -a
37+
hostname
38+
pwd
39+
id
40+
ls -la
41+
- name: Fetch repository
42+
uses: actions/checkout@v4
43+
44+
- name: Build Python3.8 wheel
45+
run: |
46+
./build_scripts/build_wheel.sh python3.8
47+
env:
48+
VERSION_CUDA_TAG: cu113
49+
EXTRA_REQUIRES: nvidia-cuda-cupti-cu11==11.7.101,nvidia-cuda-runtime-cu11==11.7.99
50+
51+
- name: Build Python3.9 wheel
52+
run: |
53+
./build_scripts/build_wheel.sh python3.9
54+
env:
55+
VERSION_CUDA_TAG: cu113
56+
EXTRA_REQUIRES: nvidia-cuda-cupti-cu11==11.7.101,nvidia-cuda-runtime-cu11==11.7.99
57+
58+
- name: Build Python3.10 wheel
59+
run: |
60+
./build_scripts/build_wheel.sh python3.10
61+
env:
62+
VERSION_CUDA_TAG: cu113
63+
EXTRA_REQUIRES: nvidia-cuda-cupti-cu11==11.7.101,nvidia-cuda-runtime-cu11==11.7.99
64+
65+
- name: Build Python3.11 wheel
66+
run: |
67+
./build_scripts/build_wheel.sh python3.11
68+
env:
69+
VERSION_CUDA_TAG: cu113
70+
EXTRA_REQUIRES: nvidia-cuda-cupti-cu11==11.7.101,nvidia-cuda-runtime-cu11==11.7.99
71+
72+
- name: Upload wheels to S3
73+
run: |
74+
aws s3 cp analyzer/dist/ s3://centml-releases/habitat/wheels-cu113/ --recursive --exclude "*" --include "*.whl"
75+
76+
- name: Create index.html
77+
run: |
78+
file_list=(analyzer/dist/*.whl)
79+
formatted_file_list=$(basename -a ${file_list[@]})
80+
python3 /home/builduser/create_index.py habitat_cu113 -f $formatted_file_list
81+
- name: Upload index.html to S3
82+
run: |
83+
aws s3 cp index.html s3://centml-releases/habitat/wheels-cu113/
84+
whl-build-cu116:
85+
runs-on: [self-hosted, cu116]
86+
steps:
87+
- name: Configure AWS Credentials
88+
uses: aws-actions/configure-aws-credentials@v4
89+
with:
90+
aws-access-key-id: ${{ secrets.HABITAT_AWS_ACCESS_KEY }}
91+
aws-region: ${{ secrets.HABITAT_AWS_REGION }}
92+
aws-secret-access-key: ${{ secrets.HABITAT_AWS_SECRET_ACCESS_KEY }}
2593

94+
- name: Display host information
95+
run: |
96+
uname -a
97+
hostname
98+
pwd
99+
id
100+
ls -la
101+
- name: Fetch repository
102+
uses: actions/checkout@v4
103+
104+
- name: Build Python3.8 wheel
105+
run: |
106+
./build_scripts/build_wheel.sh python3.8
107+
env:
108+
VERSION_CUDA_TAG: cu116
109+
EXTRA_REQUIRES: nvidia-cuda-cupti-cu11==11.7.101,nvidia-cuda-runtime-cu11==11.7.99
110+
111+
- name: Build Python3.9 wheel
112+
run: |
113+
./build_scripts/build_wheel.sh python3.9
114+
env:
115+
VERSION_CUDA_TAG: cu116
116+
EXTRA_REQUIRES: nvidia-cuda-cupti-cu11==11.7.101,nvidia-cuda-runtime-cu11==11.7.99
117+
118+
- name: Build Python3.10 wheel
119+
run: |
120+
./build_scripts/build_wheel.sh python3.10
121+
env:
122+
VERSION_CUDA_TAG: cu116
123+
EXTRA_REQUIRES: nvidia-cuda-cupti-cu11==11.7.101,nvidia-cuda-runtime-cu11==11.7.99
124+
125+
- name: Build Python3.11 wheel
126+
run: |
127+
./build_scripts/build_wheel.sh python3.11
128+
env:
129+
VERSION_CUDA_TAG: cu116
130+
EXTRA_REQUIRES: nvidia-cuda-cupti-cu11==11.7.101,nvidia-cuda-runtime-cu11==11.7.99
131+
132+
- name: Upload wheels to S3
133+
run: |
134+
aws s3 cp analyzer/dist/ s3://centml-releases/habitat/wheels-cu116/ --recursive --exclude "*" --include "*.whl"
135+
136+
- name: Create index.html
137+
run: |
138+
file_list=(analyzer/dist/*.whl)
139+
formatted_file_list=$(basename -a ${file_list[@]})
140+
python3 /home/builduser/create_index.py habitat_cu116 -f $formatted_file_list
141+
- name: Upload index.html to S3
142+
run: |
143+
aws s3 cp index.html s3://centml-releases/habitat/wheels-cu116/
144+
whl-build-cu117:
145+
runs-on: [self-hosted, cu117]
146+
steps:
147+
- name: Configure AWS Credentials
148+
uses: aws-actions/configure-aws-credentials@v4
149+
with:
150+
aws-access-key-id: ${{ secrets.HABITAT_AWS_ACCESS_KEY }}
151+
aws-region: ${{ secrets.HABITAT_AWS_REGION }}
152+
aws-secret-access-key: ${{ secrets.HABITAT_AWS_SECRET_ACCESS_KEY }}
153+
154+
- name: Display host information
155+
run: |
156+
uname -a
157+
hostname
158+
pwd
159+
id
160+
ls -la
161+
- name: Fetch repository
162+
uses: actions/checkout@v4
163+
164+
- name: Build Python3.8 wheel
165+
run: |
166+
./build_scripts/build_wheel.sh python3.8
167+
env:
168+
VERSION_CUDA_TAG: cu117
169+
EXTRA_REQUIRES: nvidia-cuda-cupti-cu11==11.7.101,nvidia-cuda-runtime-cu11==11.7.99
170+
171+
- name: Build Python3.9 wheel
172+
run: |
173+
./build_scripts/build_wheel.sh python3.9
174+
env:
175+
VERSION_CUDA_TAG: cu117
176+
EXTRA_REQUIRES: nvidia-cuda-cupti-cu11==11.7.101,nvidia-cuda-runtime-cu11==11.7.99
177+
178+
- name: Build Python3.10 wheel
179+
run: |
180+
./build_scripts/build_wheel.sh python3.10
181+
env:
182+
VERSION_CUDA_TAG: cu117
183+
EXTRA_REQUIRES: nvidia-cuda-cupti-cu11==11.7.101,nvidia-cuda-runtime-cu11==11.7.99
184+
185+
- name: Build Python3.11 wheel
186+
run: |
187+
./build_scripts/build_wheel.sh python3.11
188+
env:
189+
VERSION_CUDA_TAG: cu117
190+
EXTRA_REQUIRES: nvidia-cuda-cupti-cu11==11.7.101,nvidia-cuda-runtime-cu11==11.7.99
191+
192+
- name: Upload wheels to S3
193+
run: |
194+
aws s3 cp analyzer/dist/ s3://centml-releases/habitat/wheels-cu117/ --recursive --exclude "*" --include "*.whl"
195+
196+
- name: Create index.html
197+
run: |
198+
file_list=(analyzer/dist/*.whl)
199+
formatted_file_list=$(basename -a ${file_list[@]})
200+
python3 /home/builduser/create_index.py habitat_cu117 -f $formatted_file_list
201+
- name: Upload index.html to S3
202+
run: |
203+
aws s3 cp index.html s3://centml-releases/habitat/wheels-cu117/
26204
whl-build-cu118:
27205
runs-on: [self-hosted, cu118]
28206
steps:
@@ -40,7 +218,6 @@ jobs:
40218
pwd
41219
id
42220
ls -la
43-
44221
- name: Fetch repository
45222
uses: actions/checkout@v4
46223

@@ -81,11 +258,9 @@ jobs:
81258
file_list=(analyzer/dist/*.whl)
82259
formatted_file_list=$(basename -a ${file_list[@]})
83260
python3 /home/builduser/create_index.py habitat_cu118 -f $formatted_file_list
84-
85261
- name: Upload index.html to S3
86262
run: |
87263
aws s3 cp index.html s3://centml-releases/habitat/wheels-cu118/
88-
89264
whl-build-cu121:
90265
runs-on: [self-hosted, cu121]
91266
steps:
@@ -103,7 +278,6 @@ jobs:
103278
pwd
104279
id
105280
ls -la
106-
107281
- name: Fetch repository
108282
uses: actions/checkout@v4
109283

@@ -140,7 +314,6 @@ jobs:
140314
file_list=(analyzer/dist/*.whl)
141315
formatted_file_list=$(basename -a ${file_list[@]})
142316
python3 /home/builduser/create_index.py habitat_cu121 -f $formatted_file_list
143-
144317
- name: Upload index.html to S3
145318
run: |
146319
aws s3 cp index.html s3://centml-releases/habitat/wheels-cu121/

analyzer/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,13 @@
5353
"analysis/mlp/devices.csv",
5454
"data/hints.yml",
5555
"data/devices.yml",
56+
"data/kernels.sqlite",
5657
"data/bmm/model.pth",
5758
"data/conv_transpose2d/model.pth",
5859
"data/conv2d/model.pth",
59-
"data/kernels.sqlite",
6060
"data/linear/model.pth",
6161
"data/lstm/model.pth",
62+
"data/batch_norm/model.pth",
6263
"habitat_cuda.cpython-{}*.so".format(PYTHON_VERSION),
6364
],
6465
}

cpp/src/cuda/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ target_compile_options(
3434
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-gencode arch=compute_70,code=sm_70>"
3535
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-gencode arch=compute_75,code=sm_75>"
3636
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-gencode arch=compute_80,code=sm_80>"
37-
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-gencode arch=compute_90,code=sm_90>"
37+
# "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-gencode arch=compute_90,code=sm_90>"
3838
)

0 commit comments

Comments
 (0)