Comments (4)
原因是 torch 的 diagonal 操作是个 view op:
import torch as torch_original
print("torch test:")
inputs = torch_original.rand(3, 3)
y = inputs.diagonal(0)
print(y.is_contiguous()) # False
print(y.shape) # torch.Size([3])
print(y.stride() # (4,)
更多维度的时候只需要让 [:-2] 维度上的 stride 值为1就可以。
from oneflow.
oneflow里有没有对应的view op?
from oneflow.
原因是 torch 的 diagonal 操作是个 view op:
import torch as torch_original print("torch test:") inputs = torch_original.rand(3, 3) y = inputs.diagonal(0) print(y.is_contiguous()) # False print(y.shape) # torch.Size([3]) print(y.stride() # (4,)更多维度的时候只需要让 [:-2] 维度上的 stride 值为1就可以。
fill_ 是 SupportNonContiguous 的吧,这里 oneflow_inputs.diagonal(0)
返回一个 non contiguous 的 tensor,按理说 fill_ 不应该出错?
from oneflow.
fill_ 是 SupportNonContiguous 的吧,这里
oneflow_inputs.diagonal(0)
返回一个 non contiguous 的 tensor,按理说 fill_ 不应该出错?
哎是的,我之前没编译以为 diagnonal 不是 view 操作。
应该是 fill_ 本身的问题,看 kernel 是不支持非连续输入的,但注册的地方有 SupportNonContiguous
,和其他的 view op一起使用一样会计算出错。
from oneflow.
Related Issues (20)
- 编译diffusion模型失败
- Missing range check for negative index parameter in oneflow.scatter. HOT 1
- For 'oneflow.scatter_nd', when index parameter exceeds the range of shape, core dumped happen without any error message. HOT 1
- Unstable results in sin/arcsin/arccos calls
- When nan is used as the min or max argument to oneflow.clamp, the wrong result is printed HOT 2
- oneflow.log10 has accuracy difference between cpu and cuda
- oneflow.softmax perform differently between cpu and cuda.
- oneflow.softplus has accuracy difference between cpu and cuda
- oneflow.quantile perform differently between cpu and cuda.
- oneflow.argmax perform differently between cpu and cuda. HOT 1
- oneflow.amax perform differently between cpu and cuda when dim=1 HOT 1
- oneflow.amax/amin perform differently from pytorch
- oneflow.max/min perform differently between cpu and cuda. HOT 1
- oneflow.argsort perform differently between cpu and cuda when dim=1 HOT 2
- oneflow.gt/ge/greater/greater_equal perform differently between cpu and cuda.
- oneflow.cast perform differently between cpu and cuda
- core dumped occurs when an empty array is processed with oneflow.tensordot and the dims argument is 2
- core dumped occurs when an empty array is processed with oneflow.dot
- oneflow.matmul doesn't work for this situation
- [Documention Issue]: Incorrect documentation formula for oneflow.square
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oneflow.