diff options
author | soumith <soumith@fb.com> | 2016-08-09 19:05:28 +0300 |
---|---|---|
committer | soumith <soumith@fb.com> | 2016-08-09 19:05:28 +0300 |
commit | 59ac9afc330e3b848fb204afeb8d6f2835902540 (patch) | |
tree | ba9468956739fbd3742d4b3349f4b5164685bda6 | |
parent | 556c272b8be5b3b61a8f1f2b8a7daf8ce73681c1 (diff) |
check for half with cutorch.hasHalf
-rw-r--r-- | init.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -37,7 +37,7 @@ cudnn.typemap = { } local sizeofmap = { - ['torch.CudaHalfTensor'] = ffi.sizeof('half'), + ['torch.CudaHalfTensor'] = cutorch.hasHalf and ffi.sizeof('half') or 2, ['torch.CudaTensor'] = ffi.sizeof('float'), ['torch.CudaDoubleTensor'] = ffi.sizeof('double'), } |