OneFlow has been open sourced for 528 days since July 31,2020. Today OneFlow v0.6.0 came out. Welcome to use OneFlow v0.6.0. We would love to hear feedback!
This version mainly updates three parts: framework, model, and OneFlow-ONNX. Hightlights include:
Improvements in static graphs and ConsistentTensor
Serving functionality as Nvidia Triton's backend
Richer visual pre-training models similar to torchvision and timm
Better OneFlow-ONNX conversion functionality
The following are the detailed release notes.
Framework
1. Performance Optimization of nn.Graph
Compared to v0.5.0, nn.Graph in v0.6.0 delivers a 10% speedup in training on models such as ResNet AMP and WDL, etc
Optimized nn.Graph's performance in high frequency iterative training scenarios
Redesigned the scheduling instructions of nn.Graph and refactored the interaction logic between Actor Graph and Eager VM so that the runtime execution of the Graph is asynchronous and parallel to Python input/output Tensor as much as possible
4. Performance Optimization of Eager's Memory Occupation
Optimized some operators' memory occupation during net training, making the same computing device run bigger models or data
Optimized the backward memory occupation of broadcast binary operators
Optimized the backward memory occupation of Slice operator
Optimized the memory occupation of LayerNorm operator
5. More Useful Features to Static Computation Graph (nn.Graph)
The newly added features are related to the effeciency, debugging, completeness, and usability of static graphs
To help the debugging of static graphs, we added the following features:
debug mode supports graph.debug(1) printing more information about the composition
Provided the environment variable ONEFLOW_DEBUG_PASS to show the changes in the computed graph before and after compile-time optimization
Added user-readable thread naming information to Nsight Profile for locating and retrieving target key thread locations
Added many static graph test cases and added automatic nn.Graph tests that accompany Eager tests
Provided graph.save() and load() interfaces to support the deployment of models (Serving) using nn.Graph
To do AMP acceleration on GPUs which use TensorCore, the environment variable ONEFLOW_ENABLE_NHWC is provided to indicate the CNN-related operators for channels last calculation
Enabled nn.Graph to support more usage scenarios:
Supported for Sparse Update Optimizer for sparse update of parameters in WDL scenarios
Supported for using the following nn.Module Containers with nn.Graph:
Sequential, ModuleList, ModuleDict, ParameterList, and ParameterDict
Supported for creating Optimizer in the init function of nn.Graph
Supported multiple parameters sharing the same Tensor with nn.Graph
Supported for scenarios where the actual number of processes is greater than the number of GPU devices
Supported more Inplace execution for Consistent SBP inference under nn.Graph
6. A Larger Number of Operators
Newly added operators: cumsum, meshgrid, linspace, diagonal, movedim, roialign, nms, arccos, and roll
Newly added operators: masked_fill, floordiv, glu, pool1d, pool2d, and pool3d
Supported one-click switching for the current torchvision library models by the command import oneflow as torch
7. User-Defined autograd.Function
Users can customize autograd.Function just like using Torch.
8. Added Basic Serving Functionality
Serving functionality of models is provided by OneFlow as Nvidia Triton's backend.
9. Added Some Functionalities of Tensor (ConsistentTensor)
Supported Tensor using 2-D SBP to represent arbitrary hybrid parallelism (such as a Linear operation that runs data parallelism in the row direction of the device matrix and model parallelism in the column)
Supported Tensor's conversion from arbitrary 1-D SBP to 2-D SBP (the network consists of a mixture of 1-D parallel and 2-D parallel)
Supported constructing ConsistentTensor from numpy
StyleNet: Suport Styles sketch, candy, mosaic, rain_princess, and undie
2. Implemented Data Augmentation Operations Similar to torchvision
For data augmentation operations like CenterCrop and ColorJitter similar to torvhvision, developers can run import flowvision as torchvisionto execute in most scenarios.
3. Implemented Advanced Data Augmentation Opertations Similar to timm
Advanced data augmentation opertations implemented in flowvision.data:
Mixup
CutMix
Random-Erasing
AutoAugment
RandAugment
AugMix
4. Separated the Layers Module and Provided a Plug-and-play Block when Building a Model