MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / simd_width

Method simd_width

op_builder/cpu/reflow.py:20–27  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

18 return flags
19
20 def simd_width(self):
21 width = super().simd_width()
22 if width == '-D__AVX512__':
23 flags = self._cpu_flags()
24 required = {'avx512f', 'avx512bw', 'avx512dq', 'avx512vl'}
25 if not required.issubset(flags):
26 return '-D__AVX256__' if {'avx2', 'fma', 'f16c'}.issubset(flags) else '-D__SCALAR__'
27 return width
28
29 def is_compatible(self, verbose=False):
30 try:

Callers 7

is_compatibleMethod · 0.95
cxx_argsMethod · 0.45
cxx_argsMethod · 0.45
cxx_argsMethod · 0.45
cxx_argsMethod · 0.45
cxx_argsMethod · 0.45
cxx_argsMethod · 0.45

Calls 1

_cpu_flagsMethod · 0.95

Tested by

no test coverage detected