{"id":490577,"date":"2026-08-11T13:17:41","date_gmt":"2026-08-11T13:17:41","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=490577"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2026-08-11T13:17:41","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=490577","title":{"rendered":"\u0412\u043d\u0443\u0442\u0440\u0438 Apple Neural Engine \u0432 M4. \u0427\u0430\u0441\u0442\u044c 1: \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u044b \u043e\u0431\u043e\u0448\u043b\u0438 Core ML \u0438 \u043d\u0430\u0447\u0430\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0436\u0435\u043b\u0435\u0437\u043e\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.<\/p>\n<p>\u0412\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430: <em>\u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 Apple Neural Engine?<\/em><\/p>\n<p>Apple \u043d\u0435 \u0445\u043e\u0447\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u0437\u043d\u0430\u043b\u0438 \u043e\u0442\u0432\u0435\u0442. \u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043d\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434 ANE, \u043d\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438 \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u0412\u0441\u0451 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/developer.apple.com\/documentation\/coreml\">Core ML<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438, \u043f\u0440\u043e\u0445\u043e\u0434\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0436\u0435\u043b\u0435\u0437\u043e.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0437\u0430\u043d\u044f\u043b\u0438\u0441\u044c <a href=\"https:\/\/otus.pw\/JqbK\/\">\u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u043e\u043c<\/a>.<\/p>\n<p>\u0417\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043c\u044b \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u043b\u0438 \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0441\u0442\u0435\u043a \u043e\u0442 Core ML \u0434\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u044f\u0434\u0440\u0430 IOKit, \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0438, \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 ANE \u0431\u0435\u0437 Core ML, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0441 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c, \u0438\u0437\u043c\u0435\u0440\u0438\u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0438\u043a\u043e\u0432\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u2013 \u0441\u043f\u043e\u0439\u043b\u0435\u0440: \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 Apple \u00ab38 TOPS\u00bb \u0432\u0432\u043e\u0434\u044f\u0442 \u0432 \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u2013 \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043d\u0430 \u0447\u0438\u043f\u0435, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441.<\/p>\n<p>\u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0438\u0438 \u0438\u0437 \u0442\u0440\u0451\u0445 \u0441\u0442\u0430\u0442\u0435\u0439. \u0417\u0434\u0435\u0441\u044c \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u0435: \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u044b \u0441\u043b\u043e\u0439 \u0437\u0430 \u0441\u043b\u043e\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 Neural Engine \u0432 M4 \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0438\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Neural Engine?<\/h2>\n<p>ANE \u2013 \u043d\u0435 GPU \u0438 \u043d\u0435 CPU. \u042d\u0442\u043e <em>\u0434\u0432\u0438\u0436\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u043e\u0432<\/em>: \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044c \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0444 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0435\u0433\u043e \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u0443\u044e \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u0443\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e. \u0412\u044b \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0435\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u0435\u043c. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0432\u0435\u0441\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0444, \u0430 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0435\u0451 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430.<\/p>\n<p>Apple \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0430 Neural Engine \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 A11 \u0432 2017 \u0433\u043e\u0434\u0443. \u0422\u043e\u0433\u0434\u0430 \u043e\u043d \u0441\u043e\u0441\u0442\u043e\u044f\u043b \u0438\u0437 \u0434\u0432\u0443\u0445 \u044f\u0434\u0435\u0440. \u0421 \u043a\u0430\u0436\u0434\u044b\u043c \u043d\u043e\u0432\u044b\u043c \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u043b\u0430 \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ae3\/861\/3a3\/ae38613a3983e2ec16088d430ad42ff9.jpeg\" width=\"2048\" height=\"590\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ae3\/861\/3a3\/ae38613a3983e2ec16088d430ad42ff9.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ae3\/861\/3a3\/ae38613a3983e2ec16088d430ad42ff9.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 ANE \u0438\u0437 M4, \u043a\u043e\u0434\u043e\u0432\u043e\u0435 \u0438\u043c\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u2013 <strong>H16G<\/strong>. \u0423 \u043d\u0435\u0433\u043e 16 \u044f\u0434\u0435\u0440, \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0432 127 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u044b (DVFS), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0434\u0430\u0435\u0442 \u0440\u043e\u0432\u043d\u043e \u0434\u043e 0 \u043c\u0412\u0442.<\/p>\n<h2>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b<\/h2>\n<p>\u041c\u044b \u0431\u044b\u043b\u0438 \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u043c\u0438, \u043a\u0442\u043e \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 ANE.<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/hollance\/neural-engine\">hollance\/neural-engine<\/a> \u2014 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u041c\u044d\u0442\u0442\u0435\u0439\u0441\u0430 \u0425\u043e\u043b\u043b\u0435\u043c\u0430\u043d\u0441\u0430, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 ANE, \u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u044d\u0442\u043e \u043b\u0443\u0447\u0448\u0438\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 ANE.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/mdaiter\/ane\">mdaiter\/ane<\/a> \u2014 \u0440\u0430\u043d\u043d\u044f\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u043e \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u0443 \u0441 \u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043d\u0430 Python \u0438 Objective-C, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a ANECompiler \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447 \u0447\u0435\u0440\u0435\u0437 IOKit.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/eiln\/ane\">eiln\/ane<\/a> \u2014 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 ANE \u0434\u043b\u044f Linux, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u043e\u043c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Asahi Linux. \u041e\u043d \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u044f\u0434\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/apple\/ml-ane-transformers\">apple\/ml-ane-transformers<\/a> \u2014 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u043e\u0432 \u043e\u0442 Apple, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043f\u043e\u0434 ANE. \u041e\u043d\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0442\u0430\u043a\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0430\u0442 \u0441 \u043a\u0430\u043d\u0430\u043b\u0430\u043c\u0438 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u0451\u0440\u0442\u043e\u043a 1\u00d71.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0434\u043e \u043d\u0430\u0441 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433: (\u0430) \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a API _ANEClient \u043d\u0430 M4 \u0431\u0435\u0437 Core ML, (\u0431) \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0435\u0439 MIL-\u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, (\u0432) \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0438\u043a\u043e\u0432\u0443\u044e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u043e\u0431\u0445\u043e\u0434 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 Core ML \u0438 (\u0433) \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 ANE.<\/p>\n<h2>\u041c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044f<\/h2>\n<p>\u041c\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>dyld_info -objc<\/code> \u0434\u043b\u044f <code>AppleNeuralEngine.framework<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u0441\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u043c\u0435\u0442\u043e\u0434\u044b Objective-C;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u043c\u0435\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 (method swizzling), \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f Core ML \u043a \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c ANE;<\/p>\n<\/li>\n<li>\n<p>\u0430\u043d\u0430\u043b\u0438\u0437 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 E5, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0430\u043d\u0430\u043b\u0438\u0437 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: \u043c\u044b \u043c\u0435\u043d\u044f\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043c\u0430\u0442\u0440\u0438\u0446, \u0433\u043b\u0443\u0431\u0438\u043d\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u043e\u0432 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043d\u0430\u043b\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0443\u044e \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 <code>AppleNeuralEngine.framework<\/code> \u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 40 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 <code><em>ANEClient<\/em><\/code><em>, <\/em><code>ANEModel<\/code>, <code><em>ANERequest<\/em><\/code><em>, <\/em><code>ANEIOSurfaceObject<\/code>, <code>_ANEInMemoryModel<\/code> \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435.<\/p>\n<h2>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0441\u0442\u0435\u043a<\/h2>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0441\u0442\u0435\u043a ANE: \u043e\u0442 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e API Core ML \u0434\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9b3\/624\/146\/9b3624146f18b9a28491f54a8a23d92f.jpeg\" width=\"1391\" height=\"1131\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/9b3\/624\/146\/9b3624146f18b9a28491f54a8a23d92f.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9b3\/624\/146\/9b3624146f18b9a28491f54a8a23d92f.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Core ML \u2014 \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a ANE. \u041a\u043b\u0430\u0441\u0441 <code>_ANEClient<\/code> \u0438\u0437 <code>AppleNeuralEngine.framework <\/code>\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043e\u043c \u00ab\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u2192 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u2192 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u00bb. Core ML \u2014 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 \u043d\u0438\u043c.<\/p>\n<h2>_ANEClient: \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a Neural Engine<\/h2>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043f\u043e\u043b\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 ANE \u0431\u0435\u0437 Core ML:<\/p>\n<pre><code class=\"objectivec\">\/\/ 1. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0431\u0449\u0435\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430id client = [_ANEClient sharedConnection];\/\/ 2. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044cid model = [_ANEModel modelAtURL:compiledURL key:@\"mykey\"];\/\/ 3. \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c MIL-\u0442\u0435\u043a\u0441\u0442 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b E5\/\/ \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u0435\u0448\u0435[client compileModel:model options:@{    @\"kANEFModelType\": @\"kANEFModelMIL\",    @\"kANEFNetPlistFilenameKey\": @\"model.mil\"} qos:21 error:&amp;err];\/\/ 4. \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435 ANE[client loadModel:model options:@{} qos:21 error:&amp;err];\/\/ \u2192 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f programHandle, \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u2014 127\/\/ 5. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0431\u0443\u0444\u0435\u0440\u044b \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 IOSurfaceIOSurfaceRef surface = IOSurfaceCreate(props);id wrapped = [_ANEIOSurfaceObject objectWithIOSurface:surface];\/\/ 6. \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435id req = [_ANERequest requestWithInputs:@[wA, wB]    inputIndices:@[@0, @1]    outputs:@[wOut]    outputIndices:@[@0]    weightsBuffer:nil    perfStats:nil    procedureIndex:@0];\/\/ 7. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 ANE[client evaluateWithModel:model options:@{}    request:req qos:21 error:&amp;err];\/\/ 8. \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0437 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e IOSurfaceIOSurfaceLock(outSurface, kIOSurfaceLockReadOnly, NULL);float *data = IOSurfaceGetBaseAddress(outSurface);\/\/ ... \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b ...IOSurfaceUnlock(outSurface, kIOSurfaceLockReadOnly, NULL);<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u043b\u044f \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f <strong>IOSurface<\/strong> \u2014 \u0442\u043e\u0442 \u0436\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u0443\u0440 GPU. \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 GPU \u0438 ANE \u0431\u0435\u0437 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043e\u0431\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 <code>IOSurfaceRef<\/code>.<\/p>\n<p><em>\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435: <\/em>ANE \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0433\u043b\u0443\u0431\u0438\u043d\u0443 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0432 127 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0434\u043e 127 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435. \u042d\u0442\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u0435\u0439, \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e ANE \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0439 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<h2>MIL: \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u044f\u0437\u044b\u043a<\/h2>\n<p>Core ML \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0432 ANE \u043d\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 ONNX \u0438\u043b\u0438 protobuf. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <strong>MIL<\/strong> \u2014 Machine Learning Intermediate Language, \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0444\u043e\u0440\u043c\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f (SSA), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"objectivec\">program(1.3)[buildInfo = dict&lt;string, string&gt;({    {\"coremltools-version\", \"9.0\"}})]{    func main&lt;ios18&gt;(        tensor&lt;fp16, [1, 1024, 1, 1024]&gt; x,        tensor&lt;fp16, [1, 1024, 1, 1024]&gt; w    ) {        bool tx = const()[val = bool(false)];        bool ty = const()[val = bool(false)];        tensor&lt;fp16, [1, 1024, 1, 1024]&gt; out =            matmul(transpose_x = tx, transpose_y = ty,                   x = x, y = w);    } -&gt; (out);}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>MIL \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u0438 \u0444\u043e\u0440\u043c\u0430. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u043c\u0435\u044e\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b. \u0412 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0442\u0435\u043d\u0437\u043e\u0440\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441 \u044f\u0432\u043d\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u043c\u0443 \u0434\u043b\u044f ANE \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e <strong>NCDHW + Interleave<\/strong>: <code>[Batch, Channels, Depth, Height, Width]<\/code>. \u0414\u043b\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1024 \u00d7 1024 \u0432 \u0447\u0435\u0442\u044b\u0440\u0451\u0445\u043c\u0435\u0440\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 <code>[1, 1024, 1, 1024]<\/code>.<\/p>\n<h2>\u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 E5<\/h2>\n<p>\u041a\u043e\u0433\u0434\u0430 ANECompiler \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 MIL, \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b E5 \u2014 \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 FlatBuffers, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cf3\/d82\/48d\/cf3d8248d7f4e5e0ae4c62d75a586f92.jpeg\" width=\"1697\" height=\"927\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/cf3\/d82\/48d\/cf3d8248d7f4e5e0ae4c62d75a586f92.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cf3\/d82\/48d\/cf3d8248d7f4e5e0ae4c62d75a586f92.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435: \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1024 \u00d7 1024 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b \u043e\u0431\u044a\u0451\u043c\u043e\u043c 2688 \u0431\u0430\u0439\u0442, \u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 128 \u00d7 128 \u2014 \u0432 2680 \u0431\u0430\u0439\u0442. \u0420\u0430\u0437\u043c\u0435\u0440\u044b \u043f\u043e\u0447\u0442\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442. \u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b E5 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f. \u041e\u043d \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 <em>\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0443\u044e<\/em> \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430\u043c\u0438 \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432. \u042d\u0442\u043e\u0442 \u00ab\u043c\u0438\u043a\u0440\u043e\u043a\u043e\u0434\u00bb \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0447\u0435\u043c \u043d\u0430 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<p>\u041e\u0442\u0441\u044e\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435 ANE, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432: \u0441\u0432\u0451\u0440\u0442\u043a\u0443, \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0418\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430\u043c\u0438 \u0444\u043e\u0440\u043c\u044b \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432. \u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b E5 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0438 \u043a\u0430\u043a \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0438\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u0430 \u043d\u0435 \u0441\u0430\u043c\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438: \u0421\u0432\u044f\u0442\u043e\u0439 \u0413\u0440\u0430\u0430\u043b\u044c<\/h2>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0443 \u043d\u0435\u0451 \u0435\u0441\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a: MIL-\u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043a, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u043f\u0443\u0442\u044c \u043a \u043d\u0435\u0439. \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0433\u0434\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0436\u0434\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0433\u043e\u0432, \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0435\u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u044b.<\/p>\n<p>\u041c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 <code>_ANEInMemoryModelDescriptor<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 MIL-\u0442\u0435\u043a\u0441\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438:<\/p>\n<pre><code class=\"objectivec\">id desc = [_ANEInMemoryModelDescriptor    modelWithMILText:milData      \/\/ NSData*, \u0430 \u043d\u0435 NSString*!    weights:weightDict            \/\/ NSDictionary*, \u0430 \u043d\u0435 NSData*!    optionsPlist:nil];id model = [_ANEInMemoryModel    inMemoryModelWithDescriptor:desc];[model compileWithQoS:21 options:@{} error:&amp;err];[model loadWithQoS:21 options:@{} error:&amp;err];[model evaluateWithQoS:21 options:@{}    request:req error:&amp;err];<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0440\u0435\u043c\u044f \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c\u0438 \u043d\u044e\u0430\u043d\u0441\u0430\u043c\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0448\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043e\u0442\u043b\u0430\u0434\u043a\u0438:<\/p>\n<ol>\n<li>\n<p><strong>NSData, \u0430 \u043d\u0435 NSString<\/strong>. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>milText<\/code> \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 NSData* \u0441 \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 UTF-8, \u0430 \u043d\u0435 NSString*. \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443, \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0431\u0435\u0437 \u044f\u0432\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<\/li>\n<li>\n<p><strong>NSDictionary, \u0430 \u043d\u0435 NSData<\/strong>. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 weights \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u043c\u0435\u043d\u0430 \u0432\u0435\u0441\u043e\u0432 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 NSData, \u0430 \u043d\u0435 \u0435\u0434\u0438\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0443\u0442\u044c \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u043c.<\/strong> \u0414\u0430\u0436\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u00ab\u0432 \u043f\u0430\u043c\u044f\u0442\u0438\u00bb \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433. \u0415\u0441\u043b\u0438 \u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043d\u0435\u0442 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u043c\u0430\u043b\u043e\u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0442\u044c.<\/p>\n<\/li>\n<\/ol>\n<p>\u0418 \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0437\u0430\u0431\u0430\u0432\u043d\u0430\u044f \u043d\u0430\u0445\u043e\u0434\u043a\u0430: \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c \u043a\u043e\u0434\u0435 Apple \u0432 \u0438\u043c\u0435\u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f Desctiptor \u2014 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u0441 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u043e\u0439. \u0414\u0430\u0436\u0435 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u044b Apple \u043e\u0448\u0438\u0431\u0430\u044e\u0442\u0441\u044f \u0432 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 API. \ud83d\ude42<\/p>\n<h2>\u0410\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c: \u0447\u0442\u043e \u043d\u0430\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e<\/h2>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f IOKit, \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043c\u044b \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c ANE \u0432 M4:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/665\/1e3\/707\/6651e3707b083088ed8184db9482ac6d.jpeg\" width=\"1361\" height=\"1156\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/665\/1e3\/707\/6651e3707b083088ed8184db9482ac6d.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/665\/1e3\/707\/6651e3707b083088ed8184db9482ac6d.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u041a\u0430\u043d\u0430\u043b\u044b DVFS<\/h3>\n<p>IOReportLegend \u0432 IOKit \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e ANE \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c \u0441 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u043c \u0442\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0434\u0438\u0437\u0435\u0440\u0438\u043d\u0433\u043e\u043c \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c\u0438 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u043c\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430\u043c\u0438:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>ANE_ADCLK_TRIG<\/code>\u00a0\u2014 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0442\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<br \/><code>ANE_ADHWTRG<\/code> \u2014 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0439 \u0442\u0440\u0438\u0433\u0433\u0435\u0440<br \/><code>ANE_ADSWTRG<\/code> \u2014 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0439 \u0442\u0440\u0438\u0433\u0433\u0435\u0440<br \/><code>ANE_DITHR_TRIG<\/code> \u2014 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 \u0434\u0438\u0437\u0435\u0440\u0438\u043d\u0433\u0430<br \/><code>ANE_PPT_TRIG<\/code>\u00a0\u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<br \/><code>ANE_PPT_SWTRG<\/code> \u2014 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 PPT<br \/><code>ANE_PPT_HWTRG<\/code> \u2014 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 PPT<br \/><code>ANE_EXT_TRIG0-3<\/code> \u2014 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0421\u0442\u043e\u043b\u044c \u0440\u0430\u0437\u0432\u0438\u0442\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 DVFS \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e ANE \u043c\u043e\u0436\u0435\u0442 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u043f\u0438\u0442\u0430\u043d\u0438\u044f CPU \u0438 GPU.<\/p>\n<h3>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0421\u0443\u0434\u044f \u043f\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c <code>ANECompiler.framework<\/code>, ANE \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b4d\/2c3\/042\/b4d2c30422e764101d187e3fe6082e07.jpeg\" width=\"2048\" height=\"265\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/b4d\/2c3\/042\/b4d2c30422e764101d187e3fe6082e07.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b4d\/2c3\/042\/b4d2c30422e764101d187e3fe6082e07.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u043c ANE, \u043f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0441\u043b\u0443\u0436\u0438\u0442 Conv. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 matmul \u0432 \u0432\u0438\u0434\u0435 \u0441\u0432\u0451\u0440\u0442\u043a\u0438 1\u00d71 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c.<\/p>\n<h2>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b IOSurface<\/h2>\n<p>\u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 ANE \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0447\u0435\u0440\u0435\u0437 IOSurface. \u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<pre><code class=\"objectivec\">\/\/ \u0421\u043e\u0437\u0434\u0430\u0451\u043c IOSurface \u0434\u043b\u044f \u0442\u0435\u043d\u0437\u043e\u0440\u0430 float \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1024\u00d71024NSDictionary *props = @{    @\"IOSurfaceWidth\":           @(1024),    @\"IOSurfaceHeight\":          @(1024),    @\"IOSurfaceBytesPerElement\": @(4),     \/\/ float32    @\"IOSurfaceBytesPerRow\":     @(4096),  \/\/ 1024 * 4    @\"IOSurfaceAllocSize\":       @(4194304),    @\"IOSurfacePixelFormat\":     @(0)};IOSurfaceRef surface = IOSurfaceCreate(props);\/\/ \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435IOSurfaceLock(surface, 0, NULL);float *ptr = IOSurfaceGetBaseAddress(surface);memcpy(ptr, data, 4194304);IOSurfaceUnlock(surface, 0, NULL);\/\/ \u041e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u043b\u044f ANEid wrapped = [_ANEIOSurfaceObject objectWithIOSurface:surface];<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 IOSurface \u2014 \u0442\u043e\u0442 \u0436\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430\u043c GPU, \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u044b GPU \u2194 ANE \u0431\u0435\u0437 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0431\u0430 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<h2>\u041a\u0435\u0448 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/h2>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 ANE \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b E5 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e:<\/p>\n<pre><code class=\"objectivec\">~\/Library\/Caches\/&lt;app&gt;\/com.apple.e5rt.e5bundlecache\/&lt;build&gt;\/&lt;hash&gt;\/  &lt;hash&gt;.bundle\/  \u2514\u2500\u2500 H16G.bundle\/           \u2190 H16G \u2014 \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 ANE \u0432 M4      \u251c\u2500\u2500 H16G.e5            \u2190 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b FlatBuffers \u043e\u0431\u044a\u0451\u043c\u043e\u043c 2\u20133 \u041a\u0431\u0430\u0439\u0442      \u2514\u2500\u2500 main\/          \u2514\u2500\u2500 main_ane\/              \u2514\u2500\u2500 model.anehash<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 20\u201340 \u043c\u0441. \u041f\u0440\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0438 \u0432 \u043a\u0435\u0448 \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442. \u0414\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e: \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0438 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u041d\u043e \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0435\u0441\u0430 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435.<\/p>\n<h2>\u041d\u0435\u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0438\u0437\u0443\u0447\u0438\u043b\u0438. \u041e\u043d\u0438 \u043d\u0430\u043c\u0435\u043a\u0430\u044e\u0442 \u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0449\u0451 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c:<\/p>\n<ul>\n<li>\n<p><code>_ANEChainingRequest<\/code> \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p><code><em>ANESharedEvents<\/em><\/code><em> \/ <\/em><code>ANESharedSignalEvent<\/code> \/ <code>_ANESharedWaitEvent<\/code> \u2014 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u0431\u0430\u0440\u044c\u0435\u0440\u043e\u0432 \u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0432 \u0441\u0442\u0438\u043b\u0435 Metal \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 GPU \u2194 ANE;<\/p>\n<\/li>\n<li>\n<p><code>_ANEPerformanceStats<\/code> \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p><code>_ANEVirtualClient<\/code> \u2014 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a ANE, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u0435-\u0447\u0435\u0433\u043e \u043c\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>\u0442\u043e\u0447\u043d\u0443\u044e \u043c\u0438\u043a\u0440\u043e\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u044f\u0434\u0435\u0440 ANE \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a \u044f\u0434\u0440\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0442\u0430\u043a\u0442\u043e\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u043e\u0442\u0443 ANE, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 DVFS \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0435\u0451;<\/p>\n<\/li>\n<li>\n<p>\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043b\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0442\u043e\u0447\u043d\u0443\u044e \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044e SRAM: \u0440\u0430\u0437\u0431\u0438\u0442\u0430 \u043b\u0438 \u043e\u043d\u0430 \u043d\u0430 \u0431\u0430\u043d\u043a\u0438, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043e\u0431\u0449\u0435\u0439 \u0438\u043b\u0438 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u044f\u0434\u0440\u0443.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435<\/strong><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a ANE, \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432: \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 matmul, \u0440\u0435\u0437\u043a\u043e\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b SRAM, \u0432\u044b\u044f\u0441\u043d\u0438\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0441\u0432\u0451\u0440\u0442\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0442\u0440\u0438 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 matmul, \u043f\u043e\u0447\u0435\u043c\u0443 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0438\u0435 Apple \u043e \u00ab38 TOPS\u00bb \u0432\u0432\u043e\u0434\u0438\u0442 \u0432 \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0438 \u043a\u0430\u043a \u043e\u0431\u0445\u043e\u0434 Core ML \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0432 2\u20134 \u0440\u0430\u0437\u0430.<\/p>\n<p>\u0410 \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u043e, \u0447\u0442\u043e Apple \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c: \u043e\u0431\u0443\u0447\u0438\u043c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043d\u0430 Neural Engine.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fb8\/9c0\/efe\/fb89c0efe0525e5d4d41bdff3a2aec73.png\" width=\"2640\" height=\"300\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/fb8\/9c0\/efe\/fb89c0efe0525e5d4d41bdff3a2aec73.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fb8\/9c0\/efe\/fb89c0efe0525e5d4d41bdff3a2aec73.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044f \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0438\u0436\u0435 \u0443\u0440\u043e\u0432\u043d\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u043e\u0431\u0451\u0440\u0442\u043e\u043a, \u043e\u0434\u043d\u043e\u0439 \u0442\u0435\u043e\u0440\u0438\u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043c\u0430\u043b\u043e. \u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u044f\u0434\u0440\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b, \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0436\u0435\u043b\u0435\u0437\u043e\u043c \u0432 \u0435\u0434\u0438\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443. \u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u043a \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c \u0440\u0430\u0437\u0431\u043e\u0440\u0430\u043c:<\/p>\n<ul>\n<li>\n<p>12 \u0430\u0432\u0433\u0443\u0441\u0442\u0430, 20:00. \u00ab\u0422\u0430\u0439\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0447\u0438\u043f\u043e\u0432. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432\u0441\u0451 \u043a ESP32\u00bb. <a href=\"https:\/\/otus.pw\/qscrH\/\">\u0417\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f<\/a><\/p>\n<\/li>\n<li>\n<p>17 \u0430\u0432\u0433\u0443\u0441\u0442\u0430, 20:00. \u00ab\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043c\u043e\u0434\u0443\u043b\u044c \u044f\u0434\u0440\u0430. \u041a\u0430\u043a \u0435\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c, \u0441\u043e\u0431\u0440\u0430\u0442\u044c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u00bb. <a href=\"https:\/\/otus.pw\/wBcj\/\">\u0417\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f<\/a><\/p>\n<\/li>\n<\/ul>\n<p><em>\u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0443\u0440\u043e\u043a\u043e\u0432 \u0430\u0432\u0433\u0443\u0441\u0442\u0430 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <\/em><a href=\"https:\/\/otus.pw\/9Pu4\/\"><em>\u0432 \u0434\u0430\u0439\u0434\u0436\u0435\u0441\u0442\u0435.<\/em><\/a><\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1069184\/\">https:\/\/habr.com\/ru\/articles\/1069184\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u044b \u043e\u0431\u043e\u0448\u043b\u0438 Core ML \u0438 \u043d\u0430\u0447\u0430\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0436\u0435\u043b\u0435\u0437\u043e\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.\u0412\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430: \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043e\u0431\u0443\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 Apple Neural Engine?Apple \u043d\u0435 \u0445\u043e\u0447\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u0437\u043d\u0430\u043b\u0438 \u043e\u0442\u0432\u0435\u0442. \u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043d\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434 ANE, \u043d\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438 \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u0412\u0441\u0451 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 Core ML, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438, \u043f\u0440\u043e\u0445\u043e\u0434\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0436\u0435\u043b\u0435\u0437\u043e.\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0437\u0430\u043d\u044f\u043b\u0438\u0441\u044c \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u043e\u043c.\u0417\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043c\u044b \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u043b\u0438 \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0441\u0442\u0435\u043a \u043e\u0442 Core ML \u0434\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u044f\u0434\u0440\u0430 IOKit, \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0438, \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 ANE \u0431\u0435\u0437 Core ML, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0441 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c, \u0438\u0437\u043c\u0435\u0440\u0438\u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0438\u043a\u043e\u0432\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u2013 \u0441\u043f\u043e\u0439\u043b\u0435\u0440: \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 Apple \u00ab38 TOPS\u00bb \u0432\u0432\u043e\u0434\u044f\u0442 \u0432 \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u2013 \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043d\u0430 \u0447\u0438\u043f\u0435, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441.\u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0438\u0438 \u0438\u0437 \u0442\u0440\u0451\u0445 \u0441\u0442\u0430\u0442\u0435\u0439. \u0417\u0434\u0435\u0441\u044c \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u0435: \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u044b \u0441\u043b\u043e\u0439 \u0437\u0430 \u0441\u043b\u043e\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 Neural Engine \u0432 M4 \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0438\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Neural Engine?ANE \u2013 \u043d\u0435 GPU \u0438 \u043d\u0435 CPU. \u042d\u0442\u043e \u0434\u0432\u0438\u0436\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u043e\u0432: \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044c \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0444 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0435\u0433\u043e \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u0443\u044e \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u0443\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e. \u0412\u044b \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0435\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u0435\u043c. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0432\u0435\u0441\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0444, \u0430 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0435\u0451 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430.Apple \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0430 Neural Engine \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 A11 \u0432 2017 \u0433\u043e\u0434\u0443. \u0422\u043e\u0433\u0434\u0430 \u043e\u043d \u0441\u043e\u0441\u0442\u043e\u044f\u043b \u0438\u0437 \u0434\u0432\u0443\u0445 \u044f\u0434\u0435\u0440. \u0421 \u043a\u0430\u0436\u0434\u044b\u043c \u043d\u043e\u0432\u044b\u043c \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u043b\u0430 \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438:\u041c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 ANE \u0438\u0437 M4, \u043a\u043e\u0434\u043e\u0432\u043e\u0435 \u0438\u043c\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u2013 H16G. \u0423 \u043d\u0435\u0433\u043e 16 \u044f\u0434\u0435\u0440, \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0432 127 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u044b (DVFS), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u044f \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0434\u0430\u0435\u0442 \u0440\u043e\u0432\u043d\u043e \u0434\u043e 0 \u043c\u0412\u0442.\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b\u041c\u044b \u0431\u044b\u043b\u0438 \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u043c\u0438, \u043a\u0442\u043e \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 ANE.hollance\/neural-engine \u2014 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u041c\u044d\u0442\u0442\u0435\u0439\u0441\u0430 \u0425\u043e\u043b\u043b\u0435\u043c\u0430\u043d\u0441\u0430, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 ANE, \u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u044d\u0442\u043e \u043b\u0443\u0447\u0448\u0438\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 ANE.mdaiter\/ane \u2014 \u0440\u0430\u043d\u043d\u044f\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u043e \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u0443 \u0441 \u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043d\u0430 Python \u0438 Objective-C, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a ANECompiler \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447 \u0447\u0435\u0440\u0435\u0437 IOKit.eiln\/ane \u2014 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 ANE \u0434\u043b\u044f Linux, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0440\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433\u043e\u043c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Asahi Linux. \u041e\u043d \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u044f\u0434\u0440\u0430.apple\/ml-ane-transformers \u2014 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0435\u0440\u043e\u0432 \u043e\u0442 Apple, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043f\u043e\u0434 ANE. \u041e\u043d\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0442\u0430\u043a\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0430\u0442 \u0441 \u043a\u0430\u043d\u0430\u043b\u0430\u043c\u0438 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u0451\u0440\u0442\u043e\u043a 1\u00d71.\u041e\u0434\u043d\u0430\u043a\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0434\u043e \u043d\u0430\u0441 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433: (\u0430) \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a API _ANEClient \u043d\u0430 M4 \u0431\u0435\u0437 Core ML, (\u0431) \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0435\u0439 MIL-\u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, (\u0432) \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0438\u043a\u043e\u0432\u0443\u044e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u043e\u0431\u0445\u043e\u0434 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 Core ML \u0438 (\u0433) \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 ANE.\u041c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044f\u041c\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432:\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b dyld_info -objc \u0434\u043b\u044f AppleNeuralEngine.framework, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u0441\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u043c\u0435\u0442\u043e\u0434\u044b Objective-C;\u043f\u043e\u0434\u043c\u0435\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 (method swizzling), \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f Core ML \u043a \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c ANE;\u0430\u043d\u0430\u043b\u0438\u0437 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 E5, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c;\u0430\u043d\u0430\u043b\u0438\u0437 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: \u043c\u044b \u043c\u0435\u043d\u044f\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043c\u0430\u0442\u0440\u0438\u0446, \u0433\u043b\u0443\u0431\u0438\u043d\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u043e\u0432 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043d\u0430\u043b\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0443\u044e \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044e.\u0412 AppleNeuralEngine.framework \u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 40 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 ANEClient, ANEModel, ANERequest, ANEIOSurfaceObject, _ANEInMemoryModel \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435.\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0441\u0442\u0435\u043a\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0441\u0442\u0435\u043a ANE: \u043e\u0442 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e API Core ML \u0434\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f:\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Core ML \u2014 \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a ANE. \u041a\u043b\u0430\u0441\u0441 _ANEClient \u0438\u0437 AppleNeuralEngine.framework \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043e\u043c \u00ab\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u2192 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u2192 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u00bb. Core ML \u2014 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 \u043d\u0438\u043c._ANEClient: \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a Neural Engine\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043f\u043e\u043b\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 ANE \u0431\u0435\u0437 Core ML:\/\/ 1. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0431\u0449\u0435\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430id client = [_ANEClient sharedConnection];\/\/ 2. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044cid model = [_ANEModel modelAtURL:compiledURL key:@&#187;mykey&#187;];\/\/ 3. \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c MIL-\u0442\u0435\u043a\u0441\u0442 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b E5\/\/ \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u0435\u0448\u0435[client compileModel:model options:@{    @&#187;kANEFModelType&#187;: @&#187;kANEFModelMIL&#187;,    @&#187;kANEFNetPlistFilenameKey&#187;: @&#187;model.mil&#187;} qos:21 error:&amp;err];\/\/ 4. \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435 ANE[client loadModel:model options:@{} qos:21 error:&amp;err];\/\/ \u2192 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f programHandle, \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u2014 127\/\/ 5. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0431\u0443\u0444\u0435\u0440\u044b \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 IOSurfaceIOSurfaceRef surface = IOSurfaceCreate(props);id wrapped = [_ANEIOSurfaceObject objectWithIOSurface:surface];\/\/ 6. \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435id req = [_ANERequest requestWithInputs:@[wA, wB]    inputIndices:@[@0, @1]    outputs:@[wOut]    outputIndices:@[@0]    weightsBuffer:nil    perfStats:nil    procedureIndex:@0];\/\/ 7. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 ANE[client evaluateWithModel:model options:@{}    request:req qos:21 error:&amp;err];\/\/ 8. \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0437 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e IOSurfaceIOSurfaceLock(outSurface, kIOSurfaceLockReadOnly, NULL);float *data = IOSurfaceGetBaseAddress(outSurface);\/\/ &#8230; \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b &#8230;IOSurfaceUnlock(outSurface, kIOSurfaceLockReadOnly, NULL);\u0414\u043b\u044f \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f IOSurface \u2014 \u0442\u043e\u0442 \u0436\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u0443\u0440 GPU. \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 GPU \u0438 ANE \u0431\u0435\u0437 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043e\u0431\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 IOSurfaceRef.\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435: ANE \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0433\u043b\u0443\u0431\u0438\u043d\u0443 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0432 127 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0434\u043e 127 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435. \u042d\u0442\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u0435\u0439, \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e ANE \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0439 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e.MIL: \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u044f\u0437\u044b\u043aCore ML \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0432 ANE \u043d\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 ONNX \u0438\u043b\u0438 protobuf. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f MIL \u2014 Machine Learning Intermediate Language, \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0444\u043e\u0440\u043c\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f (SSA), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:program(1.3)[buildInfo = dict&lt;string, string&gt;({    {&#171;coremltools-version&#187;, &#171;9.0&#187;}})]{    func main&lt;ios18&gt;(        tensor&lt;fp16, [1, 1024, 1, 1024]&gt; x,        tensor&lt;fp16, [1, 1024, 1, 1024]&gt; w    ) {        bool tx = const()[val = bool(false)];        bool ty = const()[val = bool(false)];        tensor&lt;fp16, [1, 1024, 1, 1024]&gt; out =            matmul(transpose_x = tx, transpose_y = ty,                   x = x, y = w);    } -&gt; (out);}MIL \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u0438 \u0444\u043e\u0440\u043c\u0430. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u043c\u0435\u044e\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b. \u0412 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0442\u0435\u043d\u0437\u043e\u0440\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441 \u044f\u0432\u043d\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439.\u0424\u043e\u0440\u043c\u0430\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u043c\u0443 \u0434\u043b\u044f ANE \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e NCDHW + Interleave: [Batch, Channels, Depth, Height, Width]. \u0414\u043b\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1024 \u00d7 1024 \u0432 \u0447\u0435\u0442\u044b\u0440\u0451\u0445\u043c\u0435\u0440\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 [1, 1024, 1, 1024].\u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 E5\u041a\u043e\u0433\u0434\u0430 ANECompiler \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 MIL, \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b E5 \u2014 \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 FlatBuffers, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432:\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435: \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1024 \u00d7 1024 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b \u043e\u0431\u044a\u0451\u043c\u043e\u043c 2688 \u0431\u0430\u0439\u0442, \u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 128 \u00d7 128 \u2014 \u0432 2680 \u0431\u0430\u0439\u0442. \u0420\u0430\u0437\u043c\u0435\u0440\u044b \u043f\u043e\u0447\u0442\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442. \u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b E5 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f. \u041e\u043d \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430\u043c\u0438 \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432. \u042d\u0442\u043e\u0442 \u00ab\u043c\u0438\u043a\u0440\u043e\u043a\u043e\u0434\u00bb \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0447\u0435\u043c \u043d\u0430 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434.\u041e\u0442\u0441\u044e\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435 ANE, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432: \u0441\u0432\u0451\u0440\u0442\u043a\u0443, \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0418\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430\u043c\u0438 \u0444\u043e\u0440\u043c\u044b \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432. \u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b E5 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0438 \u043a\u0430\u043a \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0438\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u0430 \u043d\u0435 \u0441\u0430\u043c\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438: \u0421\u0432\u044f\u0442\u043e\u0439 \u0413\u0440\u0430\u0430\u043b\u044c\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0443 \u043d\u0435\u0451 \u0435\u0441\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a: MIL-\u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043a, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u043f\u0443\u0442\u044c \u043a \u043d\u0435\u0439. \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0433\u0434\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0436\u0434\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0433\u043e\u0432, \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0435\u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u044b.\u041c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 _ANEInMemoryModelDescriptor, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 MIL-\u0442\u0435\u043a\u0441\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438:id desc = [_ANEInMemoryModelDescriptor    modelWithMILText:milData      \/\/ NSData*, \u0430 \u043d\u0435 NSString*!    weights:weightDict            \/\/ NSDictionary*, \u0430 \u043d\u0435 NSData*!    optionsPlist:nil];id model = [_ANEInMemoryModel    inMemoryModelWithDescriptor:desc];[model compileWithQoS:21 options:@{} error:&amp;err];[model loadWithQoS:21 options:@{} error:&amp;err];[model evaluateWithQoS:21 options:@{}    request:req error:&amp;err];\u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0440\u0435\u043c\u044f \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c\u0438 \u043d\u044e\u0430\u043d\u0441\u0430\u043c\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0448\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043e\u0442\u043b\u0430\u0434\u043a\u0438:NSData, \u0430 \u043d\u0435 NSString. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 milText \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 NSData* \u0441 \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 UTF-8, \u0430 \u043d\u0435 NSString*. \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443, \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0431\u0435\u0437 \u044f\u0432\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.NSDictionary, \u0430 \u043d\u0435 NSData. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 weights \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u043c\u0435\u043d\u0430 \u0432\u0435\u0441\u043e\u0432 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 NSData, \u0430 \u043d\u0435 \u0435\u0434\u0438\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445.\u041e\u0431\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0443\u0442\u044c \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u043c. \u0414\u0430\u0436\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u00ab\u0432 \u043f\u0430\u043c\u044f\u0442\u0438\u00bb \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433. \u0415\u0441\u043b\u0438 \u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043d\u0435\u0442 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u043e&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-490577","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/490577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=490577"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/490577\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=490577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=490577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=490577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}