MLIR
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ภาพรวม
MLIR หรือ Multi-Level Intermediate Representation คือรูปแบบการนำเสนอและไลบรารีของยูทิลิตี้คอมไพลเลอร์ที่อยู่ระหว่างการแสดงโมเดลกับคอมไพเลอร์/เอ็กซีคิวเตอร์ระดับต่ำที่สร้างโค้ดเฉพาะฮาร์ดแวร์
หัวใจสำคัญของ MLIR คือโครงสร้างพื้นฐานที่ยืดหยุ่นสำหรับคอมไพเลอร์ที่ได้รับการปรับให้เหมาะสมสมัยใหม่ ซึ่งหมายความว่าประกอบด้วยข้อกำหนดสำหรับการเป็นตัวแทนระดับกลาง (IR) และชุดเครื่องมือโค้ดเพื่อทำการแปลงการเป็นตัวแทนนั้น (ในสำนวนคอมไพเลอร์ เมื่อคุณย้ายจากการเป็นตัวแทนระดับสูงกว่าไปสู่การเป็นตัวแทนระดับล่าง การแปลงเหล่านี้สามารถเรียกว่า "การลดระดับ")
MLIR ได้รับอิทธิพลอย่างมากจาก LLVM และนำแนวคิดดีๆ มากมายกลับมาใช้ใหม่อย่างไม่สะทกสะท้าน มีระบบประเภทที่ยืดหยุ่น และช่วยให้สามารถแสดง วิเคราะห์ และแปลงกราฟที่รวมนามธรรมหลายระดับไว้ในหน่วยการคอมไพล์เดียวกัน นามธรรมเหล่านี้รวมถึงการดำเนินการ TensorFlow, ขอบเขตของลูปโพลีฮีดรัลแบบซ้อน และแม้แต่คำสั่ง LLVM และการดำเนินการและประเภทของฮาร์ดแวร์แบบคงที่
เราคาดหวังว่า MLIR จะเป็นที่สนใจของหลายกลุ่ม รวมถึง:
- นักวิจัยและผู้ดำเนินการคอมไพเลอร์ที่ต้องการเพิ่มประสิทธิภาพและการใช้หน่วยความจำของโมเดลการเรียนรู้ของเครื่อง
- ผู้ผลิตฮาร์ดแวร์กำลังมองหาวิธีเชื่อมต่อฮาร์ดแวร์กับ TensorFlow เช่น TPU, ฮาร์ดแวร์ประสาทแบบพกพาในโทรศัพท์ และ ASIC แบบกำหนดเองอื่นๆ
- ผู้ที่เขียนการเชื่อมโยงภาษาที่ต้องการใช้ประโยชน์จากการปรับแต่งคอมไพเลอร์และการเร่งความเร็วด้วยฮาร์ดแวร์
ระบบนิเวศของ TensorFlow ประกอบด้วยคอมไพเลอร์และเครื่องมือเพิ่มประสิทธิภาพจำนวนหนึ่งที่ทำงานบนสแต็กซอฟต์แวร์และฮาร์ดแวร์หลายระดับ เราคาดหวังว่าการนำ MLIR มาใช้อย่างค่อยเป็นค่อยไปจะทำให้ทุกแง่มุมของสแต็กนี้ง่ายขึ้น

เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[null,null,["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],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."]]