-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] tensor type Tensor[(1), float64] has 1 dimensions, while float64 has 0 dimension #15282
Comments
Here is my analysis after carefully reading the source code. reporter->Assign(types[1], TensorType({data->shape[axis]}, data->dtype));
reporter->Assign(types[2], TensorType({data->shape[axis]}, data->dtype));
reporter->Assign(types[3], TensorType(data->shape, data->dtype)); , which calls No matter what, I believe this is a TVM bug in type resolution. |
Update: In the above analysis, I summarize that |
Update again (could be the final update): if dtype == "float64":
typed_data = _expr.const(np.float64(data), dtype=dtype) However, For instance, import numpy as np
x_ = np.array([1.,2.])
print(np.float64(x_))
y_ = np.array([1.])
print(np.float64(y_)) In the above function, the output is
This weird thing only happens in |
torch.nn.functional.instance_norm(args[0], use_input_stats=True) and input_dtype=float64 wil lead to a crash:
Error: tensor type
Tensor[(1), float64]
has 1 dimensions, whilefloat64
has 0 dimensionActual behavior
Steps to reproduce
Triage
The text was updated successfully, but these errors were encountered: