Skip to content

Commit

Permalink
python3Packages.torch: nvcc-compatible stdenv: pass directly to build…
Browse files Browse the repository at this point in the history
…PythonPackage

Because since recently that is possible
  • Loading branch information
SomeoneSerge committed Oct 23, 2023
1 parent c5cc415 commit 41ecfd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/torch/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ in buildPythonPackage rec {

disabled = pythonOlder "3.8.0";

stdenv = effectiveStdenv;

outputs = [
"out" # output standard python package
"dev" # output libtorch headers
Expand Down Expand Up @@ -220,8 +222,6 @@ in buildPythonPackage rec {
# https://github.com/pytorch/pytorch/blob/a4391f085bff409dca93a8b3eff8e379f0ef8f68/scripts/get_python_cmake_flags.py#L20-L21
"-DPYTHON_EXECUTABLE:FILEPATH=${lib.getExe python}"
"-DPYTHON_INCLUDE_DIR:FILEPATH=${lib.getDev python}/include/python${python.pythonVersion}"
"-DCMAKE_CXX_COMPILER=${effectiveStdenv.cc}/bin/${effectiveStdenv.cc.targetPrefix}c++"
"-DCMAKE_C_COMPILER=${effectiveStdenv.cc}/bin/${effectiveStdenv.cc.targetPrefix}cc"
];

# Keep these two lines close because they're entangled.
Expand Down

0 comments on commit 41ecfd5

Please sign in to comment.