Skip to content

Commit

Permalink
TL/SHARP: fix assert check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei-Lebedev committed Dec 5, 2022
1 parent e21e8cd commit 3402a53
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/clang-tidy-nvidia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on: [push, pull_request]

env:
OPEN_UCX_LINK: https://github.com/openucx/ucx
HPCX_LINK: http://content.mellanox.com/hpc/hpc-x/v2.13/hpcx-v2.13-gcc-MLNX_OFED_LINUX-5-ubuntu20.04-cuda11-gdrcopy2-nccl2.12-x86_64.tbz
SHARP_DIR: /tmp/
OPEN_UCX_BRANCH: master
CLANG_VER: 12
CUDA_VER: 11-4
Expand All @@ -15,6 +17,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends wget lsb-core software-properties-common
sudo apt-get install -y --no-install-recommends libibverbs-dev rdma-core rdmacm-utils libibumad-dev
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key| sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${CLANG_VER} main"
sudo apt-get install -y --no-install-recommends doxygen doxygen-latex clang-tidy-${CLANG_VER} bear
Expand All @@ -31,11 +34,17 @@ jobs:
cd /tmp/ucx && ./autogen.sh
CC=clang-${CLANG_VER} CXX=clang++-${CLANG_VER} ./contrib/configure-release --without-java --without-go --disable-numa --prefix $PWD/install
make -j install
- name: Download HPCX
run: |
cd /tmp
wget ${HPCX_LINK}
tar xjf hpcx-v2.13-gcc-MLNX_OFED_LINUX-5-ubuntu20.04-cuda11-gdrcopy2-nccl2.12-x86_64.tbz
mv hpcx-v2.13-gcc-MLNX_OFED_LINUX-5-ubuntu20.04-cuda11-gdrcopy2-nccl2.12-x86_64 hpcx
- uses: actions/checkout@v1
- name: Build UCC
run: |
./autogen.sh
CC=clang-${CLANG_VER} CXX=clang++-${CLANG_VER} ./configure --prefix=/tmp/ucc/install --with-ucx=/tmp/ucx/install --with-cuda=/usr/local/cuda --with-nvcc-gencode="-gencode=arch=compute_80,code=sm_80" --enable-assert
LDFLAGS="-L/tmp/ucx/install/lib/ -lucp -luct -lucs -lucm" CC=clang-${CLANG_VER} CXX=clang++-${CLANG_VER} ./configure --with-sharp=/tmp/hpcx/sharp --prefix=/tmp/ucc/install --with-ucx=/tmp/ucx/install --with-cuda=/usr/local/cuda --with-nvcc-gencode="-gencode=arch=compute_80,code=sm_80" --enable-assert
bear --exclude ${GITHUB_WORKSPACE}/src/components/ec/cuda/kernel/ --exclude ${GITHUB_WORKSPACE}/src/components/mc/cuda/kernel/ --cdb /tmp/compile_commands.json make
- name: Run clang-tidy
run: |
Expand Down
6 changes: 3 additions & 3 deletions src/components/tl/sharp/tl_sharp_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static int ucc_tl_sharp_oob_barrier(void *arg)
status = oob_coll->allgather(&sbuf, rbuf, sizeof(char),
oob_coll->coll_info, &req);
if (UCC_OK == status) {
ucc_assert(req);
ucc_assert(req != NULL);
while (UCC_OK != (status = oob_coll->req_test(req))) {
if (status < 0) {
tl_error(ctx->super.super.lib, "failed to test oob req");
Expand Down Expand Up @@ -66,7 +66,7 @@ static int ucc_tl_sharp_oob_gather(void *arg, int root, void *sbuf,

status = oob_coll->allgather(sbuf, rbuf, msg_size, oob_coll->coll_info, &req);
if (UCC_OK == status) {
ucc_assert(req);
ucc_assert(req != NULL);
while (UCC_OK != (status = oob_coll->req_test(req))) {
if (status < 0) {
tl_error(ctx->super.super.lib, "failed to test oob req");
Expand Down Expand Up @@ -103,7 +103,7 @@ static int ucc_tl_sharp_oob_bcast(void *arg, void *buf, int size, int root)
status = oob_coll->allgather(buf, tmp_rbuf, msg_size, oob_coll ->coll_info,
&req);
if (UCC_OK == status) {
ucc_assert(req);
ucc_assert(req != NULL);
while (UCC_OK != (status = oob_coll ->req_test(req))) {
if (status < 0) {
tl_error(ctx->super.super.lib, "failed to test oob req");
Expand Down

0 comments on commit 3402a53

Please sign in to comment.