-
Notifications
You must be signed in to change notification settings - Fork 8
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
LP-SparseMap as a Pytorch layer? #1
Comments
Hi, I haven't looked into DLpack yet, but: LP-SparseMAP can already be used as a pytorch layer, there is no need for special bindings. The example [1] shows how to compute the solution and a Jacobian-vector product; you can build a pytorch.autograd.Function that calls the I'm a bit busy at the moment but I can provide an example in a few days. [1] https://github.com/deep-spin/lp-sparsemap/blob/master/examples/sequence.py |
I understand. |
This would be great, but seems to me q difficult, since it would require a full rewrite of AD3 for the GPU: including MAP/QP algorithms for the factors, the active set algorithm, and ADMM. These algorithms are not very well suited for GPU computing. Moreover, if trying to solve a batch of different factor graphs at the same time, vectorization would be nontrivial beyond special cases, so a general solution might be trickier than it seems. Have you already determined that SparseMAP on the CPU is your bottleneck? |
Well no, but your method is said to be end-to-end and usually that means that all the computation is done on the GPU, one of the many bottlenecks for RL for example is the fact that you have to step inside the environment (using the CPU). |
Hey,
Recently Tensorflow and Pytorch have implemented a way to pass tensors from one framework to another using DLpack, and I was wondering if it is possible to somehow use your code in a pytorch model with this type of binding.
Thanks,
Ohad
links:
https://tvm.apache.org/2018/08/10/DLPack-Bridge
tensorflow/tensorflow#24453
The text was updated successfully, but these errors were encountered: