Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/soumith/cudnn.torch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoumith <soumith@fb.com>2016-08-09 19:05:28 +0300
committersoumith <soumith@fb.com>2016-08-09 19:05:28 +0300
commit59ac9afc330e3b848fb204afeb8d6f2835902540 (patch)
treeba9468956739fbd3742d4b3349f4b5164685bda6
parent556c272b8be5b3b61a8f1f2b8a7daf8ce73681c1 (diff)
check for half with cutorch.hasHalf
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 0e3765b..f8dd115 100644
--- a/init.lua
+++ b/init.lua
@@ -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'),
}