Skip to content

Commit ee9a8df

Browse files
committed
UCT: Added Intel Gaudi GDR support for UCX and fixed the codes based on all the comments
UCS: Added Intel gaudi topolody for gaudi devices
1 parent 7910cb9 commit ee9a8df

File tree

21 files changed

+2739
-2
lines changed

21 files changed

+2739
-2
lines changed

AUTHORS

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ Artem Ryabov <[email protected]>
1515
Artemy Kovalyov <[email protected]>
1616
Arun Chandran <[email protected]>
1717
Aurelien Bouteiller <[email protected]>
18+
Benson Muite <[email protected]>
1819
1920
Boris Karasev <[email protected]>
2021
Brad Benton <[email protected]>
22+
Brian Sheng <[email protected]>
23+
Bruno Faccini <[email protected]>
2124
Changcheng Liu <[email protected]>
2225
Colin Hirsch <[email protected]>
2326
Corey J. Nolet <[email protected]>
@@ -29,17 +32,20 @@ Dmitrii Gabor <[email protected]>
2932
Dmitry Gladkov <[email protected]>
3033
Doug Jacobsen <[email protected]>
3134
Edgar Gabriel <[email protected]>
35+
Elad Guttel <[email protected]>
3236
Elad Persiko <[email protected]>
3337
Eugene Voronov <[email protected]>
3438
Evgeny Leksikov <[email protected]>
3539
Fabian Ruhland <[email protected]>
40+
Felix Abecassis <[email protected]>
3641
Gilbert Lee <[email protected]>
3742
Gilles Gouaillardet <[email protected]>
3843
Gonzalo Brito Gadeschi <[email protected]>
3944
Graham Lopez <[email protected]>
4045
Guy Shattah <[email protected]>
4146
Hessam Mirsadeghi <[email protected]>
4247
Hiroyuki Sato <[email protected]>
48+
Honggang Li <[email protected]>
4349
Howard Pritchard <[email protected]>
4450
Huaxiang Fan <[email protected]>
4551
@@ -48,13 +54,16 @@ Ilia Yastrebov <[email protected]>
4854
Ilya Nelkenbaum <[email protected]>
4955
Itay Alroy <[email protected]>
5056
Ivan Kochin <[email protected]>
57+
JKLiang9714 <[email protected]>
5158
Jakir Kham <[email protected]>
59+
Jan Ciesko <[email protected]>
5260
Jason Gunthorpe <[email protected]>
5361
Jeff Daily <[email protected]>
5462
Jianxin Xiong <[email protected]>
5563
John Snyder <[email protected]>
5664
Jonas Zhou <[email protected]>
5765
Joseph Schuchart <[email protected]>
66+
Kaidrikov Evgeny <[email protected]>
5867
Keisuke Fukuda <[email protected]>
5968
Ken Raffenetti <[email protected]>
6069
Khaled Hamidouche <[email protected]>
@@ -66,33 +75,40 @@ Manjunath Gorentla Venkata <[email protected]>
6675
Marek Schimara <[email protected]>
6776
Mark Allen <[email protected]>
6877
Matthew Baker <[email protected]>
78+
Matthias Diener <[email protected]>
6979
Michael Braverman <[email protected]>
7080
Michal Shalev <[email protected]>
7181
Mike Dubman <[email protected]>
7282
Mikhail Brinskii <[email protected]>
83+
Mikhail Brinskiy <[email protected]>
7384
7485
Nathan Hjelm <[email protected]>
7586
Netanel Yosephian <[email protected]>
87+
Nysal Jan K.A <[email protected]>
7688
Ofir Farjon <[email protected]>
7789
Olly Perks <[email protected]>
7890
Ovidiu Mara <[email protected]>
7991
92+
Pasha (Pavel) Shamis <[email protected]>
8093
Pavan Balaji <[email protected]>
8194
Pavel Shamis (Pasha) <[email protected]>
8295
Peter Andreas Entschev <[email protected]>
8396
Peter Rudenko <[email protected]>
8497
Peter-Jan Gootzen <[email protected]>
8598
8699
Raul Akhmetshin <[email protected]>
100+
Rob Bradford <[email protected]>
87101
Robert Dietrich <[email protected]>
88102
Rohit Zambre <[email protected]>
89103
Roie Danino <[email protected]>
90104
Romain Pereira <[email protected]>
91105
Sam James <[email protected]>
106+
Saravanan Vajravel <[email protected]>
92107
Sasha Kotchubievsky <[email protected]>
93108
Scott Saulters <[email protected]>
94109
Sergey Lebedev <[email protected]>
95110
Sergey Oblomov <[email protected]>
111+
96112
Sergey Shalnov <[email protected]>
97113
Serguei Sagalovitch <[email protected]>
98114
Shachar Hasson <[email protected]>
@@ -104,17 +120,32 @@ Stephen Richmond <[email protected]>
104120
Swen Boehm <[email protected]>
105121
Thomas Vegas <[email protected]>
106122
Tony Curtis <[email protected]>
123+
Tooraj Taraz <[email protected]>
107124
Tzafrir Cohen <[email protected]>
108125
Valentin Petrov <[email protected]>
126+
Vasily Philipov <[email protected]>
109127
Wenbin Lu <[email protected]>
128+
Xiang Gao <[email protected]>
110129
111130
Xu Yifeng <[email protected]>
112131
Yiltan Hassan Temucin <[email protected]>
113132
Yossi Itigin <[email protected]>
114133
Yuriy Shestakov <[email protected]>
134+
Zhongkai Zhang <[email protected]>
115135
Zhu Yanjun <[email protected]>
116136
Zihao Zhao <[email protected]>
137+
akolliasAMD <[email protected]>
138+
akshay-venkatesh <[email protected]>
139+
140+
141+
esoha-nvidia <[email protected]>
142+
117143
144+
nileshnegi <[email protected]>
145+
panda1100 <[email protected]>
146+
razor1991 <[email protected]>
147+
148+
118149

119150
In addition we would like to acknowledge the following members of UCX community
120151
for their participation in annual face-to-face meeting, design discussions, and

config/m4/gaudi.m4

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#
2+
# Copyright (c) Intel Corporation, 2025. ALL RIGHTS RESERVED.
3+
# See file LICENSE for terms.
4+
#
5+
6+
AC_DEFUN([UCX_CHECK_GAUDI],[
7+
8+
AS_IF([test "x$gaudi_checked" != "xyes"],
9+
[
10+
AC_ARG_WITH([gaudi],
11+
[AS_HELP_STRING([--with-gaudi=(DIR)], [Enable the use of GAUDI (default is guess).])],
12+
[], [with_gaudi=guess])
13+
14+
AS_IF([test "x$with_gaudi" = "xno"],
15+
[
16+
gaudi_happy="no"
17+
],
18+
[
19+
save_CPPFLAGS="$CPPFLAGS"
20+
save_LDFLAGS="$LDFLAGS"
21+
save_LIBS="$LIBS"
22+
23+
GAUDI_CPPFLAGS=""
24+
GAUDI_LDFLAGS=""
25+
GAUDI_LIBS=""
26+
27+
AS_IF([test ! -z "$with_gaudi" -a "x$with_gaudi" != "xyes" -a "x$with_gaudi" != "xguess"],
28+
[ucx_check_gaudi_dir="$with_gaudi"
29+
ucx_check_gaudi_libdir="$with_gaudi/lib/habanalabs"
30+
GAUDI_CPPFLAGS="-I$with_gaudi/include/habanalabs -I/usr/include/drm -I/usr/include/libdrm"
31+
GAUDI_LDFLAGS="-L$ucx_check_gaudi_libdir"],
32+
[GAUDI_CPPFLAGS="-I/usr/include/habanalabs -I/usr/include/drm -I/usr/include/libdrm"
33+
GAUDI_LDFLAGS="-L/usr/lib/habanalabs"])
34+
35+
AS_IF([test ! -z "$with_gaudi_libdir" -a "x$with_gaudi_libdir" != "xyes"],
36+
[ucx_check_gaudi_libdir="$with_gaudi_libdir"
37+
GAUDI_LDFLAGS="-L$ucx_check_gaudi_libdir"])
38+
39+
CPPFLAGS="$CPPFLAGS $GAUDI_CPPFLAGS"
40+
LDFLAGS="$LDFLAGS $GAUDI_LDFLAGS"
41+
42+
# Check gaudi header files
43+
AC_CHECK_HEADERS([hlthunk.h],
44+
[gaudi_happy="yes"], [gaudi_happy="no"])
45+
46+
# Check gaudi libraries
47+
AS_IF([test "x$gaudi_happy" = "xyes"],
48+
[AC_CHECK_LIB([hl-thunk], [hlthunk_open],
49+
[GAUDI_LIBS="$GAUDI_LIBS -lhl-thunk -lscal -lSynapse -lSynapseMme"], [gaudi_happy="no"])])
50+
51+
CPPFLAGS="$save_CPPFLAGS"
52+
LDFLAGS="$save_LDFLAGS"
53+
LIBS="$save_LIBS"
54+
55+
AS_IF([test "x$gaudi_happy" = "xyes"],
56+
[AC_SUBST([GAUDI_CPPFLAGS], ["$GAUDI_CPPFLAGS"])
57+
AC_SUBST([GAUDI_LDFLAGS], ["$GAUDI_LDFLAGS"])
58+
AC_SUBST([GAUDI_LIBS], ["$GAUDI_LIBS"])
59+
AC_DEFINE([HAVE_GAUDI], 1, [Enable GAUDI support])],
60+
[AS_IF([test "x$with_gaudi" != "xguess"],
61+
[AC_MSG_ERROR([GAUDI support is requested but gaudi packages cannot be found])],
62+
[AC_MSG_WARN([GAUDI not found])])])
63+
64+
]) # "x$with_gaudi" = "xno"
65+
66+
gaudi_checked=yes
67+
AM_CONDITIONAL([HAVE_GAUDI], [test "x$gaudi_happy" != xno])
68+
69+
]) # "x$gaudi_checked" != "xyes"
70+
71+
]) # UCX_CHECK_GAUDI

debian/ucx-gaudi.install

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
usr/lib/ucx/libucx_perftest_gaudi.*
2+
usr/lib/ucx/libuct_gaudi.*

src/ucs/Makefile.am

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ nobase_dist_libucs_la_HEADERS = \
9090
arch/rv64/global_opts.h \
9191
arch/global_opts.h
9292

93+
if HAVE_GAUDI
94+
nobase_dist_libucs_la_HEADERS += \
95+
sys/topo/gaudi/topo.h
96+
endif
97+
9398
noinst_HEADERS = \
9499
arch/aarch64/cpu.h \
95100
arch/generic/cpu.h \
@@ -220,9 +225,14 @@ libucs_la_SOURCES = \
220225
vfs/base/vfs_obj.c \
221226
vfs/base/vfs_cb.c
222227

228+
if HAVE_GAUDI
229+
libucs_la_SOURCES += \
230+
sys/topo/gaudi/topo.c
231+
endif
232+
223233
if HAVE_AARCH64_THUNDERX2
224234
libucs_la_SOURCES += \
225-
arch/aarch64/memcpy_thunderx2.S
235+
arch/aarch64/memcpy_thunderx2.S
226236
endif
227237

228238
if HAVE_STATS

src/ucs/memory/memory_type.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const char *ucs_memory_type_names[] = {
2424
[UCS_MEMORY_TYPE_ZE_HOST] = "ze-host",
2525
[UCS_MEMORY_TYPE_ZE_DEVICE] = "ze-device",
2626
[UCS_MEMORY_TYPE_ZE_MANAGED] = "ze-managed",
27+
[UCS_MEMORY_TYPE_GAUDI] = "gaudi",
2728
[UCS_MEMORY_TYPE_LAST] = "unknown",
2829
[UCS_MEMORY_TYPE_LAST + 1] = NULL
2930
};
@@ -38,5 +39,6 @@ const char *ucs_memory_type_descs[] = {
3839
[UCS_MEMORY_TYPE_ZE_HOST] = "Intel/Ze USM host memory",
3940
[UCS_MEMORY_TYPE_ZE_DEVICE] = "Intel/Ze GPU memory",
4041
[UCS_MEMORY_TYPE_ZE_MANAGED] = "Intel/Ze GPU managed memory",
42+
[UCS_MEMORY_TYPE_GAUDI] = "HabanaLabs Gaudi memory",
4143
[UCS_MEMORY_TYPE_LAST] = "unknown"
4244
};

src/ucs/memory/memory_type.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ typedef enum ucs_memory_type {
4545
UCS_MEMORY_TYPE_ZE_HOST, /**< Intel ZE memory (USM host) */
4646
UCS_MEMORY_TYPE_ZE_DEVICE, /**< Intel ZE memory (USM device) */
4747
UCS_MEMORY_TYPE_ZE_MANAGED, /**< Intel ZE managed memory (USM shared) */
48+
UCS_MEMORY_TYPE_GAUDI, /**< HabanaLabs Gaudi memory */
4849
UCS_MEMORY_TYPE_LAST,
4950
UCS_MEMORY_TYPE_UNKNOWN = UCS_MEMORY_TYPE_LAST
5051
} ucs_memory_type_t;

0 commit comments

Comments
 (0)