Closed VirxEC closed 8 months ago
aten::amax.out
This I think can be implemented easily - I suggest look on other examples in the code like max.
aten::_copy_from_and_resize
is trickier
Cool! I might get around to it, but I've very unfamiliar with this project and its structure so it will take a while before I have anything working/presentable.
I should mention this in the error message:
NotImplementedError: Could not run 'aten::_copy_from_and_resize' with arguments from the 'CPU' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). If you are a Facebook employee using PyTorch on mobile, please visit https://fburl.com/ptmfixes for possible resolutions. 'aten::_copy_from_and_resize' is only available for these backends: [PrivateUse1, BackendSelect, Python, FuncTorchDynamicLayerBackMode, Functionalize, Named, Conjugate, Negative, ZeroTensor, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradHIP, AutogradXLA, AutogradMPS, AutogradIPU, AutogradXPU, AutogradHPU, AutogradVE, AutogradLazy, AutogradMeta, AutogradPrivateUse1, AutogradPrivateUse2, AutogradPrivateUse3, AutogradNestedTensor, Tracer, AutocastCPU, AutocastCUDA, FuncTorchBatched, FuncTorchVmapMode, Batched, VmapMode, FuncTorchGradWrapper, PythonTLSSnapshot, FuncTorchDynamicLayerFrontMode, PythonDispatcher].
follow the implementions of MPS backend in pytorch source code, we can copy that in pytorch dlprimitives, adding new operator support for aten::_copy_from_and_resize
Fixed in be908fd875410df72909b14727ca23a8371b42cf
It seems you didn't push that, because I can't find the commit when pulling
Ohhh you are right: https://github.com/artyom-beilis/pytorch_dlprim/commit/be908fd875410df72909b14727ca23a8371b42cf pushed
in torch 1.13 version, there is no such problem like "some ops fall back to cpu and cpu does not support such ops", in torch 2.1, I encountered such problems. It seems we support torch 2.1 better now. still not know why in torch 2.1 so much new ops emerge
When I run my test model (PyTorch 1.13.0 + SB3) I get this error:
Most notably the operators
aten::amax.out
andaten::_copy_from_and_resize
aren't supported.