9595 {
9696 path ,
9797 rev ,
98+ doGetKernelCheck ,
9899 stripRPath ? false ,
99100 oldLinuxCompat ? false ,
100101 } :
@@ -128,12 +129,18 @@ rec {
128129 if buildConfig . general . universal then
129130 # No torch extension sources? Treat it as a noarch package.
130131 pkgs . callPackage ./torch-extension-noarch ( {
131- inherit src rev torch ;
132+ inherit
133+ src
134+ rev
135+ torch
136+ doGetKernelCheck
137+ ;
132138 extensionName = buildConfig . general . name ;
133139 } )
134140 else
135141 pkgs . callPackage ./torch-extension ( {
136142 inherit
143+ doGetKernelCheck
137144 extraDeps
138145 nvccThreads
139146 src
@@ -166,14 +173,15 @@ rec {
166173 buildSets ,
167174 path ,
168175 rev ,
176+ doGetKernelCheck ,
169177 } :
170178 let
171179 extensionForTorch =
172180 { path , rev } :
173181 buildSet : {
174182 name = torchBuildVersion buildSet ;
175183 value = buildTorchExtension buildSet {
176- inherit path rev ;
184+ inherit path rev doGetKernelCheck ;
177185 stripRPath = true ;
178186 oldLinuxCompat = true ;
179187 } ;
@@ -183,13 +191,17 @@ rec {
183191 builtins . listToAttrs ( lib . map ( extensionForTorch { inherit path rev ; } ) filteredBuildSets ) ;
184192
185193 buildTorchExtensionBundle =
186- { path , rev } :
194+ {
195+ path ,
196+ rev ,
197+ doGetKernelCheck ,
198+ } :
187199 let
188200 # We just need to get any nixpkgs for use by the path join.
189201 pkgs = ( builtins . head buildSets ) . pkgs ;
190202 upstreamBuildSets = builtins . filter ( buildSet : buildSet . upstreamVariant ) buildSets ;
191203 extensions = buildDistTorchExtensions {
192- inherit path rev ;
204+ inherit path rev doGetKernelCheck ;
193205 buildSets = upstreamBuildSets ;
194206 } ;
195207 buildConfig = readBuildConfig path ;
@@ -211,6 +223,7 @@ rec {
211223 {
212224 path ,
213225 rev ,
226+ doGetKernelCheck ,
214227 pythonCheckInputs ,
215228 pythonNativeCheckInputs ,
216229 } :
@@ -237,7 +250,9 @@ rec {
237250 ]
238251 ++ ( pythonCheckInputs python3 . pkgs ) ;
239252 shellHook = ''
240- export PYTHONPATH='' ${PYTHONPATH}:${ buildTorchExtension buildSet { inherit path rev ; } }
253+ export PYTHONPATH='' ${PYTHONPATH}:${
254+ buildTorchExtension buildSet { inherit path rev doGetKernelCheck ; }
255+ }
241256 '' ;
242257 } ;
243258 } ;
@@ -249,6 +264,7 @@ rec {
249264 {
250265 path ,
251266 rev ,
267+ doGetKernelCheck ,
252268 pythonCheckInputs ,
253269 pythonNativeCheckInputs ,
254270 } :
@@ -272,7 +288,7 @@ rec {
272288 ]
273289 ++ ( pythonNativeCheckInputs python3 . pkgs ) ;
274290 buildInputs = with pkgs ; [ python3 . pkgs . pytest ] ++ ( pythonCheckInputs python3 . pkgs ) ;
275- inputsFrom = [ ( buildTorchExtension buildSet { inherit path rev ; } ) ] ;
291+ inputsFrom = [ ( buildTorchExtension buildSet { inherit path rev doGetKernelCheck ; } ) ] ;
276292 env = lib . optionalAttrs rocmSupport {
277293 PYTORCH_ROCM_ARCH = lib . concatStringsSep ";" buildSet . torch . rocmArchs ;
278294 HIP_PATH = pkgs . rocmPackages . clr ;
0 commit comments