跳到主要內容

黃金級贊助商 - 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.








留言

這個網誌中的熱門文章

實戰 Vibe Coding:利用 Amazon Q Developer CLI 打造經典平台跳躍遊戲

本篇文章將介紹如何透過 Amazon Q Developer CLI 建構一款完整的 2D 平台跳躍遊戲,從初始生成、功能增強,到最終打造出具備多關卡、多樣互動元素的遊戲體驗。特別的是,過程中開發者並未撰寫任何一行程式碼,僅透過自然語言指令與 CLI 對話完成所有工作,實踐「Vibe Coding」( 氛圍編碼 )。 本文作者為 Haowen Huang, AWS Senior Developer Advocate. 擁有 20 年以上電信、互聯網以及雲端運算等行業架構設計、技術及創業管理等豐富經驗,曾任職於 Microsoft、Sun Microsystems 等企業,專注為遊戲、電商、媒體和廣告等企業客戶提供 AI/ML、數據分析和企業數字化轉型等解決方案諮詢服務。 引言 本篇文章 ( English Version ) 將介紹如何使用 Amazon Q Developer CLI ,以 無需撰寫任何程式碼 的方式,打造一款經典的 2D 平台跳躍遊戲。透過「Vibe Coding」( 氛圍編碼 ) 的開發流程,開發者可以藉由簡單的語言提示詞 (prompt),逐步完成從遊戲雛型、功能擴充到完整關卡設計的開發流程。 整體開發流程將分為三個步驟: 1. 生成遊戲雛型 2. 功能擴充強化與畫面調整 3. 導入參考架構建立完整遊戲 環境建置 使用者需先安裝並設定 Amazon Q Developer CLI 。對於 macOS 使用者,可透過下列步驟完成安裝: 下載並安裝 Amazon Q Developer CLI 登入 Builder ID 完成認證 開啟終端機控制與無障礙設定 執行 q doctor 指令檢查 Amazon Q Developer CLI 是否安裝成功: 遊戲開發方面,建議使用 Python 語言與 Pygame 套件,可透過下列指令完成安裝;Pygame 提供以下功能支援: 畫面與動畫渲染 音效播放 鍵盤與搖桿輸入控制 物理模擬與碰撞偵測 多種媒體格式支援(圖片與音效) $ q doctor $ pip install pygame 第一步驟:初步生成遊戲雛型 透過簡單的一句 prompt,Amazon Q Developer CLI 結合 Pyg...

利用 Jitsi 建立個人化的視訊會議平台

  近期因為疫情的關係,越來越多企業開始實施分流或在家工作,視訊會議的需求也日益增加。 在商用解決方案選擇上,有不少企業會選擇知名品牌的產品,例如  Cisco Webex 、 Google Meet 、 Microsoft Teams 、 Zoom  都是很不錯的方案。 KKBOX 集團在去年便試行及做好充分 work from home 的準備,今年五月也因應疫情升溫,全員 work from home 至今兩個月有餘。 當然,取之 Open Source,也要對社群有些貢獻。在這一屆 COSCUP,我們要來介紹 Open Source 圈中也很知名,效果也很不錯的一套視訊會議平台: Jitsi 。 除了基本的視訊會議功能外,在最後我們也會示範如何透過 Jitsi 畫面輸出到 YouTube/Twitch 或其他支援 RTMP 的平台進行直播。 由於篇幅有限,且 Jitsi 可以調整的細節非常多。今天我們純粹很快速的示範,如何簡單的建置出一個 Jitsi 環境,並提供單場會議內容錄影或直播。 Jitsi 的文件可以在 這裡 找到。 今天透過 AWS Lightsail 的 $10/month instance(1 core CPU + 2GB RAM + 60GB SSD),作業系統則是 Ubuntu 20.04 來示範。當然,使用其他 VPS 亦可,大同小異,這邊直接跳過 VPS 相關的建置過程。 *firewall 相關資料參考 這裡 及 這裡 。 針對系統做必要的更新 基本的 apt repository 更新: $ sudo apt update 因為後面要示範的會議錄影及直播需要使用 ALSA loopback device,如果是 EC2 or Lightsail 則需要額外安裝 generic kernel( 註 ): $ sudo apt install linux-image-generic linux-headers-generic linux-image-extra- virtual 接著做系統套件們的更新: $ sudo apt dist-upgrade $ sudo apt autoremove 如果是 AWS EC2 or Lightsail 則需要另外再將預設的 AWS optimized kernel...

你所不知道的 foodpanda

  2020 左右,隨著新冠疫情流行,台灣也逐漸流行起一股懶人旋風。懶懶躺在沙發上,動動手指滑滑螢幕,生鮮或美食就能快速又安全地由可愛的粉紅色熊貓外送員送達您門口。多數人知道 foodpanda 是台灣最大生鮮美食外送平台,也不少人知道 foodpanda 在台灣不斷擴張業務範圍,但 foodpanda 也有許多台灣科技圈所不知道的事。 例如,foodpanda 其實並非台灣本土廠商,也非只專注在亞洲區域。foodpanda 隸屬於德國 Delivery Hero 集團,業務橫跨歐洲、亞洲、美洲及北非,旗下更有十多個生鮮美食外送品牌。除此之外,foodpanda 於 2021 年時也在台灣正式成立全球第三個 Tech Hub。做為四大產品 RD 研發中心之一,台灣與德國柏林、新加坡及土耳其伊斯坦堡的人才緊密地合作,專注於打造 end-to-end 的顧客體驗。諸如月費方案 Panda Pro、外帶自取、餐廳內用 (目前仍未在台灣上市) 等功能。期待能持續吸收優秀人才、與其它三個跨國研發中心合作,打造後疫情時代新的成長引擎。 事實上,台灣的 foodpanda 研發團隊並不僅止於打造台灣本土產品。反之,我們所建立的平台及產品,已成功於近 20 個國家、10 個品牌上市。要在快速的步調下,打造持續進步且符合不同國家文化客戶需求的產品,我們依靠的是 專案團隊成員一條龍組合 從 Product Manager、Engineering Manager、iOS/Android/Web/Backend developer、QA、Product Designer、Product Analyst 全都在同一個 product line squad。讓相同產品的團隊成員能緊密合作、第一手快速了解市場、滿足需求。 國際專業團隊緊密合作 foodpanda 的 iOS/Android/Web/Backend 等專業工程師,都各自設有其跨 squad 的 chapter 組織。讓工程師能在專案團隊以外,有跨國跨團隊專業能力交流的機會。在 chapter 中,相同技術域領的專家們,會一起制定共同的實作標準、分享在專案中遇到類似的挑戰,並且找出可能的應對方案。因此,在 foodpanda 我們不只打產品專案團隊的速度戰、還打整個集團的整合能力團體戰,讓德國、新加坡、台灣、伊斯坦堡的工程師...