torch / tds

Torch C data structures
Other
80 stars 25 forks source link

allows cuda tensor types to be stored in tds structures #16

Closed soumith closed 7 years ago

soumith commented 8 years ago

Addresses https://github.com/torch/tds/issues/13

cc: @adamlerer @colesbury

colesbury commented 8 years ago

It's too bad that require 'tds' will now automatically require 'cutorch' if you have that installed. You might be able to avoid that by not caching the values of THTensor_retain/free/etc. and instead only accessing them when they're used

andresy commented 8 years ago

yeah, i wanted to avoid the cutorch dep; also, the require cutorch often slows down things and it is annoying when you are not using cuda.

ppaanngggg commented 8 years ago

Is there any way to check whether cutorch has been required?

If cutorch has been required then add cuda tensor support into tds.

rachtsingh commented 8 years ago

So I'm trying to patch this right now, but I'm running into an issue where calling THCudaTensor_retain segfaults. Does anyone know what's going on? My fork is here: https://github.com/rachtsingh/tds

Specifically, the error I get is

Program received signal SIGSEGV, Segmentation fault.
0x00002aaab4345af0 in THCudaTensor_retain () from /net/rcstorenfs02/ifs/rc_labs/rush_lab/torch/install/lib/libTHC.so