lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi, thank you for your efforts to keep Torch up to date! I really appreciate it. At some point I was naively thinking of learning C in order to improve Torch. Please get in contact with Jean Senellart who is currently also involved in maintaining Torch. You can easily find him in Torch gitter  channel.

Best, 
Pavel

Sent from my BlackBerry 10 smartphone.
  Original Message  
From: Dibyendu Majumdar
Sent: Saturday, May 12, 2018 14:28
To: Lua mailing list
Reply To: Lua mailing list
Subject: Torch on Lua / Ravi

Hi,

As part of the Ravi-Distro
(https://github.com/dibyendumajumdar/ravi-distro) project I have been
working on buildingTorch packages. I wanted to give a quick update.

* I have made changes to Torch
(https://github.com/dibyendumajumdar/ravi-torch7) to make it work
correctly when compiled using MSVC on Win64. In the process I upgraded
the C code to a recent version in PyTorch. The main issue with the
original version was the assumption that 'long' C type is 64-bits.
This issue appeared to be fixed in PyTorch but not in Lua Torch.

* Secondly I have just migrated the Torch-NN
(https://github.com/dibyendumajumdar/ravi-torch7-nn) package from FFi
to Lua C api. This became necessary as the luaffi project's code
generation on Win64 is not robust in terms of Win64 exception
management. Basically JIT code on Win64 needs to inform the OS about
the stack - if this is not done, when Lua does a longjmp, the program
attempts to do a stack unwind and corrupts the stack. This is an
ongoing issue with LLVM code generation on Win64 too. LuaJIT appears
to handle this correctly.

Migrating to Lua C api is also better for longer term maintenance.

* I am also in the process of migrating the Torch-Cephes package from
FFI to Lua C api.

Torch is a great asset for Lua and I feel we cannot let it die - so
please join the effort if you want to see Torch maintained for Lua.
Sadly PyTorch is diverging now - the Torch-NN api is for example
deemed 'legacy'. While I am trying to ensure that the underlying C
libraries are at the least upgraded for Torch - this is going to be
increasingly difficult if PyTorch starts to change the apis.

Regards
Dibyendu