-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Update wrapper #54
Comments
Absolutely! The cmake Script does need to be updated. Could you say what the issue specifically was? Happy to help get this updated |
OK. I just tried simply cherry picking stemann@e86f40e on top of https://github.com/IHPSystems/Torch.jl/tree/stemann/wrap_torch_1.10 and ran into quite a lot of merge conflicts. So I thought that there might be a small change to https://github.com/LaurentMazare/ocaml-torch/tree/main/src/gen which could make most of the merge conflicts go away :-) |
Making some progress - I've re-done the edits to the gen.ml script needed for outputting the current generated C api: https://github.com/IHPSystems/Torch.jl/tree/stemann/build_wrapper/build/wrapper_generator |
Why are some functions excluded? Is there a way to build wrappers for these as well? I also noticed that you'd redefined types in ocaml to match cpp |
Which functions do you mean ("functions excluded")? I just redefined types in ocaml to match the torch_api_generated files that are currently in this repo. - to be sure I could replicate the same process with a newer libtorch. |
Presumably "functions excluded" refers to https://github.com/IHPSystems/Torch.jl/blob/stemann/build_wrapper/build/wrapper_generator/bin/main.ml#L8, but my understanding is that list is integral to the build process of ocaml-torch and was implicitly used anyhow for the initial binding generation. Would it be easier to directly update to the latest binding generator and then try to revamp the Julia API if anything's changed? Also, would using https://github.com/LaurentMazare/tch-rs/tree/main/gen help since it appears to be more up to date than https://github.com/LaurentMazare/ocaml-torch/tree/main/src/gen? |
Yes, we should definitely use the up to date tch-rs wrapper generator - just wanted to reproduce the steps for generating 1.4 bindings. The wrapper generators are identical wrt. generating C code if one compares ocaml-torch for torch 1.10 with tch-rs for torch 1.10. |
Planned course of action:
|
Finally got around to doing something more wrt. bullet point 4 - cf. #56. |
Updated plan:
|
@stemann what can I do to get this through the finish line? Also we'd probably like to go with a recent 2.x release here soon |
This reminder helps a lot :-) But push for and remind me about #61 - and help review it - should help. 2.x should be done by first updating Torch_jll and its dependencies - cf. T/Torch/deps.md in Yggdrasil. |
With #61 now merged, all should be set to get points 4 and 5 completed 🚀 |
@DhairyaLGandhi Can you help with some hints for how to most easily update the wrapper (e.g. for Torch 1.10) ?
It seems there has been a change on the return type from void to int - is there some ocaml generator code somewhere?
I've compared the contents of c37c480 and https://github.com/LaurentMazare/ocaml-torch, and found that the original source for the wrapper seems to have been tag
0.8
, i.e. https://github.com/LaurentMazare/ocaml-torch/tree/85da09301df133e9d97a8340c1ce74a13651ca60/src/wrapperRe-applying the complete set of changes to the
build
dir. (e.g. stemann@e86f40e) on top of an updated ocaml-torch copy (https://github.com/LaurentMazare/ocaml-torch/tree/a6499811f40282a071179d4306afbbb6023dcc4a/src/wrapper) is not completely problem-free.Relates to JuliaPackaging/Yggdrasil#4554
The text was updated successfully, but these errors were encountered: