Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixing HalfTensor FIXME #419

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ require('cunn.DataParallelTable')

nn.Module._flattenTensorBuffer['torch.CudaTensor'] = torch.FloatTensor.new
nn.Module._flattenTensorBuffer['torch.CudaDoubleTensor'] = torch.DoubleTensor.new
-- FIXME: change this to torch.HalfTensor when available
nn.Module._flattenTensorBuffer['torch.CudaHalfTensor'] = torch.FloatTensor.new
nn.Module._flattenTensorBuffer['torch.CudaHalfTensor'] = torch.HalfTensor.new
2 changes: 1 addition & 1 deletion test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ local t2cpu = {
local function checkHalf()
if cutorch.hasHalf then
table.insert(typenames, 'torch.CudaHalfTensor')
t2cpu['torch.CudaHalfTensor'] = 'torch.FloatTensor'
t2cpu['torch.CudaHalfTensor'] = 'torch.HalfTensor'
end
end

Expand Down