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

Cherrypicks for v1.8.x-aws #354

Merged
merged 3 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/distcheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: PR CI
on: [push, pull_request]
env:
APT_PACKAGES: >-
build-essential
clang
gcc
git
libhwloc-dev
make
jobs:
distcheck:
runs-on: ubuntu-22.04
strategy:
matrix:
cc:
- gcc
- clang
fail-fast: false
steps:
- name: Install Dependencies
run: |
sudo apt-get install -y ${{ env.APT_PACKAGES }}
- name: Install CUDA
run: |
sudo apt-get install -y nvidia-cuda-toolkit
- uses: actions/checkout@v4
- name: Build and Distribution Checks
run: |
set -x

# We're just doing distchecks, so it is fine if we
# just grab the latest master.
git clone --depth 1 https://github.com/ofiwg/libfabric.git
pushd libfabric
./autogen.sh
./configure --prefix=$PWD/install CC=${{ matrix.cc }}
make -j $(nproc)
make install
popd

# actions/checkout@v4 would drop the plugin source in $PWD,
# so go ahead and build it
./autogen.sh
./configure --with-libfabric=$PWD/libfabric/install --with-cuda=/usr/local/cuda/ CC=${{ matrix.cc }}
make -j $(nproc)

# Run Unit tests
make check

# Run dist tarball checks
make distcheck
- name: Upload build logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.cc }}-config.log
path: config.log
37 changes: 37 additions & 0 deletions src/nccl_ofi_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,51 @@ ncclDebugLogger_t ofi_log_function = NULL;

static ncclResult_t nccl_net_ofi_retval_translate(int retval)
{
/*
* This translates both ISO C errnos as well as libfabric errnos (up to
* FI_ERRNO_OFFSET they are synonymous).
*/
switch (retval) {
case 0:
return ncclSuccess;
break;
case -EINVAL:
/*
* Per ext-net docs, invalid arguments to plugin calls should
* return ncclInternalError. Although a ncclInvalidArgument is defined,
* it is suggested that ext-net plugins not pass these up and
* leave NCCL API argument validation to NCCL.
*/
return ncclInternalError;
break;
case -EMSGSIZE:
/*
* TODO: Per ext-net docs, this aligns with ncclInvalidUsage,
* which is also defined in NCCL source, but for some reason
* that error type is not available in err.h that we pull from
* ext-net headers upstream. This needs to be fixed once the
* ext-net header gets fixed to include ncclInvalidUsage.
*/
return ncclInvalidArgument;
break;
case -ECONNABORTED:
case -ECONNRESET:
case -ECONNREFUSED:
case -ENOTCONN:
case -EHOSTDOWN:
case -EHOSTUNREACH:
/*
* Pass up ncclRemoteError (introduced in NCCL 2.13.4, but
* missing in ext-net documentation) for any unrecoverable peer
* reachability errors.
*/
return ncclRemoteError;
break;
default:
/*
* Catch-all for other errors, including lifabric-specific error
* codes.
*/
return ncclSystemError;
break;
}
Expand Down
Loading