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

feat: add nix build definitions #745

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aws-nslick
Copy link
Contributor

@aws-nslick aws-nslick commented Dec 9, 2024

Issue #, if available:

Description of changes:

This adds a nix flake for aws-ofi-nccl.

Usage:

  1. To use the development shell, install direnv then create .envrc with contents:
watch_file nix/shell.nix
use_flake . --impure

This will create a .clangd file which can be used for IDE-like features atop clangd. Individual editor configuration varies. Example emacs configuration using doom emacs:

(use-package! eglot
  :config
  (add-to-list 'eglot-server-programs
               `((c-mode c-ts-mode c++-mode c++-ts-mode objc-mode)
                 . ("clangd"
                    "-j=8"
                    "-background-index-priority=normal"
                    "--enable-config"
                    "--all-scopes-completion"
                    "--header-insertion=iwyu"
                    "--header-insertion-decorators"
                    "--log=verbose"
                    "--clang-tidy"
                    "--background-index"
                    "--malloc-trim"
                    "--completion-style=detailed"
                    "--import-insertions"
                    "--pch-storage=memory"
                    "--function-arg-placeholders=1"))))
  1. To build aws-ofi-nccl, libfabric, openmpi, etc.: nix build .#default.

  2. To build wrappers for nccl-tests that run atop ubuntu, run: nix build .#ubuntu-test-runners. ./result/bin/ will contain shell scripts that LD_PRELOAD nvidia libraries from ubuntu expected locations, then forwards args to the nccl-test in question.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@aws-nslick aws-nslick requested a review from a team as a code owner December 9, 2024 23:02
@aws-nslick aws-nslick force-pushed the nix-for-master branch 3 times, most recently from 6bca13b to bdfd488 Compare December 12, 2024 17:14
Copy link
Contributor

@bwbarrett bwbarrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nix isn't really my thing, but I have no objection to most of this patch (other than the Libfabric patch I called out below). Other than that, I'm not sure it's a competent review, but I'd be fine approving.

nix/overlays/libfabric/0001-cuda-dlopen-correctly.patch Outdated Show resolved Hide resolved
Signed-off-by: Nicholas Sielicki <[email protected]>
@aws-nslick
Copy link
Contributor Author

@ConnorBaker if you have any free time, any comments or criticisms are much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants