Skip to content

Commit

Permalink
use gpu machine to build image
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Feb 6, 2024
1 parent 9e4f079 commit 622e2ff
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
docker:
name: Docker build ${{ matrix.name }}
runs-on: [self-hosted, linux, x64, cpu]
runs-on: [self-hosted, linux, x64, gpu]
timeout-minutes: 600
permissions:
contents: read
Expand Down Expand Up @@ -56,8 +56,6 @@ jobs:
fi
DOCKERFILE=dockerfile/${{ matrix.name }}.dockerfile
BUILD_ARGS="NUM_MAKE_JOBS=8"
CACHE_FROM="type=registry,ref=$(cut -d, -f1 <<< ${TAGS})"
CACHE_TO=""
if [[ "${{ github.event_name }}" != "pull_request" ]]; then
Expand Down
1 change: 0 additions & 1 deletion dockerfile/torch1.14-cuda11.8.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ RUN cd third_party/msccl && \
-gencode=arch=compute_90,code=sm_90" && \
make install
# cache TE build to save time in CI
ENV MAX_JOBS=1
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install git+https://github.com/NVIDIA/TransformerEngine.git@stable

Expand Down
1 change: 0 additions & 1 deletion dockerfile/torch2.1-cuda12.2.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ RUN cd third_party/msccl && \
-gencode=arch=compute_90,code=sm_90" && \
make install
# cache TE build to save time in CI
ENV MAX_JOBS=1
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install git+https://github.com/NVIDIA/TransformerEngine.git@stable

Expand Down
5 changes: 2 additions & 3 deletions msamp/te/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def set_fp8_weights(self):
self, weight_cast_attr,
Float8Tensor(
data=torch.empty(
shape,
(0, 0),
device=torch.cuda.current_device(),
dtype=torch.uint8,
),
Expand All @@ -82,8 +82,7 @@ def set_fp8_weights(self):
self, weight_transpose_attr,
Float8Tensor(
data=torch.empty(
shape[1],
shape[0],
(0, 0),
device=torch.cuda.current_device(),
dtype=torch.uint8,
),
Expand Down

0 comments on commit 622e2ff

Please sign in to comment.