MLIR
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
ملخص
MLIR، أو التمثيل الوسيط متعدد المستويات، هو تنسيق تمثيل ومكتبة لأدوات مساعدة للمترجم تقع بين تمثيل النموذج والمترجمين/المنفذين منخفضي المستوى الذين يقومون بإنشاء تعليمات برمجية خاصة بالأجهزة.
تعد MLIR، في جوهرها، بنية تحتية مرنة للمترجمين الأمثل الحديثين. وهذا يعني أنه يتكون من مواصفات للتمثيلات المتوسطة (IR) ومجموعة أدوات التعليمات البرمجية لإجراء التحويلات على هذا التمثيل. (في لغة المترجم، أثناء انتقالك من تمثيلات المستوى الأعلى إلى تمثيلات المستوى الأدنى، يمكن أن تسمى هذه التحويلات "التخفيضات")
يتأثر MLIR بشكل كبير بـ LLVM ويعيد استخدام العديد من الأفكار الرائعة منه بلا خجل. يحتوي على نظام كتابة مرن، ويسمح بتمثيل وتحليل وتحويل الرسوم البيانية التي تجمع بين مستويات متعددة من التجريد في نفس وحدة التجميع. تتضمن هذه التجريدات عمليات TensorFlow، ومناطق حلقة متعددة السطوح المتداخلة، وحتى تعليمات LLVM وعمليات وأنواع الأجهزة الثابتة.
نتوقع أن يكون MLIR موضع اهتمام العديد من المجموعات، بما في ذلك:
- يتطلع الباحثون والمنفذون المترجمون إلى تحسين الأداء واستهلاك الذاكرة لنماذج التعلم الآلي
- يبحث صانعو الأجهزة عن طريقة لربط أجهزتهم بـ TensorFlow، مثل أجهزة TPU والأجهزة العصبية المحمولة في الهواتف وغيرها من أجهزة ASIC المخصصة
- الأشخاص الذين يكتبون روابط اللغة ويريدون الاستفادة من تحسين المترجمين وتسريع الأجهزة.
يحتوي النظام البيئي TensorFlow على عدد من المترجمين والمحسنين الذين يعملون على مستويات متعددة من مجموعة البرامج والأجهزة. نتوقع أن يؤدي الاعتماد التدريجي لـ MLIR إلى تبسيط كل جانب من جوانب هذه المكدس.

إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# MLIR\n\n\u003cbr /\u003e\n\nOverview\n--------\n\nMLIR, or Multi-Level Intermediate Representation, is a representation format\nand library of compiler utilities that sits between the model representation\nand low-level compilers/executors that generate hardware-specific code.\n\nMLIR is, at its heart, a flexible infrastructure for modern optimizing\ncompilers. This means it consists of a specification for intermediate\nrepresentations (IR) and a code toolkit to perform transformations on that\nrepresentation. (In compiler parlance, as you move from higher-level\nrepresentations to lower-level representations, these transformations can be\ncalled \"lowerings\")\n\nMLIR is highly influenced by [LLVM](https://llvm.org/) and unabashedly reuses\nmany great ideas from it. It has a flexible type system, and allows\nrepresenting, analyzing and transforming graphs combining multiple levels of\nabstraction in the same compilation unit. These abstractions include TensorFlow\noperations, nested polyhedral loop regions, and even LLVM instructions and fixed\nhardware operations and types.\n\nWe expect MLIR to be of interest to many groups, including:\n\n- Compiler researchers and implementers looking to optimize performance and memory consumption of machine learning models\n- Hardware makers looking for a way to connect their hardware to TensorFlow, such as TPUs, portable neural hardware in phones, and other custom ASICs\n- People writing language bindings that want to take advantage of optimizing compilers and hardware acceleration.\n\nThe TensorFlow ecosystem contains a number of compilers and optimizers that\noperate at multiple levels of the software and hardware stack. We expect the\ngradual adoption of MLIR to simplify every aspect of this stack."]]