Comments (4)
I came up a simpler test case.
import torch
import torch_mlir
torch_mlir.debug_trace_to_stderr()
mb = torch_mlir.ModuleBuilder()
N = 10
with mb.capture_function("arange_test", []) as f:
x = torch.arange(N)
f.returns([x])
It seems that even though the dispatch is going to the fallback kernel, when in the dispatcher::callBoxed function, the dispatchKey is c10::DispatchKey::Undefined which means that pytorch is unable to find a boxed implementation for this op. It seems like we might have to implement this op just like you implemented the copyUnderKernel. What do you think?
from torch-mlir.
Thanks - I believe that this gets routed to the "backendSelect" dispatch key, which is used for kernels that don't have tensor arguments (a heuristic on tensor arguments is what drives dispatch key selection). I know roughly what goes on there but this is the first I've run in to fixing it. I've got a version of PyTorch that dumps all of the dispatch metadata, which helps in these "where'd the kernel go" diagnoses. I just sent out/landed the other PRs and my queue is clear now. Let me take some time tomorrow to triage these (great!) test cases you've come up with.
from torch-mlir.
This appears to be a specific problem with kernels that have out parameters: aten::arange.start_out(Scalar start, Scalar end, Scalar step=1, *, Tensor(a!) out) -> (Tensor(a!))
The sequence on the stack is not as expected and something is getting inverted.
from torch-mlir.
Actually, looking at blame logs, may have been fixed two days ago (yay for procrastination). Rebasing and seeing...
from torch-mlir.
Related Issues (20)
- `make_simple_dynamo_backend` does not work for single argument models. HOT 2
- Compilation of Quantized Model Failed HOT 1
- Missing dtype support for OnnxToTorch HOT 3
- Strange issue related to `pyproject.toml` when building release wheels HOT 4
- iree-compiler failed to compile gpt2
- `NotSupportedError` error when executing Readme example "TorchScript ResNet18"
- onnx.Transpose version 1 not lowered (but it's essentially the same as version 13)
- boolean indexing ops: AtenNonzeroOp, AtenIndexTensorOp, AtenMaskedSelectOp
- QuantizedMLP currently failing in CI
- migrate to from member `x.cast<T>()` to `mlir::cast<T>(x)` HOT 1
- Update version pin to onnx 1.16 HOT 5
- Include Shape Information Into DecomposeComplexOps Patterns HOT 4
- onnx.MatMul version 1 not lowered (but it's essentially the same as version 13)
- Crash with TorchBackendToLinalgOnTensorsBackendPipeline
- link out of date
- unsupported aten.meshgrid operator HOT 1
- Trying to lower elided IR from torch onnx to torch causes crash HOT 2
- [ONNX] Systematically expand ONNX functions before conversion to Torch to avoid needing bespoke conversions HOT 12
- [onnx] Attempting to lower onnx mlir with elided attributes causes crash HOT 7
- Some issues with migrating to one-shot-bufferize HOT 11
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 torch-mlir.