BUILD.gn 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819
  1. # Copyright 2022 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  5. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  6. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  7. #
  8. # THIS FILE IS AUTO-GENERATED. DO NOT EDIT.
  9. #
  10. # See //third_party/xnnpack/generate_build_gn.py
  11. #
  12. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  13. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  14. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  15. config("xnnpack_config") {
  16. include_dirs = [
  17. "src/deps/clog/include",
  18. "src/include",
  19. "src/src",
  20. ]
  21. cflags = [ "-Wno-unused-function" ]
  22. defines = [
  23. # Don't enable this without first talking to Chrome Security!
  24. # XNNPACK runs in the browser process. The hardening and fuzzing needed
  25. # to ensure JIT can be used safely is not in place yet.
  26. "XNN_ENABLE_JIT=0",
  27. "XNN_ENABLE_ASSEMBLY=1",
  28. "XNN_ENABLE_GEMM_M_SPECIALIZATION=1",
  29. "XNN_ENABLE_MEMOPT=1",
  30. "XNN_ENABLE_SPARSE=1",
  31. "XNN_LOG_LEVEL=0",
  32. "XNN_LOG_TO_STDIO=0",
  33. ]
  34. }
  35. source_set("xnnpack") {
  36. public = [ "src/include/xnnpack.h" ]
  37. configs -= [ "//build/config/compiler:chromium_code" ]
  38. configs += [ "//build/config/compiler:no_chromium_code" ]
  39. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  40. sources = [
  41. "src/src/allocator.c",
  42. "src/src/cache.c",
  43. "src/src/datatype-strings.c",
  44. "src/src/indirection.c",
  45. "src/src/init.c",
  46. "src/src/log.c",
  47. "src/src/memory-planner.c",
  48. "src/src/memory.c",
  49. "src/src/microparams-init.c",
  50. "src/src/mutex.c",
  51. "src/src/node-type.c",
  52. "src/src/normalization.c",
  53. "src/src/operator-delete.c",
  54. "src/src/operator-run.c",
  55. "src/src/operator-strings.c",
  56. "src/src/operator-utils.c",
  57. "src/src/packing.c",
  58. "src/src/params.c",
  59. "src/src/runtime.c",
  60. "src/src/subgraph.c",
  61. "src/src/tensor.c",
  62. "src/src/ukernel-strings.c",
  63. ]
  64. deps = [
  65. ":amalgam_avx",
  66. ":amalgam_avx512f",
  67. ":amalgam_avx512f-avx512cd-avx512bw-avx512dq-avx512vl",
  68. ":amalgam_f16c",
  69. ":amalgam_f16c-fma",
  70. ":amalgam_f16c-fma-avx2",
  71. ":amalgam_sse2",
  72. ":amalgam_sse4.1",
  73. ":amalgam_ssse3",
  74. ":jit",
  75. ":operators",
  76. ":qc8-dwconv_xop",
  77. ":qc8-gemm_xop",
  78. ":qc8-igemm_xop",
  79. ":qs8-dwconv_xop",
  80. ":qs8-gemm_xop",
  81. ":qs8-igemm_xop",
  82. ":qs8-vadd_xop",
  83. ":qs8-vaddc_xop",
  84. ":qu8-dwconv_xop",
  85. ":qu8-gemm_xop",
  86. ":qu8-igemm_xop",
  87. ":qu8-vadd_xop",
  88. ":qu8-vaddc_xop",
  89. ":subgraph",
  90. ":tables",
  91. ":u8-lut32norm",
  92. ":x32-depthtospace2d-chw2hwc",
  93. ":x8-lut",
  94. ":xx-copy",
  95. ":xx-transpose",
  96. "//third_party/cpuinfo",
  97. "//third_party/fp16",
  98. "//third_party/fxdiv",
  99. "//third_party/pthreadpool",
  100. ]
  101. public_configs = [ ":xnnpack_config" ]
  102. }
  103. source_set("amalgam_avx") {
  104. cflags = [ "-mavx" ]
  105. sources = [ "src/src/amalgam/avx.c" ]
  106. configs -= [ "//build/config/compiler:chromium_code" ]
  107. configs += [ "//build/config/compiler:no_chromium_code" ]
  108. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  109. deps = [
  110. "//third_party/cpuinfo",
  111. "//third_party/fp16",
  112. "//third_party/fxdiv",
  113. "//third_party/pthreadpool",
  114. ]
  115. public_configs = [ ":xnnpack_config" ]
  116. }
  117. source_set("amalgam_avx512f") {
  118. cflags = [ "-mavx512f" ]
  119. sources = [ "src/src/amalgam/avx512f.c" ]
  120. configs -= [ "//build/config/compiler:chromium_code" ]
  121. configs += [ "//build/config/compiler:no_chromium_code" ]
  122. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  123. deps = [
  124. "//third_party/cpuinfo",
  125. "//third_party/fp16",
  126. "//third_party/fxdiv",
  127. "//third_party/pthreadpool",
  128. ]
  129. public_configs = [ ":xnnpack_config" ]
  130. }
  131. source_set("amalgam_avx512f-avx512cd-avx512bw-avx512dq-avx512vl") {
  132. cflags = [
  133. "-mavx512bw",
  134. "-mavx512cd",
  135. "-mavx512dq",
  136. "-mavx512f",
  137. "-mavx512vl",
  138. ]
  139. sources = [ "src/src/amalgam/avx512skx.c" ]
  140. configs -= [ "//build/config/compiler:chromium_code" ]
  141. configs += [ "//build/config/compiler:no_chromium_code" ]
  142. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  143. deps = [
  144. "//third_party/cpuinfo",
  145. "//third_party/fp16",
  146. "//third_party/fxdiv",
  147. "//third_party/pthreadpool",
  148. ]
  149. public_configs = [ ":xnnpack_config" ]
  150. }
  151. source_set("amalgam_f16c") {
  152. cflags = [ "-mf16c" ]
  153. sources = [ "src/src/amalgam/f16c.c" ]
  154. configs -= [ "//build/config/compiler:chromium_code" ]
  155. configs += [ "//build/config/compiler:no_chromium_code" ]
  156. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  157. deps = [
  158. "//third_party/cpuinfo",
  159. "//third_party/fp16",
  160. "//third_party/fxdiv",
  161. "//third_party/pthreadpool",
  162. ]
  163. public_configs = [ ":xnnpack_config" ]
  164. }
  165. source_set("amalgam_f16c-fma") {
  166. cflags = [
  167. "-mf16c",
  168. "-mfma",
  169. ]
  170. sources = [ "src/src/amalgam/fma3.c" ]
  171. configs -= [ "//build/config/compiler:chromium_code" ]
  172. configs += [ "//build/config/compiler:no_chromium_code" ]
  173. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  174. deps = [
  175. "//third_party/cpuinfo",
  176. "//third_party/fp16",
  177. "//third_party/fxdiv",
  178. "//third_party/pthreadpool",
  179. ]
  180. public_configs = [ ":xnnpack_config" ]
  181. }
  182. source_set("amalgam_f16c-fma-avx2") {
  183. cflags = [
  184. "-mavx2",
  185. "-mf16c",
  186. "-mfma",
  187. ]
  188. sources = [ "src/src/amalgam/avx2.c" ]
  189. configs -= [ "//build/config/compiler:chromium_code" ]
  190. configs += [ "//build/config/compiler:no_chromium_code" ]
  191. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  192. deps = [
  193. "//third_party/cpuinfo",
  194. "//third_party/fp16",
  195. "//third_party/fxdiv",
  196. "//third_party/pthreadpool",
  197. ]
  198. public_configs = [ ":xnnpack_config" ]
  199. }
  200. source_set("amalgam_sse2") {
  201. cflags = [ "-msse2" ]
  202. sources = [
  203. "src/src/amalgam/sse.c",
  204. "src/src/amalgam/sse2.c",
  205. ]
  206. configs -= [ "//build/config/compiler:chromium_code" ]
  207. configs += [ "//build/config/compiler:no_chromium_code" ]
  208. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  209. deps = [
  210. "//third_party/cpuinfo",
  211. "//third_party/fp16",
  212. "//third_party/fxdiv",
  213. "//third_party/pthreadpool",
  214. ]
  215. public_configs = [ ":xnnpack_config" ]
  216. }
  217. source_set("amalgam_sse4.1") {
  218. cflags = [ "-msse4.1" ]
  219. sources = [ "src/src/amalgam/sse41.c" ]
  220. configs -= [ "//build/config/compiler:chromium_code" ]
  221. configs += [ "//build/config/compiler:no_chromium_code" ]
  222. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  223. deps = [
  224. "//third_party/cpuinfo",
  225. "//third_party/fp16",
  226. "//third_party/fxdiv",
  227. "//third_party/pthreadpool",
  228. ]
  229. public_configs = [ ":xnnpack_config" ]
  230. }
  231. source_set("amalgam_ssse3") {
  232. cflags = [ "-mssse3" ]
  233. sources = [ "src/src/amalgam/ssse3.c" ]
  234. configs -= [ "//build/config/compiler:chromium_code" ]
  235. configs += [ "//build/config/compiler:no_chromium_code" ]
  236. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  237. deps = [
  238. "//third_party/cpuinfo",
  239. "//third_party/fp16",
  240. "//third_party/fxdiv",
  241. "//third_party/pthreadpool",
  242. ]
  243. public_configs = [ ":xnnpack_config" ]
  244. }
  245. source_set("jit") {
  246. cflags = []
  247. sources = [
  248. "src/src/jit/aarch32-assembler.cc",
  249. "src/src/jit/aarch64-assembler.cc",
  250. "src/src/jit/assembler.cc",
  251. ]
  252. configs -= [ "//build/config/compiler:chromium_code" ]
  253. configs += [ "//build/config/compiler:no_chromium_code" ]
  254. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  255. deps = [
  256. "//third_party/cpuinfo",
  257. "//third_party/fp16",
  258. "//third_party/fxdiv",
  259. "//third_party/pthreadpool",
  260. ]
  261. public_configs = [ ":xnnpack_config" ]
  262. }
  263. source_set("operators") {
  264. cflags = []
  265. sources = [
  266. "src/src/operators/argmax-pooling-nhwc.c",
  267. "src/src/operators/average-pooling-nhwc.c",
  268. "src/src/operators/binary-elementwise-nd.c",
  269. "src/src/operators/channel-shuffle-nc.c",
  270. "src/src/operators/constant-pad-nd.c",
  271. "src/src/operators/convolution-nchw.c",
  272. "src/src/operators/convolution-nhwc.c",
  273. "src/src/operators/deconvolution-nhwc.c",
  274. "src/src/operators/depth-to-space-nchw2nhwc.c",
  275. "src/src/operators/depth-to-space-nhwc.c",
  276. "src/src/operators/fully-connected-nc.c",
  277. "src/src/operators/global-average-pooling-ncw.c",
  278. "src/src/operators/global-average-pooling-nwc.c",
  279. "src/src/operators/lut-elementwise-nc.c",
  280. "src/src/operators/max-pooling-nhwc.c",
  281. "src/src/operators/prelu-nc.c",
  282. "src/src/operators/resize-bilinear-nchw.c",
  283. "src/src/operators/resize-bilinear-nhwc.c",
  284. "src/src/operators/softmax-nc.c",
  285. "src/src/operators/transpose-nd.c",
  286. "src/src/operators/unary-elementwise-nc.c",
  287. "src/src/operators/unpooling-nhwc.c",
  288. ]
  289. configs -= [ "//build/config/compiler:chromium_code" ]
  290. configs += [ "//build/config/compiler:no_chromium_code" ]
  291. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  292. deps = [
  293. "//third_party/cpuinfo",
  294. "//third_party/fp16",
  295. "//third_party/fxdiv",
  296. "//third_party/pthreadpool",
  297. ]
  298. public_configs = [ ":xnnpack_config" ]
  299. }
  300. source_set("qc8-dwconv_xop") {
  301. cflags = [ "-mxop" ]
  302. sources = [
  303. "src/src/qc8-dwconv/gen/up16x25-minmax-fp32-xop-mul16-add16.c",
  304. "src/src/qc8-dwconv/gen/up16x3-minmax-fp32-xop-mul16-add16.c",
  305. "src/src/qc8-dwconv/gen/up16x9-minmax-fp32-xop-mul16-add16.c",
  306. ]
  307. configs -= [ "//build/config/compiler:chromium_code" ]
  308. configs += [ "//build/config/compiler:no_chromium_code" ]
  309. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  310. deps = [
  311. "//third_party/cpuinfo",
  312. "//third_party/fp16",
  313. "//third_party/fxdiv",
  314. "//third_party/pthreadpool",
  315. ]
  316. public_configs = [ ":xnnpack_config" ]
  317. }
  318. source_set("qc8-gemm_xop") {
  319. cflags = [ "-mxop" ]
  320. sources = [
  321. "src/src/qc8-gemm/gen/1x4c8-minmax-fp32-xop-ld64.c",
  322. "src/src/qc8-gemm/gen/2x4c8-minmax-fp32-xop-ld64.c",
  323. ]
  324. configs -= [ "//build/config/compiler:chromium_code" ]
  325. configs += [ "//build/config/compiler:no_chromium_code" ]
  326. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  327. deps = [
  328. "//third_party/cpuinfo",
  329. "//third_party/fp16",
  330. "//third_party/fxdiv",
  331. "//third_party/pthreadpool",
  332. ]
  333. public_configs = [ ":xnnpack_config" ]
  334. }
  335. source_set("qc8-igemm_xop") {
  336. cflags = [ "-mxop" ]
  337. sources = [
  338. "src/src/qc8-igemm/gen/1x4c8-minmax-fp32-xop-ld64.c",
  339. "src/src/qc8-igemm/gen/2x4c8-minmax-fp32-xop-ld64.c",
  340. ]
  341. configs -= [ "//build/config/compiler:chromium_code" ]
  342. configs += [ "//build/config/compiler:no_chromium_code" ]
  343. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  344. deps = [
  345. "//third_party/cpuinfo",
  346. "//third_party/fp16",
  347. "//third_party/fxdiv",
  348. "//third_party/pthreadpool",
  349. ]
  350. public_configs = [ ":xnnpack_config" ]
  351. }
  352. source_set("qs8-dwconv_xop") {
  353. cflags = [ "-mxop" ]
  354. sources = [
  355. "src/src/qs8-dwconv/gen/up16x25-minmax-fp32-xop-mul16-add16.c",
  356. "src/src/qs8-dwconv/gen/up16x9-minmax-fp32-xop-mul16-add16.c",
  357. ]
  358. configs -= [ "//build/config/compiler:chromium_code" ]
  359. configs += [ "//build/config/compiler:no_chromium_code" ]
  360. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  361. deps = [
  362. "//third_party/cpuinfo",
  363. "//third_party/fp16",
  364. "//third_party/fxdiv",
  365. "//third_party/pthreadpool",
  366. ]
  367. public_configs = [ ":xnnpack_config" ]
  368. }
  369. source_set("qs8-gemm_xop") {
  370. cflags = [ "-mxop" ]
  371. sources = [
  372. "src/src/qs8-gemm/gen/1x4c8-minmax-fp32-xop-ld64.c",
  373. "src/src/qs8-gemm/gen/2x4c8-minmax-fp32-xop-ld64.c",
  374. ]
  375. configs -= [ "//build/config/compiler:chromium_code" ]
  376. configs += [ "//build/config/compiler:no_chromium_code" ]
  377. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  378. deps = [
  379. "//third_party/cpuinfo",
  380. "//third_party/fp16",
  381. "//third_party/fxdiv",
  382. "//third_party/pthreadpool",
  383. ]
  384. public_configs = [ ":xnnpack_config" ]
  385. }
  386. source_set("qs8-igemm_xop") {
  387. cflags = [ "-mxop" ]
  388. sources = [
  389. "src/src/qs8-igemm/gen/1x4c8-minmax-fp32-xop-ld64.c",
  390. "src/src/qs8-igemm/gen/2x4c8-minmax-fp32-xop-ld64.c",
  391. ]
  392. configs -= [ "//build/config/compiler:chromium_code" ]
  393. configs += [ "//build/config/compiler:no_chromium_code" ]
  394. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  395. deps = [
  396. "//third_party/cpuinfo",
  397. "//third_party/fp16",
  398. "//third_party/fxdiv",
  399. "//third_party/pthreadpool",
  400. ]
  401. public_configs = [ ":xnnpack_config" ]
  402. }
  403. source_set("qs8-vadd_xop") {
  404. cflags = [ "-mxop" ]
  405. sources = [ "src/src/qs8-vadd/gen/minmax-xop-mul32-ld32-x8.c" ]
  406. configs -= [ "//build/config/compiler:chromium_code" ]
  407. configs += [ "//build/config/compiler:no_chromium_code" ]
  408. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  409. deps = [
  410. "//third_party/cpuinfo",
  411. "//third_party/fp16",
  412. "//third_party/fxdiv",
  413. "//third_party/pthreadpool",
  414. ]
  415. public_configs = [ ":xnnpack_config" ]
  416. }
  417. source_set("qs8-vaddc_xop") {
  418. cflags = [ "-mxop" ]
  419. sources = [ "src/src/qs8-vaddc/gen/minmax-xop-mul32-ld32-x8.c" ]
  420. configs -= [ "//build/config/compiler:chromium_code" ]
  421. configs += [ "//build/config/compiler:no_chromium_code" ]
  422. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  423. deps = [
  424. "//third_party/cpuinfo",
  425. "//third_party/fp16",
  426. "//third_party/fxdiv",
  427. "//third_party/pthreadpool",
  428. ]
  429. public_configs = [ ":xnnpack_config" ]
  430. }
  431. source_set("qu8-dwconv_xop") {
  432. cflags = [ "-mxop" ]
  433. sources = [
  434. "src/src/qu8-dwconv/gen/up16x25-minmax-fp32-xop-mul32.c",
  435. "src/src/qu8-dwconv/gen/up16x9-minmax-fp32-xop-mul32.c",
  436. ]
  437. configs -= [ "//build/config/compiler:chromium_code" ]
  438. configs += [ "//build/config/compiler:no_chromium_code" ]
  439. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  440. deps = [
  441. "//third_party/cpuinfo",
  442. "//third_party/fp16",
  443. "//third_party/fxdiv",
  444. "//third_party/pthreadpool",
  445. ]
  446. public_configs = [ ":xnnpack_config" ]
  447. }
  448. source_set("qu8-gemm_xop") {
  449. cflags = [ "-mxop" ]
  450. sources = [
  451. "src/src/qu8-gemm/gen/1x4c8-minmax-fp32-xop-ld64.c",
  452. "src/src/qu8-gemm/gen/2x4c8-minmax-fp32-xop-ld64.c",
  453. ]
  454. configs -= [ "//build/config/compiler:chromium_code" ]
  455. configs += [ "//build/config/compiler:no_chromium_code" ]
  456. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  457. deps = [
  458. "//third_party/cpuinfo",
  459. "//third_party/fp16",
  460. "//third_party/fxdiv",
  461. "//third_party/pthreadpool",
  462. ]
  463. public_configs = [ ":xnnpack_config" ]
  464. }
  465. source_set("qu8-igemm_xop") {
  466. cflags = [ "-mxop" ]
  467. sources = [
  468. "src/src/qu8-igemm/gen/1x4c8-minmax-fp32-xop-ld64.c",
  469. "src/src/qu8-igemm/gen/2x4c8-minmax-fp32-xop-ld64.c",
  470. ]
  471. configs -= [ "//build/config/compiler:chromium_code" ]
  472. configs += [ "//build/config/compiler:no_chromium_code" ]
  473. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  474. deps = [
  475. "//third_party/cpuinfo",
  476. "//third_party/fp16",
  477. "//third_party/fxdiv",
  478. "//third_party/pthreadpool",
  479. ]
  480. public_configs = [ ":xnnpack_config" ]
  481. }
  482. source_set("qu8-vadd_xop") {
  483. cflags = [ "-mxop" ]
  484. sources = [ "src/src/qu8-vadd/gen/minmax-xop-mul32-ld32-x8.c" ]
  485. configs -= [ "//build/config/compiler:chromium_code" ]
  486. configs += [ "//build/config/compiler:no_chromium_code" ]
  487. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  488. deps = [
  489. "//third_party/cpuinfo",
  490. "//third_party/fp16",
  491. "//third_party/fxdiv",
  492. "//third_party/pthreadpool",
  493. ]
  494. public_configs = [ ":xnnpack_config" ]
  495. }
  496. source_set("qu8-vaddc_xop") {
  497. cflags = [ "-mxop" ]
  498. sources = [ "src/src/qu8-vaddc/gen/minmax-xop-mul32-ld32-x8.c" ]
  499. configs -= [ "//build/config/compiler:chromium_code" ]
  500. configs += [ "//build/config/compiler:no_chromium_code" ]
  501. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  502. deps = [
  503. "//third_party/cpuinfo",
  504. "//third_party/fp16",
  505. "//third_party/fxdiv",
  506. "//third_party/pthreadpool",
  507. ]
  508. public_configs = [ ":xnnpack_config" ]
  509. }
  510. source_set("subgraph") {
  511. cflags = []
  512. sources = [
  513. "src/src/subgraph/abs.c",
  514. "src/src/subgraph/add2.c",
  515. "src/src/subgraph/argmax-pooling-2d.c",
  516. "src/src/subgraph/average-pooling-2d.c",
  517. "src/src/subgraph/bankers-rounding.c",
  518. "src/src/subgraph/ceiling.c",
  519. "src/src/subgraph/clamp.c",
  520. "src/src/subgraph/concatenate.c",
  521. "src/src/subgraph/convert.c",
  522. "src/src/subgraph/convolution-2d.c",
  523. "src/src/subgraph/deconvolution-2d.c",
  524. "src/src/subgraph/depth-to-space.c",
  525. "src/src/subgraph/depthwise-convolution-2d.c",
  526. "src/src/subgraph/divide.c",
  527. "src/src/subgraph/elu.c",
  528. "src/src/subgraph/even-split.c",
  529. "src/src/subgraph/floor.c",
  530. "src/src/subgraph/fully-connected.c",
  531. "src/src/subgraph/global-average-pooling.c",
  532. "src/src/subgraph/hardswish.c",
  533. "src/src/subgraph/leaky-relu.c",
  534. "src/src/subgraph/max-pooling-2d.c",
  535. "src/src/subgraph/maximum2.c",
  536. "src/src/subgraph/minimum2.c",
  537. "src/src/subgraph/multiply2.c",
  538. "src/src/subgraph/negate.c",
  539. "src/src/subgraph/prelu.c",
  540. "src/src/subgraph/sigmoid.c",
  541. "src/src/subgraph/softmax.c",
  542. "src/src/subgraph/square-root.c",
  543. "src/src/subgraph/square.c",
  544. "src/src/subgraph/squared-difference.c",
  545. "src/src/subgraph/static-constant-pad.c",
  546. "src/src/subgraph/static-reshape.c",
  547. "src/src/subgraph/static-resize-bilinear-2d.c",
  548. "src/src/subgraph/static-transpose.c",
  549. "src/src/subgraph/subtract.c",
  550. "src/src/subgraph/unpooling-2d.c",
  551. "src/src/subgraph/validation.c",
  552. ]
  553. configs -= [ "//build/config/compiler:chromium_code" ]
  554. configs += [ "//build/config/compiler:no_chromium_code" ]
  555. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  556. deps = [
  557. "//third_party/cpuinfo",
  558. "//third_party/fp16",
  559. "//third_party/fxdiv",
  560. "//third_party/pthreadpool",
  561. ]
  562. public_configs = [ ":xnnpack_config" ]
  563. }
  564. source_set("tables") {
  565. cflags = []
  566. sources = [
  567. "src/src/tables/exp2-k-over-2048.c",
  568. "src/src/tables/exp2-k-over-64.c",
  569. "src/src/tables/exp2minus-k-over-16.c",
  570. "src/src/tables/exp2minus-k-over-2048.c",
  571. "src/src/tables/exp2minus-k-over-4.c",
  572. "src/src/tables/exp2minus-k-over-64.c",
  573. "src/src/tables/exp2minus-k-over-8.c",
  574. ]
  575. configs -= [ "//build/config/compiler:chromium_code" ]
  576. configs += [ "//build/config/compiler:no_chromium_code" ]
  577. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  578. deps = [
  579. "//third_party/cpuinfo",
  580. "//third_party/fp16",
  581. "//third_party/fxdiv",
  582. "//third_party/pthreadpool",
  583. ]
  584. public_configs = [ ":xnnpack_config" ]
  585. }
  586. source_set("u8-lut32norm") {
  587. cflags = []
  588. sources = [ "src/src/u8-lut32norm/scalar.c" ]
  589. configs -= [ "//build/config/compiler:chromium_code" ]
  590. configs += [ "//build/config/compiler:no_chromium_code" ]
  591. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  592. deps = [
  593. "//third_party/cpuinfo",
  594. "//third_party/fp16",
  595. "//third_party/fxdiv",
  596. "//third_party/pthreadpool",
  597. ]
  598. public_configs = [ ":xnnpack_config" ]
  599. }
  600. source_set("x32-depthtospace2d-chw2hwc") {
  601. cflags = []
  602. sources = [ "src/src/x32-depthtospace2d-chw2hwc/scalar.c" ]
  603. configs -= [ "//build/config/compiler:chromium_code" ]
  604. configs += [ "//build/config/compiler:no_chromium_code" ]
  605. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  606. deps = [
  607. "//third_party/cpuinfo",
  608. "//third_party/fp16",
  609. "//third_party/fxdiv",
  610. "//third_party/pthreadpool",
  611. ]
  612. public_configs = [ ":xnnpack_config" ]
  613. }
  614. source_set("x8-lut") {
  615. cflags = []
  616. sources = [ "src/src/x8-lut/gen/lut-scalar-x4.c" ]
  617. configs -= [ "//build/config/compiler:chromium_code" ]
  618. configs += [ "//build/config/compiler:no_chromium_code" ]
  619. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  620. deps = [
  621. "//third_party/cpuinfo",
  622. "//third_party/fp16",
  623. "//third_party/fxdiv",
  624. "//third_party/pthreadpool",
  625. ]
  626. public_configs = [ ":xnnpack_config" ]
  627. }
  628. source_set("xx-copy") {
  629. cflags = []
  630. sources = [ "src/src/xx-copy/memcpy.c" ]
  631. configs -= [ "//build/config/compiler:chromium_code" ]
  632. configs += [ "//build/config/compiler:no_chromium_code" ]
  633. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  634. deps = [
  635. "//third_party/cpuinfo",
  636. "//third_party/fp16",
  637. "//third_party/fxdiv",
  638. "//third_party/pthreadpool",
  639. ]
  640. public_configs = [ ":xnnpack_config" ]
  641. }
  642. source_set("xx-transpose") {
  643. cflags = []
  644. sources = [ "src/src/xx-transpose/1x1-memcpy.c" ]
  645. configs -= [ "//build/config/compiler:chromium_code" ]
  646. configs += [ "//build/config/compiler:no_chromium_code" ]
  647. configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ]
  648. deps = [
  649. "//third_party/cpuinfo",
  650. "//third_party/fp16",
  651. "//third_party/fxdiv",
  652. "//third_party/pthreadpool",
  653. ]
  654. public_configs = [ ":xnnpack_config" ]
  655. }