TVM開發報告 - 2019年2月
今年我們嘗試定期釋出TVM的月度報告,希望能幫助大家更好地跟進社群的工作。二月份TVM釋出了新版本,增加了包括Quantization,AutoDiff,ADT在內的諸項功能,同時也在不斷改進可用性和覆蓋度。
專案主頁:TVM Stack
Github:dmlc/tvm
TVM社群
在2019年二月,我們成功釋出了TVM v0.5 (release notes ) 並且制定了0.6版本的roadmap .
歡迎ReviewerZhao Wu ,CommitterJared Roesch ,以及PMC成員Lianmin Zheng 加入社群。
TVM社群投票通過了加入Apache Incubation的倡議(#2543 ). Apache基金會的Markus Weimer幫助我們在[email protected] 上發起了討論,並收集反饋和建議。進入Apache Incubation的官方投票正在general@郵件列表上進行。
功能和改進
TVM社群正在持續增強對各類deep learning框架的支援。為了提供更好的程式設計介面,我們改進了Hybrid Script,並且在前端增加了對Rust語言的支援。二月份新增加的主要功能還包Quantization,自動求導(AutomaticDifferentiation)以及對Algebraic Data Types(ADT)的支援。
另外就DL/ML Compiler的最新技術和設計,我們注意到在TVM官方論壇上有一些富有啟發性的討論,我們也歡迎更多人的參與到類似的交流中來。
下面列舉了二月份主要的功能、改進及相關技術細節。完整的報告請參考TVM Monthly - Feb 2019
Operator Support
-
A special operator
annotation.stop_fusion
to prevent it being fused with previous expressions (#2624). -
batch_matmul
supported (#2561 ). -
reverse_reshape
supported (#2503 ). - Faster-RCNN proposal operator for CUDA (#2420 ).
-
Vision operator for YOLO
yolo_reorg
(#1941 ). -
slice
operator for MXNet (#2662 ). -
arange
supported (#2621 ). -
Vision operator
roi_align
(#2618 ). -
where
operator for MXNet (#2647 ).
User Interface and Frontend
-
Introduced
HybridModule
(#2477 ) so that normal TVM schedule can be compiled to hybrid target, run and dumped to Hybrid Script. - Most frameworks have been supported in Relay, including ONNX, Keras, Tensorflow, Caffe2, CoreML, NNVMv1, MXNet (#2246 ). Siju is working on DarkNet.
- Relay now supports saving and loading parameter dictionaries. (#2620 )
- Rust frontend (#2292 ).
- We are now supporting Tensorflow saved model for NNVM (#2493 ). Relay support is ongoing (#2586 ).
-
Add
max_num_threads
to Hybrid Script, which allows users to get max number of threads for GPU targets (#2672 ).
Runtime and Hardware Support
- RFC for bringing TVM to Bare-Metal devices (#2563 )
- Make external library extend TVM’s NDArray more easily (#2613 ).
Performance Improvement
- AlterOpLayout pass is now enabled for x86 on Relay (#2585 ). It is essential to get decent performance for CNN-based model on Intel CPUs.
Documents and Tutorials
- Tutorials for deep learning frameworks support in Relay.
- Tutorial for running AutoTVM with Relay (#2594 ).
- Document for Algebraic Data Types (#2575 ).
High-level Optimizations
- An optimization pass to eliminate expressions which have the same functionality and same inputs (#2639 ).
- Provided a pass to calculate the number of multiply-accumulate operations in a network (#2609 ).
- Algebraic Data Types (ADT) support (#2442 ,#2575 ). ADT provides an expressive, efficient, and safe way to realize recursive computation (e.g., RNN). Refer to https:// docs.tvm.ai/langref/rel ay_adt.html for more information.
- As a part of Relay’s automatic differentiation system, we are adding primal gradients for Relay operators. Please refer to#2562 for tracking the progress. (Help wanted ). For automatic differentiation in Relay, also seeAutomatic differentiation for tensor expressions ,Higher order reverse mode automatic differentiation that work with control flow ,Tensor Expression level automatic differentiation
- Low-bit quantization supported (#2116 ). The workflow includes annotation, calibration and transformation. Please also seeData-Aware Calibration for calibration algorithm improvement (Help wanted ).
Tensor Expression
- RFC for formalizing Integer Arithmetic Analysis (#2588 ).It is aiming to perform better context-dependent analysis, boundanalysis, centralized arithmetic logic and arithmetic simplification.