Skip to content

Commit f1945f5

Browse files
author
Nicholas Leonard
committed
fix unit test cuda
1 parent 9921353 commit f1945f5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4066,6 +4066,9 @@ function rnntest.VariableLength_ToFinal()
40664066
end
40674067

40684068
function rnntest.VariableLength_ToFinal_cuda()
4069+
if not rnn.cuda then
4070+
return
4071+
end
40694072
local nSamples = 10
40704073
local maxLength = 20
40714074
for run=1,10 do
@@ -4123,6 +4126,9 @@ function rnntest.VariableLength_FromFinal()
41234126
end
41244127

41254128
function rnntest.VariableLength_FromFinal_cuda()
4129+
if not rnn.cuda then
4130+
return
4131+
end
41264132
torch.manualSeed(2)
41274133
local nSamples = 10
41284134
local maxLength = 20

0 commit comments

Comments
 (0)