Skip to content

Commit 740e15a

Browse files
xuzhao9facebook-github-bot
authored andcommitted
Add sm_90a arch gencode to docker (#2338)
Summary: We need to override the upstream config and add `sm_90a` gencode to the docker. Pull Request resolved: #2338 Test Plan: https://github.com/pytorch/benchmark/actions/runs/9704484783 https://github.com/pytorch/benchmark/actions/runs/9704484783/job/26784787989#step:5:2057 ``` #11 900.6 + /usr/local/cuda-12.4/bin/nvprune -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90a,code=sm_90a /usr/local/cuda-12.4/lib64/libcublas_static.a -o /usr/local/cuda-12.4/lib64/libcublas_static.a #11 901.5 + /usr/local/cuda-12.4/bin/nvprune -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90a,code=sm_90a /usr/local/cuda-12.4/lib64/libcublasLt_static.a -o /usr/local/cuda-12.4/lib64/libcublasLt_static.a ``` Nightly docker build: https://github.com/pytorch/benchmark/actions/runs/9704719476 Reviewed By: aaronenyeshi Differential Revision: D59136248 Pulled By: xuzhao9 fbshipit-source-id: 09a71a509b2ac448d66f950e92c33effc173d48f
1 parent aeda65a commit 740e15a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docker/gcp-a100-runner-dind.dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# default base image: ghcr.io/actions/actions-runner:latest
22
# base image: Ubuntu 22.04 jammy
3+
# Prune CUDA to only keep gencode >= A100
34
ARG BASE_IMAGE=ghcr.io/actions/actions-runner:latest
45
FROM ${BASE_IMAGE}
56

67
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
8+
ARG OVERRIDE_GENCODE="-gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90a,code=sm_90a"
9+
ARG OVERRIDE_GENCODE_CUDNN="-gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90a,code=sm_90a"
710

811
RUN sudo apt-get -y update && sudo apt -y update
912
# fontconfig: required by model doctr_det_predictor
@@ -30,7 +33,7 @@ RUN sudo mkdir -p /workspace; sudo chown runner:runner /workspace
3033
# Use the CUDA installation scripts from pytorch/builder
3134
# Install CUDA 12.4 only to reduce docker size
3235
RUN cd /workspace; git clone https://github.com/pytorch/builder.git
33-
RUN sudo bash -c 'source /workspace/builder/common/install_cuda.sh; install_124; prune_124'
36+
RUN sudo bash -c "set -x; source /workspace/builder/common/install_cuda.sh; install_124; export OVERRIDE_GENCODE=\"${OVERRIDE_GENCODE}\" OVERRIDE_GENCODE_CUDNN=\"${OVERRIDE_GENCODE_CUDNN}\"; prune_124"
3437

3538
# Install miniconda
3639
RUN wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /workspace/Miniconda3-latest-Linux-x86_64.sh

0 commit comments

Comments
 (0)