File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed
Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 1+ import os
12import torch
23
34
5+ # Setting this param to a list has a problem of generating different
6+ # compilation commands (with diferent order of architectures) and
7+ # leading to recompilation of fused kernels. Set it to empty string
8+ # to avoid recompilation and assign arch flags explicity in
9+ # extra_cuda_cflags below
10+ os .environ ["TORCH_CUDA_ARCH_LIST" ] = ""
11+
12+
413def load (args ):
514 if torch .version .hip is None :
615 print ("running on CUDA devices" )
Original file line number Diff line number Diff line change 66from torch .utils import cpp_extension
77from megatron .fused_kernels .utils import _create_build_dir
88
9- # Do not override TORCH_CUDA_ARCH_LIST to allow for pre-compilation in Dockerfile
10- # os.environ["TORCH_CUDA_ARCH_LIST"] = ""
11-
129
1310def load (args ):
1411
Original file line number Diff line number Diff line change 1919from megatron .fused_kernels .utils import _create_build_dir
2020
2121
22- # Setting this param to a list has a problem of generating different
23- # compilation commands (with diferent order of architectures) and
24- # leading to recompilation of fused kernels. Set it to empty string
25- # to avoid recompilation and assign arch flags explicity in
26- # extra_cuda_cflags below
27- os .environ ["TORCH_CUDA_ARCH_LIST" ] = ""
28-
29-
3022def load (args ):
3123
3224 # Build path
You can’t perform that action at this time.
0 commit comments