MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / gather_sources

Function gather_sources

scripts/generate_build_files.py:206–287  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

204
205
206def gather_sources():
207
208 # Source file list
209 with open("filelist.json") as fp:
210 filelist = json.load(fp)
211
212 # Common backend files
213 lib_files = filelist['common']
214
215 # Logging files
216 lib_files += filelist['logging']
217
218 # C API files
219 lib_files += filelist['c_api']['common']
220 lib_files += filelist['c_api']['operators']
221
222 # Scheduler infrastructure
223 lib_files += filelist['scheduler']['single']
224 # Add both cppthreads and omp sources for now
225 lib_files += filelist['scheduler']['threads']
226 lib_files += filelist['scheduler']['omp']
227
228 # Graph files
229 graph_files = glob.glob('src/graph/*.cpp')
230 graph_files += glob.glob('src/graph/*/*.cpp')
231
232 lib_files_sve = []
233 lib_files_sve2 = []
234
235 # -------------------------------------
236 # NEON files
237 lib_files += filelist['cpu']['common']
238 simd = ['neon', 'sve', 'sve2']
239
240 # Get attributes
241 data_types = ["qasymm8", "qasymm8_signed", "qsymm16", "fp16", "fp32", "integer"]
242 data_layouts = ["nhwc", "nchw"]
243 fixed_format_kernels = ["fixed_format_kernels"]
244 attrs = data_types + data_layouts + fixed_format_kernels + ["estate64"]
245
246 # Setup data-type and data-layout files to include
247 cpu_operators = filelist['cpu']['operators'].keys()
248 cpu_ops_to_build = resolve_operator_dependencies(filelist, cpu_operators, 'cpu')
249
250 # We need to build fp16 files for armv8.2-a+fp16 so we filter them out of cpu_files removing the attribute fp16
251 attrs.remove('fp16')
252 cpu_files = get_operator_backend_files(filelist, cpu_ops_to_build, 'cpu', simd, attrs)
253
254 # Get all the fp16 files
255 fp16_cpu_files = get_operator_backend_files(filelist, cpu_ops_to_build, 'cpu', simd, ['fp16'], False)
256
257 # Shared among ALL CPU files
258 lib_files += cpu_files.get('common', [])
259
260 # Arm® Neon™ specific files
261 lib_files += cpu_files.get('neon', [])
262
263 # FP16 Arm® Neon™ specific files

Callers 1

Calls 6

strip_prefixFunction · 0.85
loadMethod · 0.80
removeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected