oneflow
oneflow copied to clipboard
OneFlow is a deep learning framework designed to be user-friendly, scalable and efficient.
Features: - Add multi-tensor Python frontend for SGD, Adam, Adamw. - Modify unittest for multi-tensor cases for SGD, Adam, Adamw and delete the duplicated test_multi_tensor_* unittest files. - Modify clip_grad_norm_np...
多进程分离编译。 核心思路:1)分发job而不是分发plan;2)在master上为每个task分配好task_id,然后分发给各个worker,worker进程在编译的时候直接使用这些task_id;3)regst_desc_id/mem_block_id/chunk_id在分配时分按照rank分段,保证不同rank上的plan肯定不会发生id冲突。
## Summary When we a building a `nn.graph` containing this module: ```python class OneFlowModelMixin(torch.nn.Module): from ..modeling_oneflow_utils import OneFlowModelMixin as ModelMixin class OneFlowUNet2DConditionModel(ModelMixin, ConfigMixin): ``` everything `ConfigMixin` defines is not accessible....
## Summary ``` [ERROR](GRAPH:UNetGraph_0:UNetGraph) building graph got error. Traceback (most recent call last): File "/home/caishenghang/one_diffuse/pipes/of-t2i.py", line 17, in images = pipe(prompt).images File "/home/caishenghang/.local/lib/python3.8/site-packages/oneflow/autograd/autograd_mode.py", line 154, in wrapper return func(*args, **kwargs)...
复现代码: ```python import oneflow as flow x = flow.tensor([2.4,3.5], device="cuda", dtype=flow.float16) with flow.amp.autocast("cuda", flow.float16): y = x.clone() y.fill_(2.36) print(y.dtype) ``` 上面代码pytorch不会出错,oneflow报以下错误: ```bash Traceback (most recent call last): File "test.py", line...
@BBuf fix https://github.com/Oneflow-Inc/oneflow/issues/9154 & https://github.com/Oneflow-Inc/OneTeam/issues/1652 div的问题其实就是设置scalar_div的输出是float就行,atan2的问题就在于在输入为只有一个元素的张量时需要广播一下(多个维度的时候torch不支持广播) ```python import torch as flow # import oneflow as flow import numpy as np x = flow.tensor([[1], [1]]).to("cuda") # x = flow.ones((2,3,4)).to("cuda") arr =...