Commit 98ad6ca1 authored by Winter M's avatar Winter M
Browse files

python3Packages.tensorflow-bin: fix cuda routines that require jit

Without this change (or $XLA_FLAGS set properly), errors like this would
crop up, resulting in JIT compilation failures:

2025-10-07 17:29:56.600986: W external/local_xla/xla/service/gpu/llvm_gpu_backend/default/nvptx_libdevice_path.cc:40] Can't find libdevice directory ${CUDA_DIR}/nvvm/libdevice. This may result in compilation or runtime failures, if the program we try to run uses routines from libdevice.
parent 8633bccb
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -205,7 +205,12 @@ buildPythonPackage rec {
          ''}
        done
      ''
    );
    )
    # Symlink nvcc besides TensorFlow so that routines that require JIT can work
    # properly.
    + lib.optionalString cudaSupport ''
      ln -s ${cudaPackages.cuda_nvcc} "$out/${python.sitePackages}/tensorflow/cuda"
    '';

  # Upstream has a pip hack that results in bin/tensorboard being in both tensorflow
  # and the propagated input tensorboard, which causes environment collisions.