跳到主要內容

黃金級贊助商 - Skymizer 帶來 ONNC 通用的開放神經網路編譯器

「AI 創新需要開源生態系,而 ONNX 確保了 frameworks 之間的互通性,ONNC 的目標是將所有的 DLA ASIC 快速、簡單地與 ONNX 連結起來,確保所有的 DLA ASIC 都可以在 ONNX 上執行。」

由於 AI 的應用層面越來越廣,數百種新 AI 晶片將在不久的未來大量出現,目前市場上卻沒有一個能完整支援各家 DLA 的開源編譯器。根據統計,在 2018 年會有超過 34 家 IC 與 IP 廠商提供各式各樣的 AI 晶片與 deep learning accelerator (DLA) ASICs,因此急需一個開源的編譯器來支援各種不同的 AI 晶片。

成立於 2013 年的 Skymizer 一直都專注在 compiler 和 machine learning 領域,看到這個趨勢之後,建立了基於 ONNX 的編譯器 Open Nerual Network Compiler – ONNC,將所有的 AI 晶片與 ONNX 連結起來。

ONNX 是開放類神經網路交換格式,目前常見的 AI framework 如Caffe2、PyTorch…等等各有各的支持者,格式間互通性差,因此訓練出來的深度學習模型無法套用到別的 framework 上,但有了 ONNX,開發者可在不同格式之間輕鬆轉換。而透過 ONNX 支援多平台的特性,ONNC 可以支援各種不同的 AI frameworks,如 Caffe、Caffe2 與 PyTorch,幫助 DLA ASIC 廠商在短時間內就可以支援各種 AI frameworks,提升性能並縮短開發時間。  






想要更了解 ONNC,歡迎到 https://onnc.ai 追蹤最新的動態,
目前 ONNC 已在 GitHub https://repo.onnc.ai 釋出,而所有開發的相關討論,
將會在 mailing list 進行。


ONNC features:
Easy Backend Integration
ONNC is integrated with the LLVM bitcode runtime and compiler. If a DLA already supports the LLVM compiler, it can be connected to ONNC seamlessly. This helps most CPUs, GPUs, and DSPs ported to ONNC in a very short time. On the other hand, if a DLA has unique computation features and is not compatible to LLVM, ONNC also provides a modular framework to speed up the compiler development. DLA vendors can quickly customize an ONNC backend from a so called “vanilla” backend, which already provides some necessary optimization algorithms.


Reusable Compiler Optimizations
Two of ONNC’s contributions are dividing the AI compilation into several clear phases and giving the corresponding APIs for algorithm development.
There are five phases carefully defined, each of which is focused on a particular compiler problem: IR building, partitioning, scheduling, allocation, and code emitting.
ONNC also provides a series of optimization algorithms ready for use. They are general and reusable, including tensor selection, tensor liveness analysis, linear scan local memory allocation, etc. ONNC’s pass manager is flexible and similar to LLVM’s. AI researchers and engineers who are familiar with LLVM can intuitively contribute their general or target-specific optimization algorithms to ONNC.


Status and Future Work
Project ONNC is not mature yet.
Still, we have a lot to do and need the community together to make it better. In this preview release, we carefully designed the software architecture so as to simplify the future development and
maintenance.
The items we have done include:



  • Clear compilation phases and the corresponding APIs.
  • Well-defined and extensible intermediate representation (IR) of target-specific instructions.
  • A pass manager that supports automatic scheduling according to the dependency claimed by each pass.
  • A Sophon backend that supports BITMAIN AI ASIC.
  • Shim library such as ADT, Diagnostics, JSON, etc.

Project ONNC follows the “release early, release often” principle,
so the next release should come soon by the end of August.
We plan to finish the following items.

  • An x86 backend that enables the execution of AI models on an x86 machine. That backend should support both JIT and interpreter way of execution.
  • Improvements of memory allocation based on liveness analysis.

JOIN US
To keep up with the latest development or make suggestions, please join the ONNC mailing list. Also, please head over to the official website https://onnc.ai/ and GitHub https://repo.onnc.ai for more information.








留言

這個網誌中的熱門文章

你的程式碼,你的硬體,你的 AI。掌握你的晶片未來。Your code, your hardware, your AI. Own your silicon future.

在 Tenstorrent,我們從晶片設計的最底層開始打造一切。我們不只採用 RISC-V,更將我們的擴充指令集規格全數公開。指令集架構 (ISA) 與硬體架構也完全開源。整個軟體堆疊,從韌體 (firmware)、運算核心 (compute kernels) 到編譯器,全都放在 GitHub 上,並採用你真正能用的授權條款 (Apache 2.0 / GPL)。我們的下一代晶片 Blackhole,旨在掃除傳統設計的低效率,讓你直接掌控資料流 (dataflow),實現更高的速度與電源效率。 Blackhole p150 (單晶片,次世代架構): 32G 記憶體,512GB/s 頻寬 387 TFLOPS (BFP8) / 774 TFLOPS (FP8) 大規模可程式化 RISC-V 核心陣列 算子函式庫、編譯器,整個軟體堆疊 — 全部開源 (OSS) 以原生 CCL 達成真正的多卡擴充,拒絕使用 PCIe workaround $1399 Wormhole n300 (雙晶片,經市場驗證的成熟架構): 24G 記憶體,576GB/s 頻寬 262 TFLOPS (BFP8) / 466 TFLOPS (FP8) 大規模可程式化 RISC-V 核心陣列 算子函式庫、編譯器,整個軟體堆疊 — 全部開源 (OSS) 以原生 CCL 達成真正的多卡擴充,拒絕使用 PCIe 土炮 $1499 現已上市。 立即在官網購買運算卡,或在我們的雲端平台上體驗。 如果你受夠了嚴苛的 EULA (使用者授權合約) 或處處受限的記憶體;又或者,你一直想親自動手,深入探索驅動你類神經網路的 C++ 程式碼;甚至想挑戰組合語言,親眼見證它...

COSCUP 2025 Call for Proposals / 徵稿辦法

COSCUP 常規徵稿已於 2025-05-10 截止,接下來進入加碼徵稿階段。加碼徵稿是為了提升大會的稿件品質,依據投稿狀況(數量、品質)部分徵稿主題可能提前喊停。最遲請於 05 月 24 日(AoE) 前投稿,徵稿主題可參考下方列表。 The regular call for proposals (CFP) for COSCUP closed on May 10, 2025. We are now entering the bonus CFP phase to improve the quality of submissions. Some topics may close earlier than expected, depending on the current status of submissions (in terms of quantity and quality). Please submit by May 24 (AoE) at the latest. You may refer to the topic list below for inspiration. 開始投稿 Submit Your Proposal 提案須知 Things you may need to know 演講形式:預設為現場30分鐘演講包含QA,若有其他需求可於提案系統註明,由各主題主辦單位決定如何安排。 Talk Format : The default format is a 30-minute on-site talk, including Q&A. If you have other requirements, please indicate them while submitting your proposal. The final arrangement will be decided independently by the organizers of each topic. 語言:COSCUP 受眾包含海內外與會者,大會不限制發表語言但鼓勵以英語發表。大會將公布雙語議程表,請提供中英文版議程介紹。 L...

鑽石級贊助商 - KKBOX 帶你打造具備 NLP 功能的 Telegram Bot (上)

打造具備 NLP 功能的 Telegram Bot(上) 最近因為一些契機學了 Python 3,用它做了一個 Telegram Bot ( GitHub 連結 ),裡面用到 NLP Service,用上下兩篇文章記錄一下實作過程還有眉角。上篇首先教大家如何做一個最基本的回聲 Chatbot,接下來我們可以透過 NLP 服務,讓 Chatbot 根據使用者不同的訊息做回答,這樣就變成更加人性化的聊天機器人囉! 使用的工具及服務: Python 3 (for develop) pipenv (for dependency management) OLAMI (for NLP) ngrok (for testing) Step 1. Creating new bot Telegram 很有趣的地方在於,與其他通訊軟體(Line、Messenger)相比,開發者管理 Bot 的方式也是透過官方提供的一位 Bot 在處理的,它叫做 BotFather (眾 Bot 之父 XD)。如果已經有 Telegram 帳號,只要加 BotFather 為好友,就可以開始管理你的 Bot。 加入 BotFather 好友後,它會親切地問候,並告訴你他能為你提供什麼服務。 I can help you create and manage Telegram bots. If you're new to the Bot API, please see the manual ([https://core.telegram.org/bots](https://core.telegram.org/bots)). You can control me by sending these commands: /newbot - create a new bot /mybots - edit your bots [beta] /mygames - edit your games ([https://core.telegram.org/bots/games](https://core.telegram.org/bots/games)) [beta] Edit Bots /setname - change a bot's name /setdescr...