Skip to content

Commit 28c7ef9

Browse files
committed
update efa install script
Signed-off-by: Junpu Fan <junpu@amazon.com>
1 parent 4ff3bc1 commit 28c7ef9

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

scripts/common/install_efa.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,26 @@ case $ARCH in
1717
esac
1818

1919
function check_libnccl_net_so {
20-
OFI_LIB_DIR="/opt/amazon/ofi-nccl/lib/${ARCH_DIR}"
21-
NCCL_NET_SO="$OFI_LIB_DIR/libnccl-net.so"
20+
21+
if [[ "$EFA_VERSION" > "1.44.0" ]] || [[ "$EFA_VERSION" == "1.44.0" ]]; then # version threshold
22+
# Newer EFA version - no ARCH_DIR, different filename
23+
OFI_LIB_DIR="/opt/amazon/ofi-nccl/lib/"
24+
NCCL_NET_SO="$OFI_LIB_DIR/libnccl-net-ofi.so"
25+
echo "Using newer EFA path structure"
26+
else
27+
# Older EFA version - uses ARCH_DIR
28+
OFI_LIB_DIR="/opt/amazon/ofi-nccl/lib/${ARCH_DIR}"
29+
NCCL_NET_SO="$OFI_LIB_DIR/libnccl-net.so"
30+
echo "Using older EFA path structure with ARCH_DIR: $ARCH_DIR"
31+
fi
2232

2333
# Check if file exists
2434
if [ ! -f "$NCCL_NET_SO" ]; then
2535
echo "ERROR: $NCCL_NET_SO does not exist"
2636
return 1
37+
else
38+
echo "NCCL OFI plugin found at: $NCCL_NET_SO"
39+
return 0
2740
fi
2841
}
2942

@@ -100,3 +113,4 @@ do
100113
esac
101114
shift
102115
done
116+

0 commit comments

Comments
 (0)