Skip to content
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

libtorch C++ jni #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

libtorch C++ jni #2

wants to merge 3 commits into from

Conversation

nazarblch
Copy link

The main changes:

  1. 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).
  2. Tensor and Variable classes have been made generic (Tensor[T, TT] and Variable[T, TT]) with templates T corresponded to data type and TT corresponded to device type (example Tensor[Float, CUDA] or Tensor[Int, CPU])
  3. Tensor has implicit wrappers in src/main/scala/torch_scala/api/aten/functions, including MathBackward.scala for backward methods.
  4. Sbt plugin for JNI code generation JniGeneratorPlugin and sbt plugin for cmake so lib building JniBuildPlugin in project directory.
  5. The old scorch code is partially adapted and completion are required.

@koen-dejonghe
Copy link
Member

Thank you very much for your code. I will definitely have a look at it. Keep you posted.

@koen-dejonghe
Copy link
Member

Is it possible to build without GPU support?

@nazarblch
Copy link
Author

nazarblch commented Apr 4, 2019 via email

@koen-dejonghe
Copy link
Member

I created a gitter room. The button is on the readme. We can discuss there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants