@@ -74,27 +74,35 @@ let
7474 # (allowing FBGEMM to be built in pytorch-1.1), and may future proof this
7575 # derivation.
7676 brokenArchs = [ "3.0" ]; # this variable is only used as documentation.
77− cuda9ArchList = [
78− "3.5"
79− "5.0"
80− "5.2"
81− "6.0"
82− "6.1"
83− "7.0"
84− "7.0+PTX" # I am getting a "undefined architecture compute_75" on cuda 9
85− # which leads me to believe this is the final cuda-9-compatible architecture.
86− ];
87− cuda10ArchList = cuda9ArchList ++ [
88− "7.5"
89− "7.5+PTX" # < most recent architecture as of cudatoolkit_10_0 and pytorch-1.2.0
90− ];
77+
78+ cudaCapabilities = rec {
79+ cuda9 = [
80+ "3.5"
81+ "5.0"
82+ "5.2"
83+ "6.0"
84+ "6.1"
85+ "7.0"
86+ "7.0+PTX" # I am getting a "undefined architecture compute_75" on cuda 9
87+ # which leads me to believe this is the final cuda-9-compatible architecture.
88+ ];
89+
90+ cuda10 = cuda9 ++ [
91+ "7.5"
92+ "7.5+PTX" # < most recent architecture as of cudatoolkit_10_0 and pytorch-1.2.0
93+ ];
94+
95+ cuda11 = cuda10 ++ [
96+ "8.0"
97+ "8.0+PTX" # < CUDA toolkit 11.0
98+ "8.6"
99+ "8.6+PTX" # < CUDA toolkit 11.1
100+ ];
101+ };
91102 final_cudaArchList =
92103 if !cudaSupport || cudaArchList != null
93104 then cudaArchList
94− else
95− if lib.versions.major cudatoolkit.version == "9"
96− then cuda9ArchList
97− else cuda10ArchList; # the assert above removes any ambiguity here.
105+ else cudaCapabilities."cuda${lib.versions.major cudatoolkit.version}";
98106
99107 # Normally libcuda.so.1 is provided at runtime by nvidia-x11 via
100108 # LD_LIBRARY_PATH=/run/opengl-driver/lib. We only use the stub