Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cudaPackages: enable cross-compilation (take two) #279952

Closed

Commits on Mar 26, 2024

  1. gcc: link $lib/lib -> $lib/$targetConfig correctly and consistently

    When native-compiling, gcc will install libraries into:
    
      /nix/store/...-$targetConfig-gcc-$version-lib/lib
    
    When cross-compiling, gcc will install libraries into:
    
      /nix/store/...-$targetConfig-gcc-$version-lib/$targetConfig
    
    When cross-compiling, we intended to create a link from $lib/lib to
    $lib/$targetConfig, so that downstream users can always safely
    assume that "${lib.getLib stdenv.cc.cc}/lib" is where the gcc
    libraries are, regardless of whether `stdenv.cc.cc` is a cross
    compiler or a native compiler.
    
    Unfortunately, there were two problems with how we were trying to
    create these links:
    
    1. The link would be created only when `enableLibGccOutput==true`
    
    2. The link was being created from the incorrect source
       `$lib/lib/lib` instead of `$lib/lib`.
    
    Both of these mistakes are my fault.  This commit corrects them by
    creating the link using `ln -Ts` (which is more predictable) and by
    creating the link from `gcc/common/builder.nix` rather than from
    `gcc/common/libgcc.nix`.
    Adam Joseph authored and Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    cbcc890 View commit details
    Browse the repository at this point in the history
  2. cudaPackages: cross-compilation attempt 2

    workaround bug in cross-compilation / meta.getExe
    
    cudaPackages.autoAddCudaCompatRunpathHook: correct meta.platforms reference
    
    cudaPackages.backendStdenv: use coreutils from buildPackages when cross-compiling
    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    cbde122 View commit details
    Browse the repository at this point in the history
  3. cuda-modules/setup-hooks: introduce helper function and add comments …

    …about callPackage
    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    c86cead View commit details
    Browse the repository at this point in the history
  4. cuda-modules/generic-builders/manifest: use hostTarget autoAddCudaCom…

    …patRunpathHook
    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    798c380 View commit details
    Browse the repository at this point in the history
  5. cuda-modules/cuda/overrides: introduce helper function and add commen…

    …ts about callPackage
    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    96cc899 View commit details
    Browse the repository at this point in the history
  6. cuda-modules/cuda/overrides: add TODOs for @ConnorBaker

    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    40aab07 View commit details
    Browse the repository at this point in the history
  7. cuda-modules: use hostPlatform when downloading binaries

    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    2057e24 View commit details
    Browse the repository at this point in the history
  8. cuda-modules/setup-hooks: switch to directory structure

    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    cd632d8 View commit details
    Browse the repository at this point in the history
  9. cuda-modules: always get *Platform from stdenv

    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    1aa56f0 View commit details
    Browse the repository at this point in the history
  10. cuda-modules/cuda/overrides: simplify callPackage then overrideAttrs …

    …pattern
    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    0fec676 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ddcfff0 View commit details
    Browse the repository at this point in the history
  12. cuda-modules: add check for duplicate/misordered outputs

    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    112d38b View commit details
    Browse the repository at this point in the history
  13. cuda-modules: update note on use of lndir from path

    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    49676c7 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    868fa52 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    2b351b2 View commit details
    Browse the repository at this point in the history
  16. cuda-modules/flags: use cudaAtLeast when possible

    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    0304c9b View commit details
    Browse the repository at this point in the history
  17. cuda-modules/flags: ignore platforms in throwIf in isJetsonBuild

    Since, even under cross-compilation, we evaluate this flag on multiple platforms, it makes more sense to move the platform check out of the throw condition
    and into the boolean return value. The alternative is to restrict all uses of this value to locations which gaurd evaluation so it does not occur when the
    host platform is still x86_64.
    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    5b65222 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    969ee2b View commit details
    Browse the repository at this point in the history
  19. cuda-modules/cuda/overrides: backendStdenv.cc is already part of nati…

    …veBuildInputs
    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    3b629a2 View commit details
    Browse the repository at this point in the history
  20. cuda-modules/cuda/overrides: specify spliced packages for cuda_nvcc p…

    …ostPatch phase
    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    e55a9c2 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    f85d321 View commit details
    Browse the repository at this point in the history
  22. cuda-modules/saxpy: remove CMAKE_VERBOSE_MAKEFILE

    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    2b6a5a9 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    77ea14b View commit details
    Browse the repository at this point in the history
  24. cuda-modules/setup-hooks/auto-add-cuda-compat-runpath-hook: collapse …

    …body like other setup hooks
    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    37d2448 View commit details
    Browse the repository at this point in the history
  25. cuda-modules/setup-hooks: wip rewrite and set NIX_DEBUG=1

    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    de0bb6a View commit details
    Browse the repository at this point in the history
  26. cudaPackages.cuda_nvcc: never has a lib output

    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    3297d6f View commit details
    Browse the repository at this point in the history
  27. cuda-modules/setup-hooks: wip

    Connor Baker committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    1ac7621 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2024

  1. cuda-modules/cuda/overrides: cuda_nvcc should not include references …

    …to cuda_cudart
    Connor Baker committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    a026c05 View commit details
    Browse the repository at this point in the history
  2. cudaPackages.nccl: remove unneeded makeFlags, specify splicing, and e…

    …nable structuredAttrs
    Connor Baker committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    b340c3f View commit details
    Browse the repository at this point in the history
  3. cuda-modules/generic-builders/manifest: cleanup

    Connor Baker committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    0fa534c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1f077ac View commit details
    Browse the repository at this point in the history
  5. cudaPackages.saxpy: getDev/getLib would not always select the desired…

    … output
    Connor Baker committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    3fc9e9b View commit details
    Browse the repository at this point in the history
  6. cuda-modules/setup-hooks/setup-cuda-hook: rewrite

    Connor Baker committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    7fced11 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b43bf06 View commit details
    Browse the repository at this point in the history