Skip to content

Commit ef43a1c

Browse files
authored
Merge pull request #51 from mbajkowski/patch-1
removed cunn dependencies from cpu demo
2 parents 0b59353 + d12a0c4 commit ef43a1c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

profiling/linear-cpu.lua

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11

22
require 'sys'
3-
require 'cunn'
3+
require 'nnx'
4+
--require 'cunn'
45

5-
cutorch.setDevice(arg[1] or 1)
6-
print('DEVID = ' .. cutorch.getDevice())
6+
--cutorch.setDevice(arg[1] or 1)
7+
--print('DEVID = ' .. cutorch.getDevice())
78

89
bs = 512
910
ninputs = 4096
@@ -28,14 +29,13 @@ N=5
2829
-- pre-alloc states:
2930
n:forward(i)
3031
n:backward(i, n.output)
31-
cutorch.synchronize()
32+
--cutorch.synchronize()
3233

3334
sys.tic()
3435
for t = 1,N do
3536
n:forward(i)
3637
n:backward(i, n.output)
3738
end
38-
cutorch.synchronize()
39+
--cutorch.synchronize()
3940
t = sys.toc()/N
4041
print('Fprop+Bprop+Acc - GFLOP/s:', ops/t/1e9)
41-

0 commit comments

Comments
 (0)