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

add raw bindings for THNN #63

Closed
stites opened this issue Jan 22, 2018 · 4 comments
Closed

add raw bindings for THNN #63

stites opened this issue Jan 22, 2018 · 4 comments
Assignees
Projects

Comments

@stites
Copy link
Member

stites commented Jan 22, 2018

No description provided.

@stites stites created this issue from a note in hasktorch (To Do) Jan 22, 2018
@AlejandroCatalina
Copy link
Contributor

AlejandroCatalina commented Jan 22, 2018

I've been working on this and I think I've made some progress. I note a few things regarding the code generator and THNN:

  1. It iterates by default through all generic types, generating code for all generic types. I am not sure whether this is also the case for THNN or not (apparently it only generates Float types). We should note that this module has a different structure as the others (it has a single THNN.h, whilst the others have THDouble.h, THFloat.h, etc, and many .c files).
  2. I've only worked so far on THNN (THCUNN is very similar, with new types).
  3. I needed to add many new types to the generator to parse. Please check whether the style and place of the additions is okay.

You can see the commit in 990e994 . If you like the work so far (it is still wrong in so many ways, but I think it may be a work in progress in the right direction) and any of you has the time to help me out I can make a WIP PR so that everybody may help (probably @austinvhuang ?). There are tests missing and many things, but these are baby steps.

Next steps would include adding a type implementation to raw/src/types/TorchStructs.hs and raw/src/types/THTypes.hs, right?

In any case, I will keep working on this as I discover new things about the THNN module (it would be quite useful to start preparing some NN bindings, in the end is what everyone looks for).

Have I forgotten anything important? Do you have any useful pointers? Is this just wrong and I should remove the branch and move on to other things?

@stites
Copy link
Member Author

stites commented Jan 22, 2018

@o1lo01ol1o -- you might be interested in some of the output files as well.

@AlejandroCatalina
Copy link
Contributor

AlejandroCatalina commented Jan 28, 2018

THNN bindings addressed in #65.

@AlejandroCatalina AlejandroCatalina moved this from To Do to In Progress in hasktorch Jan 29, 2018
@AlejandroCatalina AlejandroCatalina self-assigned this Jan 29, 2018
@stites stites changed the title add raw bindings for THNN and THCUNN add raw bindings for THNN Jan 31, 2018
@stites
Copy link
Member Author

stites commented Jan 31, 2018

closing this and opening up a new ticket for THCUNN bindings

@stites stites closed this as completed Jan 31, 2018
@stites stites moved this from In Progress to Done in hasktorch May 3, 2018
stites pushed a commit to stites/hasktorch that referenced this issue Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
hasktorch
  
Done
Development

No branches or pull requests

2 participants