scorch
scorch copied to clipboard
libtorch C++ jni
The main changes:
- Tensor methods (https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/core/Tensor.h) and torch Functions.h are partially wrapped into Scala API (in src/main/scala/torch_scala/api).
- Tensor and Variable classes have been made generic (
Tensor[T, TT]
andVariable[T, TT]
) with templates T corresponded to data type and TT corresponded to device type (exampleTensor[Float, CUDA]
orTensor[Int, CPU]
) - Tensor has implicit wrappers in src/main/scala/torch_scala/api/aten/functions, including MathBackward.scala for backward methods.
- Sbt plugin for JNI code generation JniGeneratorPlugin and sbt plugin for cmake so lib building JniBuildPlugin in project directory.
- The old scorch code is partially adapted and completion are required.
Thank you very much for your code. I will definitely have a look at it. Keep you posted.
Is it possible to build without GPU support?
Yes, you can build it with https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-latest.zip Pull from the repo first and don't forget to export JAVA_HOME I would propose to discuss this project in skype, what do you think?
Nazar
чт, 4 апр. 2019 г. в 13:21, Koen Dejonghe [email protected]:
Is it possible to build without GPU support?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/botkop/scorch/pull/2#issuecomment-479839922, or mute the thread https://github.com/notifications/unsubscribe-auth/ABslRBWD1Y0CfguviXLxxewwWin_XOxiks5vddISgaJpZM4cI79k .
I created a gitter room. The button is on the readme. We can discuss there.