diff options
author | Trevor Killeen <killeentm@gmail.com> | 2016-11-07 23:27:30 +0300 |
---|---|---|
committer | Trevor Killeen <killeentm@gmail.com> | 2016-11-12 00:22:57 +0300 |
commit | 72ce602240fecfba763225a1e785b752bf82e32a (patch) | |
tree | 751995cb98444a719a064ccffbafb37515c5fdfc /test | |
parent | 62a3961adfda4a41c098dbff4fdf11e4bf6b673b (diff) |
[cutorch rand2gen] move uniform, rand to generic
Diffstat (limited to 'test')
-rw-r--r-- | test/test.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test.lua b/test/test.lua index 00cfa66..1440984 100644 --- a/test/test.lua +++ b/test/test.lua @@ -2526,8 +2526,11 @@ function test.uniform() local max = min + torch.uniform() local t = torch.CudaTensor(sz1, sz2) - t:uniform(min, max) - checkIfUniformlyDistributed(t, min, max) + for _, typename in ipairs(float_typenames) do + local x = t:type(t2cpu[typename]) + x:uniform(min, max) + checkIfUniformlyDistributed(x, min, max) + end checkMultiDevice(t, 'uniform', min, max) end |