forked from pytorch/builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (36 loc) · 1.18 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
SHELL=/usr/bin/env bash
DESIRED_CUDA ?= 11.6
PACKAGE_NAME ?= magma-cuda116
CUDA_ARCH_LIST ?= -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86
DOCKER_RUN = set -eou pipefail; docker run --rm -i \
-v $(shell git rev-parse --show-toplevel):/builder \
-w /builder \
-e DESIRED_CUDA=${DESIRED_CUDA} \
-e PACKAGE_NAME=${PACKAGE_NAME} \
-e CUDA_ARCH_LIST="${CUDA_ARCH_LIST}" \
"pytorch/conda-builder:cuda${DESIRED_CUDA}" \
magma/build_magma.sh
.PHONY: all
all: magma-cuda118
all: magma-cuda117
all: magma-cuda116
.PHONY:
clean:
$(RM) -r magma-*
$(RM) -r output
.PHONY: magma-cuda118
magma-cuda118: DESIRED_CUDA := 11.8
magma-cuda118: PACKAGE_NAME := magma-cuda118
magma-cuda118: CUDA_ARCH_LIST += -gencode arch=compute_90,code=sm_90
magma-cuda118:
$(DOCKER_RUN)
.PHONY: magma-cuda117
magma-cuda117: DESIRED_CUDA := 11.7
magma-cuda117: PACKAGE_NAME := magma-cuda117
magma-cuda117:
$(DOCKER_RUN)
.PHONY: magma-cuda116
magma-cuda116: DESIRED_CUDA := 11.6
magma-cuda116: PACKAGE_NAME := magma-cuda116
magma-cuda116:
$(DOCKER_RUN)