@@ -148,6 +148,7 @@ FLAGCX_DEVICE_INLINE_DECORATOR typename packed_t<T, ByteSize>::array_type
148148multimem_sum (T* addr) {
149149 using P = packed_t <T, ByteSize>;
150150 typename P::array_type ret;
151+ #if __CUDA_ARCH__ >= 900
151152 if constexpr (std::is_same<T, nv_bfloat16>::value) {
152153 typename P::storage_t h;
153154 asm volatile (
@@ -177,6 +178,7 @@ multimem_sum(T* addr) {
177178 : " l" (addr)
178179 : " memory" );
179180 }
181+ #endif
180182 return ret;
181183}
182184
@@ -188,6 +190,7 @@ multimem_min(T* addr) {
188190 " multimem min only supports half and bfloat16" );
189191 using P = packed_t <T, ByteSize>;
190192 typename P::array_type ret;
193+ #if __CUDA_ARCH__ >= 900
191194 if constexpr (std::is_same<T, nv_bfloat16>::value) {
192195 typename P::storage_t h;
193196 asm volatile (
@@ -205,6 +208,7 @@ multimem_min(T* addr) {
205208 : " memory" );
206209 unpack<T, ByteSize>(h, ret.data );
207210 }
211+ #endif
208212 return ret;
209213}
210214
@@ -216,6 +220,7 @@ multimem_max(T* addr) {
216220 " multimem max only supports half and bfloat16" );
217221 using P = packed_t <T, ByteSize>;
218222 typename P::array_type ret;
223+ #if __CUDA_ARCH__ >= 900
219224 if constexpr (std::is_same<T, nv_bfloat16>::value) {
220225 typename P::storage_t h;
221226 asm volatile (
@@ -233,6 +238,7 @@ multimem_max(T* addr) {
233238 : " memory" );
234239 unpack<T, ByteSize>(h, ret.data );
235240 }
241+ #endif
236242 return ret;
237243}
238244
@@ -264,6 +270,7 @@ multimem_reduce(T* addr, ncclRedOp_t op) {
264270template <typename T, int ByteSize = (sizeof (T) <= 4 ? 4 : 8 )>
265271FLAGCX_DEVICE_INLINE_DECORATOR void
266272multimem_st (T* addr, typename packed_t <T, ByteSize>::array_type val) {
273+ #if __CUDA_ARCH__ >= 900
267274 using P = packed_t <T, ByteSize>;
268275 if constexpr (std::is_same<T, nv_bfloat16>::value) {
269276 typename P::storage_t h = pack<T, ByteSize>(val.data );
@@ -292,6 +299,7 @@ multimem_st(T* addr, typename packed_t<T, ByteSize>::array_type val) {
292299 : " l" (addr), " d" (val.data [0 ])
293300 : " memory" );
294301 }
302+ #endif
295303}
296304
297305// Store to local/shared memory using vectorized store
0 commit comments