-
Notifications
You must be signed in to change notification settings - Fork 0
/
gcuxt.spec.in
131 lines (101 loc) · 2.91 KB
/
gcuxt.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
%{!?configure_options: %global configure_options %{nil}}
%bcond_with cuda
%bcond_with rocm
%bcond_with cncl
Name: gucxt
Version: @VERSION@
Release: 1%{?dist}%{?debug:.debug}
Summary: GUCXT
Group: System Environment/Libraries
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Prefix: %{_prefix}
# GUCXT currently supports only the following architectures
ExclusiveArch: aarch64 ppc64le x86_64
%if %{defined extra_deps}
Requires: %{?extra_deps}
%endif
BuildRequires: automake autoconf libtool gcc-c++
%if %{with rocm}
BuildRequires: hsa-rocr-dev
%if %{with cncl}
BuildRequires:
%endif
%description
%package devel
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: Header files required for developing with GUCXT
Group: Development/Libraries
%description devel
Provides header files and examples for developing with GUCXT.
%prep
%setup -q
%build
%define _with_arg() %{expand:%%{?with_%{1}:--with-%{2}}%%{!?with_%{1}:--without-%{2}}}
%define _enable_arg() %{expand:%%{?with_%{1}:--enable-%{2}}%%{!?with_%{1}:--disable-%{2}}}
%configure --disable-optimizations \
%{!?debug:--disable-logging} \
%{!?debug:--disable-debug} \
%{!?debug:--disable-assertions} \
%{!?debug:--disable-params-check} \
%{?debug:--enable-profiling} \
%_with_arg cuda cuda \
%_with_arg rocm rocm \
%_with_arg cncl cncl \
%{?configure_options}
make %{?_smp_mflags} V=1
%install
make DESTDIR=%{buildroot} install
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/gucxt/*.la
rm -f %{buildroot}%{_libdir}/gucxt/lib*.so
%files
%{_libdir}/lib*.so.*
%{_bindir}/gucxt_info
%{_datadir}/gucxt
%doc README AUTHORS NEWS
%{!?_licensedir:%global license %%doc}
%license LICENSE
%files devel
%{_includedir}/guc*
%{_libdir}/lib*.so
%post
/sbin/ldconfig
%postun -p /sbin/ldconfig
%package static
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: Static libraries required for developing with GUCXT
Group: Development/Libraries
%description static
Provides static libraries required for developing with GUCXT.
%files static
%{_libdir}/lib*.a
%{_libdir}/gucxt/lib*.a
%if %{with cuda}
%package cuda
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: CUDA support
Group: System Environment/Libraries
%description cuda
Provide CUDA (NVIDIA GPU) support for UCX.
%files cuda
%{_libdir}/gucxt/libgmem_cuda.so.*
%endif
%if %{with rocm}
%package rocm
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: ROCm GPU support
Group: System Environment/Libraries
%description rocm
Provides Radeon Open Compute (ROCm) Runtime support for GUCXT.
%files rocm
%{_libdir}/ucx/libgmem_rocm.so.*
%if %{with cncl}
%package cncl
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: CNCL GPU support
Group: System Environment/Libraries
%description gucxt
Provides CNCL support for GUCXT.
%files gucxt
%{_libdir}/ucx/libgmem_cncl.so.*
%changelog