File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
pkgs/development/python-modules/openai-triton Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1919, filelock
2020, torchWithRocm
2121, python
22+
23+ , runCommand
24+
2225, cudaPackages
2326, cudaSupport ? config . cudaSupport
2427} :
@@ -158,7 +161,18 @@ buildPythonPackage rec {
158161 # ];
159162
160163 # Ultimately, torch is our test suite:
161- passthru . tests = { inherit torchWithRocm ; } ;
164+ passthru . tests = {
165+ inherit torchWithRocm ;
166+ # Implemented as alternative to pythonImportsCheck, in case if circular dependency on torch occurs again,
167+ # and pythonImportsCheck is commented back.
168+ import-triton = runCommand "import-triton" { nativeBuildInputs = [ ( python . withPackages ( ps : [ ps . openai-triton ] ) ) ] ; } ''
169+ python << \EOF
170+ import triton
171+ import triton.language
172+ EOF
173+ touch "$out"
174+ '' ;
175+ } ;
162176
163177 pythonRemoveDeps = [
164178 # Circular dependency, cf. https://github.com/openai/triton/issues/1374
You can’t perform that action at this time.
0 commit comments